Creating optimized reflection material in jme3 for android

I want to create mirror like reflective metallic surface for vehicle object kinda similar to this game in an optimized way for the game i am creating for android. I have tried SimpleWaterProcessor but it takes too much processing. I will be glad if anyone can help me out in this. I think an illusion of reflective surface might be possible through shaders.

IMO for android you should just use a small env map (128x128x6 not much more) and just do reflection mapping (lighting.j3md supports it)

Thanx for replying Nehon, can you give me some example or provide me with a link which can be helpful to me because i dont have much experience with Reflection mapping with lighting.j3md

Thanx, for your help again Nehon i just implmented the reflection.j3md and got it working and have noticed a performance boost in the gameplay. Here is the code:

        //initialize TextureKey with string texture path
        TextureKey key = new TextureKey(PstringTexture, true);
        //initialize environment map
        envMap = assetManager.loadTexture(key);
        Material mat = new Material(assetManager, "MatDefs/Reflection.j3md");
        //Setting texture through environment map
        mat.setTexture("Texture", envMap);
        //Setting material to SphereMap
        mat.setBoolean("SphereMap", true);
         //setting the vehicle reflective surface material
        //setting the vehicle metallic surface material

Great nice work

1 Like