November 13, 2016, 10:53am
how can I use multiple textures in Terrain?
“Common/MatDefs/Terrain/Terrain.j3md” have only three Texture parameter!
I want to have some texture for horizontal and vertical roads , grass , farm back ground , mountains , and …
and if is there a way to paint multiple textures , so what about alpha map?
how should I change it? (RGBA)
where is the Terrain docs?
I dont like to use jme Terrain editor , I hate it .
November 13, 2016, 12:29pm
Do you need lighting? If yes, you can use TerrainLighting.j3md
It has Texture2D DiffuseMap, DiffuseMap_1 all the way to DiffuseMap_11.
November 13, 2016, 12:50pm
and which colors for each DiffuseMap in alpha map?
November 13, 2016, 12:51pm
would you mind to give a link to docs or tutorials about TerrainLighting.j3md? (I googled but nothing found!)
November 13, 2016, 2:10pm
there are 3 alphamaps: m_AlphaMap, m_AlphaMap_1, m_AlphaMap_2.
So for first four textures you got the first alphamap.rgba components in that order, then next alpha map, another 4 textures etc.
PS: I don’t have a link to a docs, but you can take a look, for example at the material definition or the fragment shader:
jmonkeyengine/TerrainLighting.frag at 445f7ed010199d30c484fe75bacef4b87f2eb38e · jMonkeyEngine/jmonkeyengine · GitHub