I’m looking to create a material that just uses a sphere map and “reflects” that. It seems like reflect.j3md is what I should be using, but let me know if I should be using something different.
I’m trying to replicate this look (the texture “warps” as you move around the object):
The texture for that looks like:
Here’s what I’ve tried:
Material reflectiveMaterial = new Material(context.getAssetManager(), "Common/MatDefs/Misc/reflect.j3md");
reflectiveMaterial.setTexture("CubeMap", context.getAssetManager().loadTexture("Assets/HornSkin.bmp"));
body.setMaterial(reflectiveMaterial);
The material is just solid black, even with a directional light (I’ve only applied it to the body of the sax here):
I’m assuming I’m just applying the material incorrectly (since the documentation page seems to describe it in a way that seems applicable to my situation).
material = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
material.setVector3("FresnelParams", new Vector3f(0.1f, 0.9f, 0.1f));
material.setBoolean("EnvMapAsSphereMap", true); // My texture is a sphere map
material.setTexture("EnvMap", texture);
Now I need to figure out how to only apply this to part of the mesh, since the mouthpiece should be solid black…