Distorted shadows

I’m trying to add shadows, but on the shirt, they look distorted.

Here are my settings:

    // Renderer
    this.renderer.shadowMap.enabled = true;
	this.renderer.shadowMap.type = THREE.PCFSoftShadowMap; 


    // Lights
    var light = new THREE.AmbientLight( 0xffffff );
    light.intensity = 0.5;
    this.scene.add( light );

	var light = new THREE.PointLight( 0xffffff, 1, 100 );
	light.position.set(-5, 20, 8);

	light.castShadow = true;
	light.shadow.mapSize.width = 1024;
	light.shadow.mapSize.height = 1024;
	light.shadow.camera.near = 0.5;
	light.shadow.camera.far = 500;

	scene.add( light );

    // Mesh
    mesh.material.needsUpdate = true
    mesh.castShadow = true;
	mesh.receiveShadow = true;

Interesting that pants, and body shadows look good compared to red shirts.

image

Looks like self-shadowing artifacts. Try to modulate light.shadow.bias in order to mitigate the problem. A value like around positive/negative 0.01 should be appropriate.

1 Like

Thanks! -0.005 this worked :slight_smile:

1 Like