How to put several map texture tiles on TerrainQuad?

I have terrain with realistic heightMap (TerrainQuad) and I want to texture it with unique map images to have something like 3D plastic map.

What is the simpliest way to do it?

The idea is, that I put less or more little square images onto whole terrain one next to another.

  1. Is the number of texture images limited by material defiition? If yes, I suppose, that I would need to define my own material with enough “texture slots”.
  2. How can I shift certain texture on appropriate position? For example…I need to set some texture piece coordinates like this: -0.5, -0.5, 0.5, 0.5 (not to cover whole terrain) …simply coordinates of left upper and right lower corner (both x and y.) which are set in units relative to mesh sides size (TerrainQuad…or maybe only TerrainPatch in my case).

    It would be great to have no need to texture each TerrainPatch but only whole TerrainQuad, but I don’t know, if this is possible. (ok, everything is possible, but I mean if it is possible in actual state of JME project)

    Is this right way to do it?

Ok, maybe there were lot of not well structured difficult things in one post…

Could anyone tell me please, how to solve this problems? :

  1. How to set specific position of nonrepeating texture on nearly planar rectangular (if it matters) mesh?

  2. If I put texture on the mesh, it renders upside-down and left to right inverted. (I put it on QuadTree so I don’t do anything with the mesh directly).

  3. How to draw limited but not known count of unique textures on one object?



Well, I have found, that somebody had similar problem with texture coords.

Short explanation:

Different image formats (png, bmp, jpg…) uses different coordinate system(0,0 point is in different corners). So he was able to draw bmp image as texture, but textures from other image formats were inverted.

I’ve just tried jpg, png, gif and bmp image formats with their variants(8b, 24b…) but this work wasn’t successful…