Texturing terrain

I design my terrain in Freeworld3D 2.4.0, then export it as a 16 bit heightmap. I have successfully imported the heightmap into my game, and now I would also like to texture it the same way.

I have a .jpg with the texture I use as my base, a .jpg for another detail layer (road) and a .png for the alpha of where the detail layer should be placed.

I can't find any suitable examples of this–the best I could come up with was TestIsland, but that extends SimplePassGame, and I'm only extending SimpleGame. Everything else seems to be procedural texture generation, not something I'm interested in.

How do I go about texturing the heightmap?

just copy the passnode stuff from testisland…that's what's doing the texture splatting

Does the method "createSplatTextureState" exist in SimpleGame?

TextureState ts1 = createSplatTextureState(
                "jmetest/data/texture/terrain/baserock.jpg", null);

It has a method in SimplePassGame to do that. Should I just open the source for SimplePassGame and pull that method out, then replicate it in my SimpleGame?

Would it be more effective to do import com.jme.app.SimplePassGame and change the code to something like

TextureState ts1 = SimplePassGame.createPlatTextureState(...);


WOW. I'm an idiot. createSplatTextureState is a method written in TestIsland.

God… I've lost an entire day's worth of production trying to figure that out. Hope I can meet my deadline still…

just following into that method(ctrl-click) would have shown you that pretty quickly s