No culling in jReality ?

Have jReality programming problems or questions? Post them here.
Post Reply
cfleury
Posts: 2
Joined: Thu 20. Oct 2011, 12:50

No culling in jReality ?

Post by cfleury » Mon 2. Jan 2012, 13:05

Hello,

We try to use jReality to enable a user to navigate in a virtual building. For the building, we load several .obj geometries of a two levels building and some furnitures. These geometries don't content so much details, but they dramatically break down the performance of our application when we load these geometries (about 7 fps).

It seems there is not culling in our viewer :
- even if the user is in a small room without any furnitures, we have the same low frame rate. (no occlusion culling ?)
- even if the user goes out of the building and put the building in his back, we have the same low frame rate. (no viewing frustum culling ?)
- even if the building disappear behind the camera far plane, we have the same low frame rate. (no viewing frustum culling ?)
- even if we activate the back face culling, we have the same low frame rate.

So do you have any ideas ? Do you think we have to activate a particular parameter ?

Thanks,
Cédric

User avatar
gunn
Posts: 323
Joined: Thu 14. Dec 2006, 09:56
Location: TU Berlin
Contact:

Re: No culling in jReality ?

Post by gunn » Mon 2. Jan 2012, 15:48

There is no such view-dependent culling in jReality, at least in the JOGL backend.

I think that viewing frustum culling should not be too hard to implement. Look at this tutorial to see how to use a camera listener to automatically adjust level-of-detail of a geometry (an associated strategy to culling to reduce unnecessary rendering) as the camera position changes. This could be used as a template to implement culling instead. You could add such a listener for each SceneGraphComponent you wanted to separately check for visibility. See also the class de.jreality.geometry.BoundingBoxUtility for methods which calculate 3D bounding boxes, which could then be used to speed up the viewing frustum culling. The class de.jreality.util.CameraUtility also has various static methods related to the viewing frustum which might be useful in this context.

Occlusion culling sounds like it would be harder. It's outside my expertise, in any case.
jReality core developer

Post Reply