Triangle Base Terrain in JME

I’m new to jMonkeyEngine. I was noticing there’s a simple method for loading terrain maps based on height grids. Part of my research involves the generation of game terrains that creates a triangular mesh directly. Is there any way to directly load a 1k x 1k (or larger) terrain object that isn’t grid-based and still have it efficiently handled by jMonkeyEngine?

Isn’t 1k * 1k a grid?

If you have randomly spaced points as your terrain height values then you cannot use the existing terrain system. You will have to just generate a mesh by hand.

TerrainQuad uses grid height values, bit is is backed by triangles.

It’s a matter of position. In one row, the X values are 0, 1, 2, 3, 4 … in the next 0.5, 1.5, 2.5, 3.5 … in the next it’s back to 0, 1, 2, 3, 4 again.


/ / /



Well that attempt at ASCII art failed big time. …

The ascii art worked in my email, so I can see what you mean :slight_smile:

The terrain system won’t support that. But why have the points staggered? You have the same resolution if you just shifted the second row by 0.5.

The technique I’m using lends itself to modelling water flow and erosion better as it’s easier to create a proper channel structure.

I see.

Well you will definitely have to generate the mesh by hand.

TerrainQuad is grid-based so its heightfield can be used for fast physics collision and ray collision. It also allows it to be chopped up into a quad tree so large portions of it can be culled, and far away portions can have their level of detail reduced.