POV-Ray : Newsgroups : povray.beta-test : Heightfield bug (most probably an inverted normals problem) : Re: More info Server Time
26 Apr 2024 16:56:10 EDT (-0400)
  Re: More info  
From: Warp
Date: 24 Jan 2002 07:51:51
Message: <3c500367@news.povray.org>

: I can be completly offtopic but could be normal determined by order of vertices
: in triangle?

  I didn't understand this.

  The problem is not determining the normal. The problem is just that if
the angle between the incoming ray and the normal vector returned by the
object have an angle <90 degrees, the normal is inverted.
  This works just fine in most cases (and it has to be done this way). The
only problem happens with smooth triangles and smooth heightfields in certain
cases.
  As for lighting, this problem goes away by making the object
double-illuminated (because then it doesn't matter which way the normal
is pointing). However, as for the slope pattern, the solution is not so simple
(double_illuminate is used only for lighting and can't be used for slope
pattern calculation).

  By the way: In a heightfield the problem with the slope y pattern goes
away if you "mirror" the color_map around 0.5 (of course it doesn't work if
the slope is anything else than y), besides making the heightfield
double-illuminated.
  With smooth meshes which use the slope pattern there's no currently fix,
AFAIK.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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