My game uses parallax mapping. This works fine on my PC, but on some computers the textures that use parallax mapping are rendered completely wrong, as just a single, solid color. If I remove the parallax maps from those textures, then they render properly. So, the problem isn’t that the parallax functionality isn’t working; it’s that the parallax mapping is causing the whole texture to fail on some computers, but not others.
I create the
Materials like this:
Material material = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md"); material.setBoolean("UseMaterialColors", true); material.setColor("Ambient", ambient); material.setColor("Diffuse", diffuse); material.setTexture("DiffuseMap", assetManager.loadTexture("Textures/Terrain/Temporate/DiffuseMap.gif")); material.setTexture("NormalMap", assetManager.loadTexture("Textures/Terrain/Temporate/NormalMap.gif")); material.setTexture("SpecularMap", assetManager.loadTexture("Textures/Terrain/Temporate/SpecularMap.gif")); material.setTexture("ParallaxMap", assetManager.loadTexture("Textures/Terrain/Temporate/ParallaxMap.gif"));
This works fine on my PC, but doesn’t work on my dad’s PC. When I gave him a copy of the game with all the parallax maps removed, all the textures rendered properly.
I gave him a copy of TestParallax, and that works absolutely fine for him. So, it’s not that his PC can’t handle parallax textures.
I then took the BrickWall texture from
TestParallax, and put that into my game in place of another texture:
material = assetManager.loadMaterial("Textures/Terrain/BrickWall/BrickWall.j3m");
That also works fine on my PC, but on my dad’s PC, it still doesn’t work (still rendered as a single, solid color). So, it seems that it’s only in my game that textures with parallax mapping aren’t working properly (on some computers).
Obviously my game is a lot bigger and more complicated than
TestParallax. So, I’ve tried removing some of the things that my game does that
TestParallax doesn’t, and that seem like they might interfere with the rendering of textures:
- I removed a call to
GeometryBatchFactory.optimize(), in case it’s the fact that the
Nodes that use those
Materials are optimized, that’s responsible.
- I’ve set the near-plane on the camera frustum back to 1, in case it’s something to do with Z-buffering.
- I’ve removed the
FilterPostProcessor(which contained a
- I’ve unchecked obfuscation.
However, parallax textures (in my game at least) still aren’t working for him. Still work fine for me though.
So, does anyone have any idea why this might be happening? Remember, it’s only on some computers that it’s doing this.