Page 1 of 1
how many nodes it´s healthy to use
Posted: Wed Feb 11, 2009 2:49 am
by d3lay
hi there.
i´m making some snags with irrlicht and i have one question.
When i create a node, the best practice is to use the only node and get all the stuff or for every scene (game scene) i create another one ?
Example:
Node for scenarios stuff
Node for water nodes
node for bla bla bla...
thanx a lot dudes
Posted: Wed Feb 11, 2009 10:43 am
by rogerborg
Could you be a little vaguer? It's almost possible to guess at what you're asking.

Posted: Wed Feb 11, 2009 11:30 am
by JP
Yeah that's pretty confusing..
I've really no idea what you're asking but I'm gonna have a stab in the dark and make some comments that might help you.
There's not much overhead from having a large number of nodes I don't believe. Obviously having lots increases memory usage a certain amount and walking through the scene to render them could be slightly more work but probably not...
That's all CPU based stuff... The real issue could be down to GPU stuffs...
If you have 1000 cube scene nodes and are rendering them then that takes 1000 draw calls to be sent to the GPU and inbetween each one there can be a stall which will slow things down, so you could have 1000 stalls, not good!
If you have those 1000 cube scene nodes all crammed into one draw call then there's only the chance for one stall to occur instead of 1000 and you'll get a huge performance boost.
So if you're rendering a lot of the same things then things could possibly be sped up if you drew them all at once, if possible.
Posted: Wed Feb 11, 2009 3:58 pm
by d3lay
sorry dudes!
Pretty confusing my question.
It´s more confortable to ask if with one single node i can load all the meshes and make all colisions, waterscenes, skydomes, and everything ?
It´s kind of difficult all the theory envolving nodes, someone can explain me ?
I will be really gratefull !
thanx.
Posted: Wed Feb 11, 2009 4:07 pm
by JP
You probably don't want all those objects to be in one node... Sometimes it's good to have multiple things in a node whilst other times it's not. Generally speaking if things are seperate like water and terrain then they should be seperate nodes. If they're all linked together like walls of a building then that should be in one node pretty much.
Basically if two nodes use the same material then you can probably get a bit of a benefit from putting them in the same node as then they can be drawn together in one draw call (one draw call uses one material, no more!)
Posted: Wed Feb 11, 2009 4:17 pm
by d3lay
Thanx, thats solve my doubts

Posted: Wed Feb 11, 2009 5:16 pm
by Pyritie
If you want a whole bunch of nodes to have a single TriangleSelector to use for collision or something, you might want to check out the IMetaTriangleSelector.