POV-Ray : Newsgroups : povray.binaries.images : smooth height_fields : Re: smooth height_fields Server Time
16 Aug 2024 16:20:31 EDT (-0400)
  Re: smooth height_fields  
From: Christopher James Huff
Date: 3 Mar 2002 20:47:08
Message: <chrishuff-49380E.20470703032002@netplex.aussie.org>
In article <3c82b7fd@news.povray.org>,
 "Alf Peake" <alf### [at] peake42freeservecouk> wrote:

> Its a bit late at night for me but do I understand that I could use
> trace() on a vertex and use the returned normal as an average for all
> other triangles in a mesh sharing that vertex? I'm referring to
> MegaPov, not 3.5 and just starting to play with generating triangles
> for the first time.

I'm not sure what you mean here...if you trace a ray directly at a 
vertex of a mesh, there is no way to predict which triangle it will hit. 
POV certainly won't pick all the possible triangles and average their 
normals for you. If the mesh is non-smooth, the returned normal will be 
the normal of any one of the adjacent triangles. You have to compute a 
normal yourself. The POV 3.5 macros can do it accurately because they 
have access to the geometry of the surface around each vertex, not just 
the vertices. Averaging the normals of the triangles around the point 
usualy produces acceptable results as well, but trace() won't be very 
useful for this.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

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