POV-Ray : Newsgroups : povray.binaries.images : Gouraud shading Server Time
14 Aug 2024 17:56:31 EDT (-0400)
  Gouraud shading (Message 1 to 3 of 3)  
From: Zeger Knaepen
Subject: Gouraud shading
Date: 11 Sep 2002 10:09:35
Message: <3d7f4e9f@news.povray.org>
using a different texture for each vertex in the mesh :)
Same pigment, diffuse 0, and an ambient-value to simulate gouraud-shading.

cu!
--
camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local C=0
;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1
;#end#end L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
<.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x)               // ZK http://www.povplace.be.tf


Post a reply to this message


Attachments:
Download 'gouraudshading.jpg' (10 KB)

Preview of image 'gouraudshading.jpg'
gouraudshading.jpg


 

From: Zeger Knaepen
Subject: Re: Gouraud shading
Date: 11 Sep 2002 10:14:28
Message: <3d7f4fc4@news.povray.org>
...and the phong-shaded version :)

cu!
--
camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local C=0
;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1
;#end#end L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
<.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x)               // ZK http://www.povplace.be.tf


Post a reply to this message


Attachments:
Download 'phongshading.jpg' (10 KB)

Preview of image 'phongshading.jpg'
phongshading.jpg


 

From: Wolfox
Subject: Re: Gouraud shading
Date: 13 Sep 2002 11:09:35
Message: <3d81ffaf@news.povray.org>
Very interesting. I think it's a great way to explain Gouraud and Phong 
shading to people who are new to Computer Graphics. All in all, great work!

BTW, Phong shading gives much less artifacts and looks better overall 
(IMHO). I didn't know that for sure but now it makes perfect sense.

Regards!

Zeger Knaepen wrote:
> ...and the phong-shaded version :)
> 
> cu!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.