Mesh not reacting to light

I do not usually ask questions in forums. I pride myself in looking though already answered questions but this has me beat. I am sure it is a setting or something that I have missed but the more i stare at it the less I am seeing.

I have a mesh that is the result of a obj import and a PointLight.

The pointLight will hit other objects in the scene and the MeshPhongMaterial reacts accordingly. However the imported mesh which has the same material does not react.

It is acting strange, I also have it set to wire-frame but it is not showing as such. There is something interfering with how the mesh is appearing.

I have tried:-

  • setting the skinning to true as this is something that was mentioned earlier today in a different question.
  • simplifying the model.
  • different light sources.
  • stopping the animation.

The code for the model and the material is below.

Any help would be greatly appreciated.
Kind Regards,

var meMaterial = new THREE.MeshPhongMaterial( { color: 0xdeafdb, specular: 0x9E4424 } );
meMaterial.skinning = true

// model
// instantiate a loader
var loader2 = new OBJLoader();

        	function ( object1 ) {
                //traverse through the options if it is the mesh option then set the material
                //display the mesh
                object1.traverse( function ( child ) {
        					if ( child.isMesh ) {
                                child.material = meMaterial; 
                                // = metexture;
                       = "sam";            
                                child.castShadow = true;
                                child.wireframe = true;
                                child.receiveShadow = true;
                                child.renderOrder = 0; 
                                scene.add( child);                               
        		          } );
		          //scene.add( object1 );    
	// called when loading is in progresses
	function ( xhr ) {console.log( ( xhr.loaded / * 100 ) + '% loaded' );	},
	// called when loading has errors
	function ( error ) {console.log( 'An error happened' );}
// end model

If I see it correctly, your “Sam” mesh’s geometry doesn’t have normal attribute (it has just position attribute).

So, in the object1.traverse() try to add child.geometry.computeVertexNormals();

1 Like


Thank you so much. This is all new to me, I have enjoyed getting my head around how it all works but i just couldn’t get to the bottom of this one.

Kind Regards,

You’re welcome :beers:

1 Like