Jump to content
  • Advertisement
Sign in to follow this  
DarkMatter2008

Gouraud shading.

This topic is 3404 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

Hello all, Just tried my hand at Gourand shadding from a formula found on a lecture slide here:- http://local.cis.strath.ac.uk/teaching/ug/classes/52.359/lect13.ppt This was my result:- http://i459.photobucket.com/albums/qq319/y_s_wheeler/brokenshading.jpg Does this formula take for granted the vector order? I have experimenting with this, here is a better result:- http://i459.photobucket.com/albums/qq319/y_s_wheeler/brokenteappot2.jpg Does anybody know whats going on?> Thanks in advance. Update Rotation along the z axis changes the shading. despite the source i've read saying gouruad shading is rotationally inveriant with triangles. [Edited by - DarkMatter2008 on January 25, 2009 12:12:58 PM]

Share this post


Link to post
Share on other sites
Advertisement
Perhaps I'm wrong, but IIRC Gouraud interpolates the illumination calculated on each vertex using the respective normal. If the normal is not shared and is truly perpenducular to the plane of the polygon it belongs to, the results are similar to your pictures. Or I didn't fully understand your issue.
Hope this helps...

Share this post


Link to post
Share on other sites
The light intensities of the verticies were not the issue as they were calculated from the resulting lighting average of the polys that share it. I found that equation in a number of books which was recomended to be used with triangles, in one book it clamed that the resulting shading was rotational invarient, but as you see with the examples i have shown this is not the case. I decided to go with this method of Gouraud shading here:-

http://freespace.virgin.net/hugo.elias/graphics/x_polygo.htm

Part of the shading process is combined with the scan converter, the light intensities for left and right of the scan are calculated along with the line. Then when it comes to shading the poly it becomes a simple process of working out the gradient of the shade from left to right. This result has worked the best for me.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!