Hello together,
I have a problem. Here is my code:
pre type="java"
mat_terrain = new Material(assetManager, “Common/MatDefs/Misc/SimpleTextured.j3md”);
Texture t = assetManager.loadTexture(“Textures/Terrain/splat/Textur_Emden.png”);
t.setWrap(WrapMode.Repeat);
mat_terrain.setTexture(“ColorMap”, t);
float [] test = new float[]{0.0f};
terrain = new TerrainQuad(“my terrain”, 513, 513, test);
terrain.setShadowMode(ShadowMode.Receive);
terrain.setMaterial(mat_terrain);
terrain.setLocalTranslation(0,0, 0);
terrain.setLocalScale(1f, 1f, 1f);
rootNode.attachChild(terrain);
TerrainLodControl control = new TerrainLodControl(terrain, cameras);
terrain.addControl(control);/pre
The “Texture_Emden.png” is a simple map picture. But when I use it on a terrain it flipped. When I use the same material on a Box, it looks good.
http://teckhosting.de/map.png
Can you help me to finde my error?
Thanks
Chris
Yeah, I think this issue has been fixed in the latest nightly version of TerraMonkey. Idk if theres another way to fix this but flipping the image with the image editor for alpha-4…
I test it with the latest nightly version. But the problem is not solved. Ok I have to flipping the image bevor I can load it.
Use a TextureKey when loading the texture with the asset manager, and then you can flip the texture:
TextureKey tk = new TextureKey(“Textures/Terrain/splat/grass.jpg”, true);
1 Like
Is TextureKey available for jme3?I can´t finde the import package.
com.jme3.asset.TextureKey
Thousand Thanks!! That works.
jme brings great fun and has a very good community
Bye bye
Chris