Advertisement Jump to content


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


vertex normal interpolation over a triangle?

This topic is 6579 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

I''m trying create a basic programm involving a landscape. Now I''ve created the landscape as a simple heightmap and calculate the averaged vertex normal for each vertex in the map. Now I want to calculate a normal at any point even between vertices, but I want to do this in a smooth way to put something like a vehicle on the terrain and use the normal to make it move around the terrain smoothly. But what''s the best way to interpolate the normal over a terrain triangle? I tried to do it in a way by calculating the distances from the intersection point to all the nearest vertices and using these as a kind of weights, but this doesn''t really seem efficient and there seem to be small anomalies (though this might just be a bug). If anyone could help I would be very greatfull.

Share this post

Link to post
Share on other sites
Guest Anonymous Poster

Just add up all the edge normals and take the average?

Share this post

Link to post
Share on other sites
sounds like Phong interpolation to me!

you''re doing what AlanKemp said and that''s about all i know of.

Phong interpolation is notoriously slow...

unless you''re using huge polys, there shouldn''t be any noticeable difference between using the face normal and the interpolated normal... If you''re using huge polys to approximate a surface, then you SHOULD use the facet normal.

I have no name that you may call me. I am merely Succinct.
~Succinct Demos Online~

-(Drop me a line here n''at)-

Share this post

Link to post
Share on other sites
Thanks for the replies!

I''m using it to create lightmaps and later to position vehicles on the terrain. I think just using the facet normals for the lightmaps would produce results that don''t look right, but since they are precalculated it doesn''t really matter to use a more ''labourous'' way.

Using the The Phong interpolation technique (like AlanKemp said) seemed to work, but I was still wondering, if all the terrain faces have about the same shape that''s like:

And if you keep the sides of equal length they are all the same and you basically keep repeating some of the same calculations over and over for each one, because it''s only the height of each vertex that changes, wouldn''t there be a way to precalculate some of it and have an easier (And more importantely) faster way of doing the rest?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!