Occlusion Culling

I am thinking about implementing an occlusion-culling algorithm for Java3D.

Has anyone else ever attempted this? If so who, and which method? Did they succeed?

Do any of you guys see any problems in implementing such an algorithm? Any showstoppers in the way Java3D is made?

Do you know of any existing occlusion-culling algorithms for scenegraphs? Or tricks to use?

hmm, I would like to have this >BUMPED<

Depends what you mean. Occlusion culling is a broad term.

If you mean frustum occlusion culling then check out j3d code rep.

If you mean the one where you check visible particles against the depth buffer, good luck. It might not increase the speed at all, because of all the overhead.

If you mean frustum occlusion culling then…

No, never heard of that. I thought (believe) Viewfrustum culling has nothing to do with occluding objects. Occlusion culling is about, not drawing objects deemed not visible, since they are hidden behind occluders, e.g. a big building blocking your view.
There are no occluding involved in viewfrustum culling since you dont evaluate whether or not something is blocking the view.

, good luck. It might not increase the speed at all, because of all the overhead.

Which overhead do mean? What do you feel or have experience in that Java3D would be bad at?

Finding the good occluders?
Fusing occluders?
Finding the viewshadow projection of the occluders? (if its an image space algorithm)
Visibility testing?
something else?

I lean toward a point based algorithm since that seems the simplest. Maybe later I can evolve it to be cell based, and not have to do occlusion culling each frame.

All though I write all this I dont really know much about this stuff, since I have never tried any of it, or seen anything but abstract psoudocode.

I only plan on it to be efficient in urban areas, since in open spaces I believe more in LOD.

Have you seen any algorithms for scenegraph implementations? I have not, it would be nice not to have to reinvent the wheel… :slight_smile:

any comments?
Nikolai

If I remember correctly, there was some guy at Sun Java Forums who attempted to use depth buffer to retrieve the occludee’s and occluder’s the guy had experience in OpenGL and he attemped to do with the depth buffer, which is most often used to do occlusion culling. However, the efficiency of occlusion culling against brute force is still disputed, since even with OpenGL’s direct hard ware acceleration, the results vary.

So I believe, however you do it with Java3d, it is going to be slower. Basically you can use depth buffer, or then map the frustum of view and check what is behind what against a plane on that one. Latter case will be slow.

Anyhow, the common belief around now is, that Occlusion culling is good in specific cases, since it can’t be aplied to scenegraphed objects. To achieve decent results, you must check polygons in the view of frustum(or depth buffer) against each other or occluders. As you can understand if there are 6000 polygons in the view, things are going to get slow.

Another problem with j3d is that you need the access to the rendering “pipeline” if you want to check “objects”. This means that you could not use Java3d scenegraph, which is probably the reason why you are using java3d anyway.

Unless the java3d team implements some easy way to do occlusion culling, it is extremely hard to implement it yourself.