"Smoothing" normals for terrain
All right. So I''ve created a stupid array of triangles, and render them (DX8.1). I have normals, however the normals for each triangle are all the same, so I have sharp angles of light between each triangle.
Firstly, what is the math (and small explanation in implementation) to make each normal the average of the ones around it?
Secondly, this is a "stupid" terrain. Any help with better implementations (index buffers, other stuff which I''ve read around here) would be very helpful, because I''ve yet to find an article that helps with terrain implementation.
- Cheers
I''''m not easily impressed.
Ooh! A blue car!
say three triangles share one vertex, that vertex has three normals...
a quick-and-easy way would be to take the numerical mean of the components of each vector [(x1+x2+x3)/3,(y1+y2+y3)/3,(z1+z2+z3)/3] then normalise
********
A Problem Worthy of Attack
Proves It''s Worth by Fighting Back
a quick-and-easy way would be to take the numerical mean of the components of each vector [(x1+x2+x3)/3,(y1+y2+y3)/3,(z1+z2+z3)/3] then normalise
********
A Problem Worthy of Attack
Proves It''s Worth by Fighting Back
secondly: assuming you''ve a heightmap for your terrain, it''s very easy to make triangle strips of it. just make a triangle strip of each row. don''t store the vertex data in an additional structure for the triangle strips but store the vertex indices...
GA
GA
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement