How do I export custom per vertex attributes with the PVRGeoPod plugin?

Tagged: ,

This topic contains 4 replies, has 2 voices, and was last updated by  ikrima 4 years, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31145

    ikrima
    Member

    I’m trying to export Spherical Harmonic coefficients with my vertices. I only see hooks to export scene data as a blog but I can’t see a way to tie that back to specific vertices

    #36678

    Joe Davis
    Member

    Hi,

    The user data export option was not designed to export vertex-aligned, so exporting your SH data per-vertex will be difficult.

    There are two reasons for this complexity:
    1) The way that per-vertex information is stored in a modelling application is specific to that application (for example, we may have to triangulate the data ourselves)
    2) Our exporter sorts geometry for efficient access on device , which again rearranges the data (this is enabled by default).

    You may, however, be able to export the data as an unused per-vertex channel in your POD file, for example vertex colours.

    I hope this helps. Let us know if you have any other questions.

    Thanks,
    Joe

    #36679

    ikrima
    Member

    Hey Joe,
    Thanks for the response. Might just implement our own simple exporter then.

    For 2), can you expand on what you mean by sorting the geometry for efficient access? I understand the exporter can reparameterize the mesh based on indexed tri-strips; what is geometry sorting?

    Is that just batching submeshes with the same material to minimize state changes when rendering?

    #36680

    Joe Davis
    Member

    Hi,

    If you want to write an exporter that extends the POD format, you can use our POD File Format Specification document as a starting point instead of creating a new format from scratch.

    Sorry, I should have been clearer. Our exporter rearranges vertices and indices to improve run-time caching of the data. This results in better performance when the data is accessed by the GPU. You can disable the sorting in the exporter (which may make it easier to align your custom vertex data), but this will cause vertex caching to be less efficient at run-time.

    Our exporter doesn’t combine meshes. This should be done in your modelling application before the data is exported.

    Thanks,
    Joe

    #36681

    ikrima
    Member

    Thanks Joe…by any chance, are the post TnL vertex cache sizes on the SGX GPUs public information?

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.