LibGDX Normal Textures Not Showing Up in 3D (Blender) Model Java

16 Views Asked by At

I'm working on a 3D project in LibGDX using Blender models and am having trouble getting normal textures to display on my models. My diffuse textures load fine, but the normal textures don't seem to appear on the model. I've checked the paths and names of the textures, and they are correct.

Here's how I'm loading and applying the textures:

//loading textures using AssetManager:
manager.load("stone tile color.png", Texture.class);
manager.load("stone tile normals.png", Texture.class);
// Applying textures to the material
Texture tile1color = manager.get("stone tile color.png", Texture.class);
Texture tile1normal = manager.get("stone tile normals.png", Texture.class);

if(tile1normal != null) { //not only tile1normal, I check this through a function (also do same for tile1color)
    material.set(TextureAttribute.createNormal(normal));
}

lighting environment (if necessary):

environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));
environment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));

Let me know if there is any other additional code I should add. I appreciate the help, thank you!

0

There are 0 best solutions below