Horde3D

Next-Generation Graphics Engine
It is currently 22.11.2024, 07:26

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 19.10.2008, 10:26 
Offline

Joined: 23.06.2008, 10:23
Posts: 21
Location: Sweden
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).


Top
 Profile  
Reply with quote  
PostPosted: 20.10.2008, 11:47 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
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...


Top
 Profile  
Reply with quote  
PostPosted: 20.10.2008, 13:05 
Offline

Joined: 23.06.2008, 10:23
Posts: 21
Location: Sweden
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.


Top
 Profile  
Reply with quote  
PostPosted: 20.10.2008, 19:02 
Offline

Joined: 19.11.2007, 19:35
Posts: 218
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.


Top
 Profile  
Reply with quote  
PostPosted: 20.10.2008, 19:48 
Offline

Joined: 23.06.2008, 10:23
Posts: 21
Location: Sweden
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group