TerrainLighting.j3md?

Ok so for context: I’m using the SDK. What I did was load an image from a heightmap as terrain using the Scene Composer, and it’s composed of many TerrainPatches. Through some testing, I figured out that these were made of the TerrainLighting.j3md material definition and what I’m trying to do is change their opacity/alpha, but it doesn’t work. I tried changing the boolean “useDiffuseAlpha” to true and then changing the ColorRGBA using the “Diffuse” parameter but it still didn’t work. What am I supposed to do?

Transparent objects go in the transparent bucket.

https://javadoc.jmonkeyengine.org/v3.3.0-beta1/com/jme3/scene/Spatial.html#setQueueBucket-com.jme3.renderer.queue.RenderQueue.Bucket-

My code looks like this, still doesn’t look any different

                    movSet[l][crd[0]][crd[1]].tile = mobilityTiles.get(l).get(n);
                    movSet[l][crd[0]][crd[1]].tile.getMaterial().getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
                    movSet[l][crd[0]][crd[1]].tile.getMaterial().setBoolean("useDiffuseAlpha", true);
                    movSet[l][crd[0]][crd[1]].tile.getMaterial().setColor("Diffuse", new ColorRGBA(1, 1, 1, 0));
                    movSet[l][crd[0]][crd[1]].tile.setQueueBucket(RenderQueue.Bucket.Transparent);

UseDiffuseAlpha doesn’t do what you think it does.

What a wild ride it is reading that shader, though. It looks like if you don’t set UseDiffuseAlpha it will be fine. I can’t see anywhere where it specifically sets alpha to 1.

I tried doing that, it still gives me the same result as it did. Could this have something to do with me creating it in the Scene Composer?