Paul.Withers Posted February 28, 2020 Share Posted February 28, 2020 Hi, Is it possible to perform occlusion queries using C++, i can't see any examples in the code. I'm rendering multiple, very high polygon meshes and i want them to only render if they are not occluded by other meshes. The meshes are of type Unigine::ObjectDynamic. Thanks for any help you can give! Link to comment
morbid Posted February 28, 2020 Share Posted February 28, 2020 Hi Paul, Just set the occlusion query flag for the objects that you need to hide via API: setQuery(1). Make sure that occlusion queries are also enabled in the running engine (render_occlusion_queries 1). However, if you want to hide these high poly meshes (especially if you have hundreds or thousands of them) it may be faster to use the regular occluders placed inside the objects that should hide the high poly ones. You can check the occluders code samples (but in UnigineScript) in <SDK>/data/samples/stress/occluder_** and query_00. 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
Recommended Posts