I’m currently porting a terrain engine from C++/DX to Java3D.
I’m trying using a SimpleUnivers and an array grid representing the ground. It runs fine (graphically) on Java, but it’s sluggish (11fps) compared with C++/DX (80fps). I know that the problem is in the code (not in Java3D!), in fact I’ve not yet translated the culling routines.
Now, I’ve not great experience with Java3D, so I’m not sure is possible to cull land “tiles” (group op polygons) using the SceneGraph.
In the DX version, I created a culling routine based on viewing frustum. This routine creates a list of visible polygons (every cicle) and then draws them on screen.
May I should simple use Immediate mode (as in PureImmediate demo), or there’s a way to mix Immediate mode with the SimpleUniverse?
The ROAM stuff from j3d.org e.g. need to do similar things. They analyze the terrain with respect to the frustrum and generate the shape to be rendered.
A Great Example from Germany ( with free source code ! )
features dynamic LOD, motion, and toggling from solid to mesh:
The vis.informatik.uni-stuttgart.de folks have an excellent demonstration
of Terrain Generation & Rendering with some of the best modern methods
( links below )
Web Demo with Free Source code
Real-Time Generation of Continuous Levels of Detail for Height Fields
| Features of the algorithm:
|
| * Continuous Level of Detail (i.e. dynamic mesh).
| * Top-Down approach.
| * Geomorphing.
| * Quadtree based (i.e. fast; easy view frustum culling).
|
| [ * also feature solid surface - wire mesh toggle ]
| http://wwwvis.informatik.uni-stuttgart.de/javatevi/data/StudArbAus_MB.ps
I spared no expense in time or money to compress the image
to an optimimum level to achieve the perfect comprimise of
detail vs. image size ( and thus imposing unbearable download delays ).