Sign in to follow this  
Samurai Jack

Hyperthread Scene Graph?

Recommended Posts

Greetings! I was wondering, has anyone implemented a multi thread scene graph? I was thinking about a thread that would transverse and cull out invisible objects, and a thread that would blend me bone matrices or compute node positions in space. But that seems not reasonable for me, why would i compute sekletal animation frame (all bones of a single character) if the character isn't visible? Okay, maybe for collision, but invisible object might not need souch precise collision. But at time of computing bones, you might not yet know whenever you are visible or not. Any suggestions on this guys? Something about Hyperthreads or Multi core processors: I checked out "Cinebench" on a Pentium P4 3,2 HT and got more than 30% speed up on rendering - two threads were rendering half a screen. Are there any good tips/tutorials on multi thread programing? Thank you in advance!

Share this post


Link to post
Share on other sites
Maybe I misunderstand what you're after, but one way is to do something like this:

Thread 0 -- Processing scene-graph
Start/resume thread 1
while node != end
if node is a visible skeleton hierarchy node, add the node to the list of skeleton nodes.
process child nodes (if your bone hierarchy is made up by scene graph nodes, skip this step for skeleton hierarchy nodes).
while skeleton node list isn't empty
process first node in found in the skeleton node list
remove node from skeleton node list.
Stop/pause thread 1

Thread 1 -- Processing hierarchies
loop
if list of skeleton nodes is empty, goto loop
process first node in found in the skeleton node list
remove node from skeleton node list.
goto loop


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this