Results 1 to 6 of 6

Thread: vertex normals

  1. #1
    Guest

    vertex normals

    Hi, I want to use a Normal for each Point of my scene. Does anyone know how to calculate them? I've just worked with Normals for each Triangle, but that's not what I want ...
    THANX

  2. #2
    Junior Member Newbie
    Join Date
    Jun 2002
    Posts
    14

    Re: vertex normals

    Well actualy what is the good of those vertex normals , explain for beginner please..

  3. #3
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: vertex normals

    Hi !

    There are a number of ways to cheat, but still look's ok, have a look at the Graphics Gems code to have a look on how it can be done, there is an example of code that calculates the vertex normals for a mesh of polygons.

    Google should also give you a good set of hits.

    Mikael

  4. #4
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: vertex normals

    Originally posted by Tea:
    Well actualy what is the good of those vertex normals , explain for beginner please..
    Hi !

    If you have a sphere for example and just use surface normals (all vertex normals point in the same direction), you get a pretty ugly sphere (unless that's what you want) because you can see each triangle the sphere is built from.

    If you calculate vertex normals you get a smooth sphere (or at least it look's smooth to som extent). because it makes the colors behave like the triangle is a curved surface.

    You do this by modifing the vertex normals to average between the triangles that use that vertex.

    Mikael

  5. #5
    Guest

    Re: vertex normals

    Originally posted by mikael_aronsson:
    Hi !

    If you have a sphere for example and just use surface normals (all vertex normals point in the same direction), you get a pretty ugly sphere (unless that's what you want) because you can see each triangle the sphere is built from.

    If you calculate vertex normals you get a smooth sphere (or at least it look's smooth to som extent). because it makes the colors behave like the triangle is a curved surface.

    You do this by modifing the vertex normals to average between the triangles that use that vertex.

    Mikael


    Good example. But this not useful for objects like walls, floors(couse of their low count triangles).

  6. #6
    Senior Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Canada
    Posts
    173

    Re: vertex normals

    First you should have an ordered structure of your geometric data. I used half-edge data-structure: www.flipcode.com/tutorials/tut_halfedge.shtml

    After that just loop around each vertex, add all the normals of the adjacent polygons and then normalize it.
    Billy

Similar Threads

  1. Replies: 6
    Last Post: 04-14-2004, 10:07 PM
  2. face normals or vertex normals
    By infinitecmdz in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 02-21-2004, 07:29 AM
  3. vertex normals or face normals
    By infinitecmdz in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-20-2004, 09:35 AM
  4. is it possible to have vertex normals or even face normals using triangle strips nt
    By wildeyedboyfromfreecloud in forum OpenGL: Advanced Coding
    Replies: 63
    Last Post: 03-19-2002, 11:42 PM
  5. Face Normals vs. Vertex Normals
    By detzel in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 03-05-2001, 10:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean