Jump to content

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


photo

Recommended Posts

Posted (edited)

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
Posted

gr7.76

setSurfaceTransform() directly affects the vertices positions. Since meshes uses floats internally don't set them too big, otherwise you will have precision loss.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...