hayden_g
hayden_g

Reputation: 47

gltf exported from blender with metallic texture and no roughness texture is loaded into three.js with roughness texture matching metallic texture

If the metallic texture is being reused (same UUID) as the roughness texture and I don't need the roughness texture, would it be more performant to set the roughnessMap as null?

I don't understand why the metallic texture is being reused so an explanation of that would be appreciated as well.

Upvotes: 1

Views: 552

Answers (1)

M -
M -

Reputation: 28482

The .metalnessMap uses the blue channel while the .roughnessMap uses the green channel of the same texture. This is done to save filesize and memory, since using a single RGB texture for multiple purposes is more cost-effective than using separate RGB textures.

Ambient occlusion uses the red channel of the assigned texture, so you could potentially have three separate maps for the price of one!

Upvotes: 1

Related Questions