Normal for vertex, possible?
Hi, here''s what I would like to know: is it possible to calculate a normal for a vertex? and does it have any use?
thanks
ThunderMusic
you can normalize a vector and get a unit vector (unit normal ), but that is not a normal vector .
a unit vector(or unit normal) is a vector of length 1. So if you normalize a vector you''ll get a unit vector that has the same attributes with your vector but has a length of 1.
to calculate the unit vector u from a vector v:
u = v / |v|
a normal vector is a slightly different unit vector. its perpendicular to a plane . Since you need at least 3 points to define a plane, you can''t define a plane if you just have 1 vector. So you can''t calculate the normal of a vector.
VStrider.
a unit vector(or unit normal) is a vector of length 1. So if you normalize a vector you''ll get a unit vector that has the same attributes with your vector but has a length of 1.
to calculate the unit vector u from a vector v:
u = v / |v|
a normal vector is a slightly different unit vector. its perpendicular to a plane . Since you need at least 3 points to define a plane, you can''t define a plane if you just have 1 vector. So you can''t calculate the normal of a vector.
VStrider.
Yes you can. You take the average normal of all faces adjoining the vertex and renormalize. It''s used for lighting vertices in a "smooth" manner, since using face normals for lighting gives a "gem stone" sort of effect.
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
thx Paradigm Shifter for correcting me. Obviously I still have lots of things to learn on 3D graphics.
VStrider.
VStrider.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement