POV-Ray : Newsgroups : povray.general : goraud shading Server Time
2 Nov 2024 15:25:00 EDT (-0400)
  goraud shading (Message 1 to 4 of 4)  
From: Chris Cera
Subject: goraud shading
Date: 19 Jan 2004 14:51:31
Message: <slrnc0oda7.n19.cera@queen.mcs.drexel.edu>
Is there a way to configure povray to do goraud shading?

smooth_triangle for mesh{} and setting normals for mesh2{} seem
to do phong shading.  For this particular picture, I'd rather
interpolate colors.  Is there an easy way to do this?

Thank you for any/all comments on this matter.

-- 
cer### [at] csdrexeledu                 http://www.cs.drexel.edu/~cera


Post a reply to this message

From: Christoph Hormann
Subject: Re: goraud shading
Date: 19 Jan 2004 15:08:59
Message: <i3qtd1-3p7.ln1@triton.imagico.de>
Chris Cera wrote:
> Is there a way to configure povray to do goraud shading?
> 
> smooth_triangle for mesh{} and setting normals for mesh2{} seem
> to do phong shading.  For this particular picture, I'd rather
> interpolate colors.  Is there an easy way to do this?

goraud shading is a technique specific to scanline renderers and since 
POV-Ray is a raytracer...

You might be able to get the result you are after with per vertex 
texturing:  http://www.povray.org/documentation/view/192/

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 11 Jan. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Warp
Subject: Re: goraud shading
Date: 19 Jan 2004 15:10:35
Message: <400c39ba@news.povray.org>
Chris Cera <cer### [at] csdrexeledu> wrote:
> Is there a way to configure povray to do goraud shading?

  No.

  There usually aren't any good reasons to perform gouraud shading.
In scanline renderers it's supported because in scanline rendering
gouraud shading is considerably faster than phong shading. However,
the result is usually not very realistic.
  In theory POV-Ray could support gouraud, but it would probably cause
more problems than it's worth (eg. how do you calculate the direction
of the reflected ray if the mesh is reflective?).

  You can define different colors for the vertices of a mesh and POV-Ray
will interpolate these colors, but there's no way of making POV-Ray to
calculate these colors automatically from the light sources.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Warp
Subject: Re: goraud shading
Date: 19 Jan 2004 15:11:43
Message: <400c39ff@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:
> goraud shading is a technique specific to scanline renderers and since 
> POV-Ray is a raytracer...

  Actually POV-Ray could do gouraud shading, but the benefits would be
dubious.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

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