Culling

Is frustrum culling actually implemented yet? I’m not seeing the results I’d expect based on things not in view having negative effect on the frame rate.

Also, I’ve noted the spatial package, is there a way for me to define my own culling method? I can’t seem to find a way to plug in culling planes.

Kev

Further to this, I’ve just implemented a quick routine to cull parts of my “level” that arn’t visible using a Switch node. This gives me the effects I’d expect from spatial culling (i.e. when a complex scene isn’t on screen the fps is good, more complex the fps goes down)

Kev

Please look at com.xith3d.scenegraph.View.renderNode - there is a commented out piece of code which skips nodes of out bounds. Maybe uncommenting it would help ? For some reasons it was changed this way between revision 1.10 and 1.11 of View class.

If you will hit any problem without bounds computation/classification, please try to apply https://xith3d.dev.java.net/issues/show_bug.cgi?id=28 - it fixes some errors in Sphere class (which is a base of BoundingSphere)

Shapes are certainly culled. What is commented out currently is culling entire hierarchies. It wasn’t acting exactly right and in some cases was culling things it shouldn’t. It could be due to the sphere bug, but probably not as that was sphere versus sphere problems and not frustum versus sphere.

Kev,

Can you please post a test case for this problem?

Yuri

I can knock something together if you like, but what David says above explains it. I was hoping to cull large portions of my scene in one go, i.e. a complete branch group. However, if its having to decide on a per shape basis what to cull that would explain the results I’m seeing.

Do you still want a test case?

Kev

Not really for a moment, but this will help to test things that are commented out right now:

[quote]What is commented out currently is culling entire hierarchies. It wasn’t acting exactly right and in some cases was culling things it shouldn’t.
[/quote]
And Sphere bug fix committed to CVS now.

Summarizing, would be nice to have but not top priority right now.

Yuri