gr7.76 Posted February 2, 2021 Share Posted February 2, 2021 (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 February 2, 2021 by gr7.76 Link to comment
silent Posted February 3, 2021 Share Posted February 3, 2021 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: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
gr7.76 Posted February 8, 2021 Author Share Posted February 8, 2021 Awesome. Thank you. Link to comment
Recommended Posts