#### Archived

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

# normals

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

## Recommended Posts

I have my hieght map, and it''s rendering ok. However, I need to know how to generate normals for my landscape. Could someone please help out? Thanks, Jesse www.laeuchli.com/jesse/

##### Share on other sites
The cross product of two vectors created from the sides of a triangle gives the normal for the triangle. Pick the correct sides or you get the opposite direction.

One way to get your vertex normals is to sum the normals of all triangles that use that vertex. Then normalize the result.

If using Directx, the utility functions in D3DXMATH.H make things really easy.

##### Share on other sites
ok, thats what I''m doing wrong. I''m picking the wrong sides. How do I tell which order to pick which sides??

##### Share on other sites
The right hand rule, I think. Stick you hand out and put your thumb up. Your thumb is the desired normal and the wrapping of your fingers tells you the order to use the sides: counterclockwise.

I think that''s right.

1. 1
Rutin
36
2. 2
3. 3
4. 4
5. 5

• 12
• 14
• 9
• 9
• 14
• ### Forum Statistics

• Total Topics
633346
• Total Posts
3011444
• ### Who's Online (See full list)

There are no registered users currently online

×