#### Archived

This topic is now archived and is closed to further replies.

# Lighting dont work properly cause of normals, what values?

This topic is 5600 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey I''ve got a square made of 4 points using TriangleStrip. When I bring my point light right up to it, it doesn''t light up. But my meshes that are right next to the square light up as i have called ComputeNormals on them. So I believe the problem is with the values i assigned to my normals for the four vertices. heres what my normals are.
ac.vertices3D[0].normal  = D3DXVECTOR3(0,1,0);
ac.vertices3D[1].normal  = D3DXVECTOR3(0,1,0);
ac.vertices3D[2].normal  = D3DXVECTOR3(0,1,0);
ac.vertices3D[3].normal  = D3DXVECTOR3(0,1,0);

what do you suggest i set my normals as? What i want is just for the light to be reflected back, so if i got a point light right next to my square i can see it, if im looking at it from any angle facing it.

##### Share on other sites
You''ve got your normals along the y-axis, I think what your looking for is (0,0,-1) for all vertices, that will (in a left handed system, which is what d3d uses) make your face "point" (for want of a better word) towards the negative z axis..

Dave.

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633734
• Total Posts
3013590
×