Terrain texturing

I’m quite new to jME (and 3d-programming in general), so this might be a trivial question, but currently I don’t really know where to start looking.

I have to display some blocks of terrain; data is coming from an array of height values (which works fine using TerrainBlock).

The texture information is stored in the same array (i.e. coordinate [0,0]: height 15, texture 1; coordinate [0,1]: height 12, texture 2; …).

Now how can I feed this information into jME? The ProceduralTextureGenerator won’t help me much because it seems to be purely height-based.

What would be the best way to assign those different Textures to my TerrainBlock and have them blend nicely into each other?


…and sorry for my English, it’s not my native language :wink:

It sounds to me like you’ll need another procedural texture generation. Where instead of taking a height map, you can supply a map with values corresponding to a texture index. There is nothing that can currently do it in jME itself, but it might not be that hard to write one using the ProceduralTexture class as a guide.