Paul.Withers Posted August 7, 2020 Share Posted August 7, 2020 Hi, I'm have code that renders a hierarchy of vertex buffers in Unigine and I have to create an ObjectMeshDynamic for each vertex array to render it. The problem with that, is ObjectMeshDynamic objects are persistent, so if on the next frame i don't want to render that ObjectMeshDynamic i have to manually set it to be disabled, or delete it, which is really annoying because then i have to track all of the objects i have created. What would be better if i could just pass a vertex / index array to Unigine to render that frame. Is that possible? Cheers Link to comment
silent Posted August 7, 2020 Share Posted August 7, 2020 Hi Paul, I guess for that task you can try to use MeshDynamic instead of ObjectMeshDynamic: https://developer.unigine.com/en/docs/2.12/api/library/rendering/class.meshdynamic?rlang=cpp 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
Paul.Withers Posted August 7, 2020 Author Share Posted August 7, 2020 Is there much of an associated performance penalty if i'm creating multiple MeshDynamics per frame? Link to comment
silent Posted August 7, 2020 Share Posted August 7, 2020 It depends on the hardware itself, so it's hard to tell. The best way to find out is to write a small prototype and do some benchmarks with it. 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
Paul.Withers Posted August 9, 2020 Author Share Posted August 9, 2020 Looks like MeshDynamic doesn't exist in Unigine 2.6.1, is there an equivalent? Link to comment
silent Posted August 10, 2020 Share Posted August 10, 2020 I'm afraid there is no equivalent in the 2.6.x SDKs. Minimal requried version is 2.7.1 for this. 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
Recommended Posts