POV-Ray : Newsgroups : povray.advanced-users : smooth triangle Normal : Re: smooth triangle Normal Server Time
30 Jul 2024 12:32:41 EDT (-0400)
  Re: smooth triangle Normal  
From: Jerry Anning
Date: 9 Jun 1999 05:18:00
Message: <375e2dde.1343158@news.povray.org>
On Wed, 09 Jun 1999 01:07:27 -0400, Phil Clute <pcl### [at] tiacnet>
wrote:
>I'm curious as to what the "Phong normal interpolation" formula is.
>
>Actually I guess my real question is: 
>In a smooth_triangle you have a 'surface normal' vector. What is
>considered
>the NORMAL normal for each vertex? I really have no idea how to use this 
>part.
>I want to be able to average any given number of smooth_triangles who
>have
>a vertex at the same vector location,

Gouraud shading of triangles, a cheap and common method, interpolates
the color intensity at a point in the triangle from those at the
corners.  Phong shading, which is more work but looks better, just
linearly interpolates the surface normal between the corners which is
then used to calculate the shading at the point in the usual way.
This allows the appearance of the triangle to be more accurate.  In
particular, highlights can appear in the interior of the triangle with
Phong shading.  Note that this has nothing to do with Phong vs.
specular highlights.  That is something else entirely.
As to the other question, do it this way:
B  C
|   /
| /
A____D
| \
|  \
...  E

vnormalize(vcross(b-a, c-a)+vcross(c-a,d-a)+vcross(d-a,e-a)...)
Make sure that you are consistent in the sense (clockwise or
counterclockwise) in which you go around the vertex.

Jerry Anning
clem "at" dhol "dot" com


Post a reply to this message

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