Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Calculating a vertex normal

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 147 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post