Sign in to follow this  

normal vector and triangle strip

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi everybody,

i generate a map with this tuto [url="http://www.chadvernon.com/blog/resources/directx9/terrain-generation-with-a-heightmap/"]http://www.chadvernon.com/blog/resources/directx9/terrain-generation-with-a-heightmap/ [/url]and i generate the map with triangle strip but i want to calculate the normals on vertices but how calculate those normals?

Thx!

Share this post


Link to post
Share on other sites
Hello arkerone

Mainly the 3 steps are :

1) computation of [b][i]per face[/i][/b] normals (with the formula suggested by Vlad86)
2) computation of the adjacency data (so we know then : which vertex belongs to which faces(s) )
3) combination of per face normals accordingly to adjacency data to compute the wanted [b][i]per vertex[/i][/b] normals.

But there's not an unique technique to do the 3)
For instance, you can average the 1) normals, either directly, or taking into account the area of the triangles the vertices belong to.

Maybe you can take a look at [url="http://www.gamedev.net/topic/617512-terrain-normals-causing-diamond-shaped-artifacts/"]this post[/url]?

Nico

EDIT : The best results I got were when taking into account triangle areas : a little example with this technique
[attachment=7512:exemplepournormales.PNG]

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this