Nov 15

TerrainTiler

That was quick 😀

Getting progress on the TerrainTiler routine, still need to break it out into its own class and give it threading but it is working and frame rates are still good.

Terraforming tools are also coming together nicely, currently I can smooth the whole visible terrain, paint it with different textures, scale the textures and swap them out for others.

My planning is to have 4 textures per tile but each tile can have 4 of however many textures I decide to have available, this way each tile stays simple but I can have a vast array of different textures to suit the varying type of areas across the map. Also this allows me to put a lot of detail in such as normals/glow/specular maps as I need without breaking the limits of the older graphics cards.

And here are some pics to look at as words are boring 🙂

(The small oval is my “Player” (no pretty models yet, mechanics first). I use the player to test the physics of the terrain for issues as I go. The dome is the tool, adjustable in size.)

Until next time!

Splat Painting

Different Textures per Tile

LoD on terrain

 

 

Nov 12

Update

Hi again,

Quick update, not much has changed visually but I’ve had to rework the terrain code, well I’ve gone back to an older version I was working on and fixed it. Why? because the terraingrid function of jMonkeyEngine wasn’t working out, sure it was fast and easy but it was also very memory hungry, like I managed to clock up over 7GB of memory just wandering around the terrain. Sorry, no, not going to work.

So back on to my own TerrainTiler code, I’ve managed to bring its speed back up to at least equal to that of terraingrid. Which is impressive as terraingrid was only 2×2 visible tiles active (and 12+ cached <= the memory issue) where as my tiler routine is a 3×3 patch of visible tiles (no cache, new tiles saved to disk for later re-use). So my code gives me more visible ground and distance so less chance of a player seeing the landscape “popping” into existence as they wander around but still allows for a very large terrain.

edit: My routine is still using the jMonkeyengine TerrainQuads for each tile but they are treated individually and loaded in and out as the player moves, where as the built in TerrainGrid is 4 quads loaded as one and swapped in/out as the camera moves.

I’m very happy I managed to get that code working, now just trying to fix the terra-forming code to suit the new routine. Being a pita but I’ll work it out. Once I get those sorted and can tidy up and modify my terrain I’ll be able to post some more pics.

Until next time! Thanks for reading!