Horde3D
http://horde3d.org/forums/

Occlusion culling - objects disappear when switching LODs
http://horde3d.org/forums/viewtopic.php?f=2&t=1536
Page 1 of 1

Author:  worstplayer [ 06.06.2011, 16:58 ]
Post subject:  Occlusion culling - objects disappear when switching LODs

I know there's supposed to be an one frame delay with occlusion culling, but should objects also disappear for one frame when switching LODs? It doesn't always happen (can't find exact situation that causes it), but when it does it's quite noticeable.
Image
Is this intended, and if so, is there any workaround? (let's say, displaying multiple LODs at once at certain distances?)

Author:  marciano [ 08.06.2011, 20:37 ]
Post subject:  Re: Occlusion culling - objects disappear when switching LOD

I could imagine that some outdated occlusion information is used when an LOD is switched back. Does putting this into drawMeshes help?
Code:
bool valid = meshNode->_lastVisited[occSet] == Modules::renderer().getFrameID() - 1;
meshNode->_lastVisited[occSet] = Modules::renderer().getFrameID();
            
// Check query result (viewer must be outside of bounding box)
if( valid && nearestDistToAABB( frust1->getOrigin(), meshNode->getBBox().min,

Author:  worstplayer [ 09.06.2011, 09:38 ]
Post subject:  Re: Occlusion culling - objects disappear when switching LOD

Yes, it seems to work perfectly now. Thanks.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/