Calculating a vertex normal



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 10/11/2006 at 03:41, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   9.6 
    Platform:      Mac OSX  ; 
    Language(s) :   C.O.F.F.E.E  ;

    ---------
    How do I calculate a vertex normal?
    Must I initialize a vector to 0,0,0 and then, for each vertex, run through all the polygons of the object, checking if the vertex is included in them and, if yes, add the surface normal to the initial vector. And, finally, normalize the vector?
    Anyway, how to I get a face normal?
    Thank you very much in advance.

    Rui Batista



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 10/11/2006 at 04:28, xxxxxxxx wrote:

    For a basic vertex normal calculation create an array for the normals of the same size as the point array. Then loop thru all polygons and add the surface normal for each point in the array. After that you normalize each normal in the array. Note that this will not give phongbreaks because for this you need a vertex normal for each vertex for each polygon. AFAIK you can't do this with COFFEE because you don't have access to the phongbreaks. For your own sake I would really recommend to get comfortable with C++ as it will make things easier and it is much more powerful.

    cheers,
    Matthias


Log in to reply