Texture alteration on terrain not visible during run-time

I have created a small test terrain. Applied my own grass texture to the terrain mesh and then used the jMonkey terrain editor to add an additional rock-like texture on top of the grass texture. I have also added some ambient light to the scene.



In the terrain editor everything looks the way I would expect it to look but during runtime only the grass is visible. The custom grass and rock textures are both located in Textures/Terrain/splat/.jpg. The scene is located in Scenes/.j3o.



What am I missing here?



The whole application consists of nothing much more than:

(In simpleInitApp)

[java]

flyCam.setMoveSpeed(50);

Spatial scene = assetManager.loadModel("Scenes/anotherScene.j3o");

rootNode.attachChild(scene);

[/java]



I did a very quick check to see if I could fins a similar topic but I could not find anything that seemed relevant. Any hints or tips are very welcome. Thank you!

The part of your app where you set the alphamap and grass texture on the terrain is what is needed to debug your issue.

The terrain editor will look for the alphamaps in ‘assetsTexturesterrain-alpha’. So when you created your terrain, if you are using a different alpha, the grass won’t show up. You can get the material from the terrain mesh, and then get the alphamap path to see where it lives.

I suggest you just create the terrain from the start in the editor so everything is set up where it wants to be.

Sploreg. In the example above I have created everything using the jME3 editor. As far as I can see the application should be able to access both the base texture (grass) and the alpha (dirt/rock) texture. I belive that if the application is unable to reference a required file it will throw a file error exception and quit. This has to be some other issue. The alphamap path is the correct one.



Feels like I’m drawing a blank here…

Ok so now I realized that the editor makes it’s own files called sceneName-terrain-sceneName-alphablend0.ext



None of these new texture files contain any image data. When I double click on them in the IDE a new tab is opened (with the same name as the file) but the contents of that tab is empty. What am I doing wrong here?

The alpha maps are not empty, just that the alpha channel isn’t filled in yet s you can’t see anything in an image viewer.

layer 1: red

layer 2: green

layer 3: blue

layer 4: alpha



so if you fully paint in layer 4, you will see the r,g,b values in the image.