Terrain Begun

I know it seems like I haven’t done much in the last month or two… that’s because I haven’t. :slight_smile: However, I’m working on terrain now, and I will finish it I promise. Work is starting to slow down a little bit again and I should be able to get a lot done.

The technique I am going to use is a bit of a combination from multiple places. I’m going to use Eberly’s system of blocks and pages. These will be organized in a Quadtree (hopefully, with the visibility map precalculated, but not sure). Clod will be used on the blocks. I will have a system of dependent vertices to prevent cracking.

Once terrain is finished, 0.6 will be done.

here’s the “inchstones” you can expect from Terrain.

  1. Simple bruteforce terrain (TerrainBlock) from a heightmap.
  2. Textured terrain and normal mapped terrain.
  3. multitextured terrain with tiling for the detail texture.
  4. heightmap/texturemap generation (like jme 1.1 had)
  5. terrain Page that will have 4 children (Terrain Blocks).
  6. Terrain Page can have 4 terrain pages as children as well as blocks.
  7. Clod for blocks.
  8. fix cracking from lod.
  9. Optimizations and bug fixing.

ok, 1, 2 and much of 4 is finished. (Needed 4 to insure 1 was working)

Looks great, I can’t wait to use it.

One of the things I’ll be doing in the forseeable future is importing jME meshes into ODE. From what I understand, I think I can get away with writing a single jME TriMesh → ODE Geom utility, which will work for everything from terrain blocks to models.

Part 3 is complete and the rest of 4 is finished. So, basically we have a brute force terrain renderer up and running in jME. Brute force is many times acceptable for small terrain sizes, as it gives you the highest tessellation and nicest look.

I’ll be starting on Terrain pages next. This will allow for culling. Then we’ll work on lod.

Fuseboy, if it helps, Jani originally wrote an odejava demo using jME (awhile back) with falling blocks. He used TriMesh without any problems. TriMesh has changed little since then, so if odejava still handles meshes in the same way, you should have little problem.

Got a couple tests in, TestTerrain and TestTerrainLighting.

These are simple brute force renderings, so the fps is going to be low. Might give you an idea about where it’s going though.

Ok, Procedural Texture generation (i.e. dynamic height based textures are complete). This completes the brute force part of the terrain.

I’ll be starting with the quadtree element next.

Ok, here’s a pic of the latest :slight_smile:

Wow. Great job! Terrain is looking incredibly impressive. Yet another excellent feature of jME.

demo page has been updated with terrain demos, that way you don’t have to mess with source if you don’t want.

On my 1GHz PIII w/ 512MB RAM and a Radeon 9700, I get around 10 fps on both demos, regardess of resolution, with a maxed-out CPU, so I assume it’s the number of polygons being tossed around?

while it’s going to be a low res, that does seem a little too low. On my laptop 1.6 GHz GeForce 440 Go I get 40 (that’s the machine I’ve been taking the screenshots on). It could be CPU bound, but I didn’t think it would be. Anways, yes, this is the brute force non-optimized version. It runs badly, but looks pretty. :slight_smile:

7 and 8 are complete (actually 8 was free). So now you can clod a block. I’ll be getting the terrain pages up soon so you can break it up and cull properly.

"mojomonk" wrote:
demo page has been updated with terrain demos, that way you don't have to mess with source if you don't want.

i get following error
An error occurred while launching/running the application.

Title: jME Test [terrain.TestTerrainLighting]
Vendor: Mojo Monkey Coding
Category: Launch File Error

Could not find main-class jmetest.terrain.TestTerrainLighting in http://www.mojomonkeycoding.com/webstart/jmetest.jar

Are you sure webstart downloaded the latest version? I have problem with my webstart sometimes where it won’t download the updates. I have to go into webstart (the webstart application itself) and delete the jME library. Then it will download the latest. In other words, clear the cache.

hmm.guess i deleted only the applications and not the library itself from webstart :slight_smile:

getting smooth 80fps from both terrain tests in my laptop.

3Ghz HT

and ati radeon 9000 mobile

Just a little update.

The quad tree version is up in wireframe mode. For the same sized terrain as the other demo (which got about 80 FPS on my desktop), I’m getting on average 900 FPS. So it’s quite fast. Although, this is sans texture mapping and lightings, so I expect it to drop quite a bit, but hopefully still keeping it above 500 FPS.

Texture mapping and normals are working now for Terrain Pages. Terrain is basically done. Just need to add utility methods for obtaining heights at arbitrary locations, etc, clean up and document.

0.6 will be released May 1st. You heard it here first.

hey mark,

really nice job on the terrain, just one small thing id like to point out, i dunno if it is meant to be like that or not, but here goes.

The new demo for TerrainPage takes 3 minutes to load on a 2.6Ghz machine.

The start time was 4:13:58, the time before I could see anything was 4:16:49. Thats according to the log.

Is it meant to be this way, or is there a performance issue?

Start up is definately an issue at the moment. Clod records are being built for each block of terrain that makes up the quad tree, splitting of nodes takes a bit longer than I’d like as well. Although 3 minutes does seem awfully long. My laptop (P4 1.9 GHz) usually takes 30 seconds or so.

fwiw, my P4 2Ghz desktop built it in 46 secs.