No announcement yet.

Speedtree deefault vertex data

  • Filter
  • Time
  • Show
Clear All
new posts

  • Speedtree deefault vertex data

    I am currently looking into the possibilities of adjusting default behavior (wind, alpha to coverage, positional coloring, etc.) of Unreal 5 Master Material for SpeedTree. Is there any documentation about default vertex data packing for Unreal that I could start with? I mean information like what data are stored in vertex colors/texture coordinates for different exported asset types.
    Thanks a lot,

  • #2

    You are, of course, free to make your own master material and switch the material instances to it post-import, or edit the included master material. That is the benefit of using material instances.

    We don't really have documentation on the internals of the Unreal integration. However, you can see exactly what the importer is doing by taking a look at USpeedTreeImportFactory::FactoryCreateBinary9() in the engine code. There is even a comment in that function describing the texcoord data used in different situations (when you have branch2, when you have camera facing geometry, etc). The vertex color by default is the color you can create in the modeler, with the alpha set to the per-vertex blend value.

    Note that if you start moving things around in the VB, you would probably then need to modify all the wind material nodes to match.

    Hope this helps