Using ObjectMeshDynamic::setSurfaceTransform() on procedural meshes - once or each frame?


photo

Recommended Posts

Hi everyone

We have procedurally created meshes that contain several surfaces.

Currently the surfaces are created in their own coordinate system, and then placed in the 3D model using ObjectMeshDynamic::setSurfaceTransform().

Example: the whole 3D object is modelling a house and each window is generated in its own coordinate system, and then transformed to the appropriate holes in the walls (this is a conceptual example only,  not an actual example from our application :) ).

In order to optimize the mesh I would like to know when that transformation happens. Does it directly affect the vertices stored in the surface of the ObjectMeshDynamic instance and the vertices sent to the GPU are already transformed, or are the vertices sent exactly as given and transformed each frame?

 

Thank you in advance.

Edited by gr7.76
Link to post