Performance increase throught locking

The other dillema is that I have no hierachy for the quads. The quads represent a flat world. This means I have 2000 quads all attach to the root of my scene node. Should I at least split of the static and the moving quads on two branches?


You could probably speed this up a lot by using a quad tree structure of nodes like used in TerrainPage.
This would allow for very fast culling of invisible parts of the tree.
edit: don't forget proper use of Bounding Volumes for this to work

For an explanation search the forums for "quadtree"  or "quad tree" or the like

Does using a TerrainPage constrain me to use the x and z axis for my planes? Cause currently I use the x and Y axis for the 2D planes, and my camera points in the z direction. That kind of thinking seems incompatible with Terrain blocks …

winkman did not suggest to use TerrainPage itself. You just need to organize your scenegraph to allow culling, right? You can have a look into TestSwarm - it uses a manager for it's nodes to get hierarchical bounds organized dynamically…

I was hoping JMonkey had a datastructure that would help me, without having to recode a quad-tree myself. I'll take a look at the TestSwarm.



How about node locking. Once I sort out everything in my Datastructure (so that everything is easier to cull and it's faster), will locking give me another performance boost?



Alex

adenau said:

will locking give me another performance boost?

most likely, yes

Would you be willing to share that code?



Alex

i made a little quadtree-node myself which takes any amount of nodes, locks them, and automatically reorganizes itself it gets too big by quadding itself into smaller pieces. this is what makes the difference between "frames per 0.1-second" and "seconds per frame".

i'll post it later in the user section.

mabye this helps.

That thread had died…why'd you have to bring that back?  :stuck_out_tongue:

because it implements a quadtree and it uses locking

if i knew that you'll react so allergic, i would have brought it up sooner :stuck_out_tongue: