"Game-Level" terrain with specific textures

First:  my ultimate goal is to be able to create non-random levels, assign textures to areas (roads, plazas, etc), and then plop the models down onto the terrain using a config file for that level.

I have an older test I did last summer that uses an ImageBasedHeightMap for the base terrain.  I also had tested using the ProceduralSplatTextureGenerator, creating an alphamap image for a dirt path.

Question:  Is the best way to set the textures in the areas I want to do this with as many alphamap images per texture per map? (I would think this would be way too memory intensive).

In my head I'm currently envisioning a loader that places textures onto a terrain based on an image, but similar to that of the ImageBasedHeightMap; each pixel color could correspond to a different texture.  However, I'm unsure as to how well this would work if you wanted something like dirt that blends with grass (I assume like splatting…been a while).

Curious as to if there is a current solution that I'm completely overlooking, or whether something should be implemented (don't want to re-invent the wheel any more than I already have!).

Thank you!


Oh, and I have read a little on MonkeyWorld3D, but am unsure as to whether it's currently in a state to be used yet: the 3.0 version didn't work for me…running on linux for my development, and I have yet to get around to downloading Eclipse 3.2.1 (as opposed to my 3.2.2) to test the RCP as I've read about issues with 3.2.2.

Anyone know if MonkeyWorld3D would fit the bill?  In reality, I need to be able to map to/from a 2D grid of info for my server - currently just doing simple calculations for such a thing.

I was planning to do the same technique you describe in my texture splatting implementation some time. But right now I have other priorities, and it may be some months until I implement that. Of course, you might still take a look, it's quite easy to use - and by the time you have something to release, I might even have implemented "splatmap-packing", as I call the packing of 4 alphamaps into one RGBA-texture.

Oh, and you can find the code, and demo, here: CGIWrap Error: User not found


I am curious as to how such nice looking terrains like in the Jadestone-Spirits and Nord screenshots…it makes me feel like I'm missing someone blatantly obvious.

I'm going to simply do a heightmap with a bunch of alphamaps for splatting for now, and attempt to export to binary jme for normal loading…

Can anyone fill me in on what I may be missing?

Current update:

I have exporting and importing of the above, but when I import the textures are all black and white.  I did search a bit around and used Texture.DEFAULT_STORE_TEXTURE = true;, but I assume it has something to do with using the ProceduralSplatTextureGenerator rather than the normal ProceduralTextureGenerator?  Just when it seemed like I finally found my answer, I run into another issue…heh.

Also, it seems to take a lot longer to load the binary file than it does to generate the terrain…any thoughts?  From the load time differences I'm thinking that exporting/importing may not even be worth the effort.

I'm a Jme total beginner and what you say sounds very interesting.

Did you manage doing it ?

Spirits terrain was done with texturesplatting…similar to how it's done in the jME test, TestPassNode(in CVS)

Is it also possible to "paint" a terrain thanks to a grayscale image just like ImageBasedHeightMap does for the height ?