POV-Ray : Newsgroups : povray.off-topic : Outgunned : Re: Outgunned Server Time
6 Sep 2024 17:18:10 EDT (-0400)
  Re: Outgunned  
From: scott
Date: 26 Jan 2009 06:06:06
Message: <497d991e$1@news.povray.org>
>> That's part of what the whole Phong shading stuff is about, yes, if I 
>> have the right term?  Where you don't shade the entire polygon the same, 
>> but rather weigh each pixel's color based on the colors at the corners of 
>> the triangles and the distance of the pixel from the corners?

In the old days, yes :-)

> Yes, you interpolate the surface normal between the corners to fake a 
> curved surface. A bit like normal maps allow you to fake ripples, cracks, 
> bumps and so forth.

Yes, nowadays the *normal* is calculated by interpolating the normal from 
each corner of the triangle, then lighting is worked out per pixel.  This 
means a small specular highlight will show up perfectly on a huge single 
triangle, in the old days this was impossible to achieve just by 
interpolating colours from the corners.  The result is that lighting (and in 
particular specular highlights) look much more realistic without the need 
for huge numbers of triangles, and as Invisible said it allows you to modify 
the normal per-pixel to achieve bumps and rough surfaces etc.

> - If you smooth out all the surface normals, you now can't have sharp 
> edges where they're supposed to be sharp.

Well don't smooth out all the normals then, select some to leave sharp!


Post a reply to this message

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