After looking around on the forums, I came across this post, which shows how you can use Lighting.j3md to render an Environment Map on your material. This is exactly what I want, so I tried it myself:
reflectionTexture = assetManager.loadTexture("Textures/EnvMaps/OutputCube.dds");
reflectionMap = new TextureCubeMap( reflectionTexture.getImage());
vehicleMaterial = new Material(aM, "Common/MatDefs/Light/Lighting.j3md");
vehicleMaterial.setParam("DiffuseMap", VarType.Texture2D, aM.loadTexture("Models/Vehicles/Tuktuk/baked_tuktuk.png"));
vehicleMaterial.setParam("EnvMap", VarType.TextureCubeMap, reflectionMap); // <-- Set the environment map here
The problem is that the environment map is not visible on the material at all. The diffuse is, and changing other values such as the Specular colour etc. does have an effect, so I’m sure I’m not mixing up materials!
I know it says on that post: “set use UseReflection to true” and you should also set “ReflectionPower”, and “ReflectionIntensity”, but how do I access these parameters? Looking through Lighting.j3md, I couldn’t see these parameters.
Empire Phoenix, as far as I am aware, I was already setting the EnvMap with the line:
vehicleMaterial.setParam(“EnvMap”, VarType.TextureCubeMap, reflectionMap); // <– Set the environment map here
pspeed, Those parameters helped a lot, and I wasn’t aware of the Environment Map test. I had a look at this and it’s helped a lot! I have the environment map working properly now, thanks very much! I would guess they defaulted to 0.