Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dragon376

Smooth in open GL

This topic is 6247 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to have a "smooth" effect on a object created polygon by polygon. I have glShadeModel(GL_SMOOTH) but it seems that I need to do something else to have a smooth looking surface. NEED HELP Thanks Phil.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
What do you mean by smooth?
Perhaps normals averaging or texture filtering?

Share this post


Link to post
Share on other sites
You need to get the normals for every surface before OpenGL can take the polys and make them smooth.

------------------------------
Trent (ShiningKnight)
E-mail me
ShiningKnight Games (I had to make one up, to fit in with the rest of you )
Project: Writing tutorials and code for my OpenGL Game Programming series
OpenGL Game Programming Tutorials

Share this post


Link to post
Share on other sites
If you get 1 normal per surface on your mesh you''ll get a flat shading which isn''t exactly "smooth". If you get 1 normal per vertex on your mesh OpenGL will gouraud shade it making the mesh look all pretty and "smooth".

Share this post


Link to post
Share on other sites
GL_SMOOTH = Gouraud shading.

It''s up to you to give the code the good value to get the desired effect.

-* So many things to do, so little time to spend. *-

Share this post


Link to post
Share on other sites
If you use polygon normals, to calculate vertex normals loop through all vertices and calc the average normal vector for all polys the vertex is used in.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!