Horde3D http://horde3d.org/forums/ |
|
Disable occlusion culling for specific nodes? http://horde3d.org/forums/viewtopic.php?f=2&t=535 |
Page 1 of 1 |
Author: | Fidora [ 19.10.2008, 10:26 ] |
Post subject: | Disable occlusion culling for specific nodes? |
Is it possible to disable occlusion culling for specific scene nodes? EDIT: I forgot to mention this is going to be done from an extension, so I have access to all the scene node's methods and variables (including private). |
Author: | AcidFaucet [ 20.10.2008, 11:47 ] |
Post subject: | Re: Disable occlusion culling for specific nodes? |
Occlusion culling (for geometry) is done in Renderer::drawModels( ...params ...) (as well as drawLightGeometry and drawParticles) you'll see an occSet param, if it equals 0 than there's no occlusion culling. That param gets tossed around, I think it appears first in drawGeometry. Off the top of my head, you'd have to probably modify the scene node base class to include an "occludable" variable and tack on an "if" around the occlusion section -OR- take control of the rendering process in your extension while sorting what goes needs occlusion and what doesn't. Someone else may have better answers though... |
Author: | Fidora [ 20.10.2008, 13:05 ] |
Post subject: | Re: Disable occlusion culling for specific nodes? |
That's what I though... I'm currently writing an OpenAL sound extension and I'm using my sound node's rendering callback to fill the streaming sounds' buffers with new data. If the sound node is occluded the rendering callback won't get called for that node and it won't have any new sound data to play, therefore I need to disable occlusion culling for the sound nodes. I guess I have two options here, either force the user to call an update function each frame or convince the Horde3D team to implement a way to disable occlusion culling for nodes in the next Horde3D release. |
Author: | AcidFaucet [ 20.10.2008, 19:02 ] |
Post subject: | Re: Disable occlusion culling for specific nodes? |
If you're tacking new data onto nodes that could be a problem. If you're creating a SoundNode than you just need to provide it with it's own "RenderFunc" and just not do any occlusion culling in it. I'm pretty sure that occlusion is per-object and not per-node-tree-branch. In which case you then attach SoundNodes to ModelNodes. |
Author: | Fidora [ 20.10.2008, 19:48 ] |
Post subject: | Re: Disable occlusion culling for specific nodes? |
I solved the problem by just maintaining a list of all streaming sound nodes and updating all of them in the SoundNode's rendering function. |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |