Martin
Martin

Reputation: 2673

three js normalMap repeat

I have a mesh with normalMap loaded: enter image description here

but the normal map did not cover all the surface. UVs are correctly set to cover all the surface with texture.

Is there any configuration to force normal map repeating? material.normalMap.repeat.set( x, x ); do not make any difference.

If i switch normalMap to BumpMap or diffuse map "map", it is loaded correctly.

Code:

child.material.normalMap = THREE.ImageUtils.loadTexture('./js/models/asteroids/big/10035-normal.jpg' );
child.material.normalMap.repeat.set( 1, 1 );
///child.material.needsUpdate = true;

Upvotes: 1

Views: 1583

Answers (1)

Martin
Martin

Reputation: 2673

child.material.normalMap.wrapS = child.material.normalMap.wrapT = THREE.RepeatWrapping;

Upvotes: 2

Related Questions