Results 1 to 2 of 2

Thread: Flat and Smooth Shade

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    3

    Flat and Smooth Shade

    i have drawn a shape using following parametric eqns:
    x=2(cos(a))^3(sin(0.5b))^5
    y=2(sin(a))^3(sin(0.5b))^5
    z=2(sin(0.5b))^5cos(0.5b)
    drawn using GL_QUAD_STRIP and 4 vertices. in 2 for-loops and it looks perfect in wire frame mode. however, when render in flat/smooth shade, only the wires have the effect and not the entire polygon. i know it has something to do with my normals but i dont know what exactly is wrong... i used the crossproduct formula in the redbook. anyone pls help and if need my code i will be glad to send to u... thks.

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

    Re: Flat and Smooth Shade

    Hi !

    Make sure you have the coordinates in the correct order for the strips, if you get them wrong some triangles/quads may have the wrong winding order and this can mess up the result.

    Mikael

Similar Threads

  1. Smooth lines which aren't able to be made flat
    By newbie_graphic_programmer in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-28-2013, 12:03 PM
  2. Smooth/Flat shading and Wireframe
    By maxxur in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 05-10-2009, 09:44 AM
  3. draw flat or smooth frame
    By banzai889 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-03-2003, 12:01 AM
  4. How to shade a flat surface? Very Noobie
    By UnderWear in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-21-2002, 01:29 AM
  5. when to use flat or smooth shading ???
    By tbjerman in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-22-2001, 11:26 PM

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