kbrodie Posted September 19, 2017 Share Posted September 19, 2017 In my company's application we have a vehicle driving through a fairly large world, for performance reasons we've set the lod_threshold of the terrain to 1 meter. We use a 3rd party physics engine to determine where the vehicle drives. To calculate at what height the vehicle is driving, we get the intersection between the world and a vertical hypothetical line using "Unigine::World::get()->getIntersection" (e.g.: when the vehicle is at point x.y, we get the intersection between -100 and +100 meters at point x.y) and then use the z-value of this intersection to determine where we draw our vehicle. It seems however, that the "getIntersection" method we use ignores the threshold and returns the value at full resolution (about 0.1 meter). This means that our vehicle will occasionally get stuck in an "invisible" hole (as in the hole is on the full resolution map, but the lod_threshold prevents you from seeing it). Is it possible to setup Unigine that "getIntersection" uses the same resolution as the lod_threshold (i.e.: I want "getIntersection" to return the value I see on screen and not the value in the original source). Any help is appriciated, Thanks. Link to comment
silent Posted September 25, 2017 Share Posted September 25, 2017 Hello! Right now I think the "working" solution will be to: Export terrain data as .mesh Open that .mesh via UnigineImport plugin in 3ds Max / Maya Manually simplify geometry (for better intersection performance) Setup collision / intersection masks for objects so car will not use the terrain for that Import mesh from step 1 and align with terrain Use that mesh for intersection (setup collision / intersection masks) That approach will allow you to control visuals / performance level (but only manually by editing the mesh). Probably you can left mesh only on the area where car will actually be, not the whole area. 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
kbrodie Posted September 26, 2017 Author Share Posted September 26, 2017 I was hoping for a software solution, but this'll do. Thank you for your support, it's much appreciated. Link to comment
Recommended Posts