POV-Ray : Newsgroups : povray.beta-test : Heightfield bug (most probably an inverted normals problem) : Re: Heightfield bug (most probably an inverted normals problem) Server Time
8 Dec 2023 18:14:38 EST (-0500)
  Re: Heightfield bug (most probably an inverted normals problem)  
From: Warp
Date: 22 Jan 2002 10:53:08
Message: <3c4d8ae3@news.povray.org>
I have looked a bit at the heighfield code, but the reason of this inverting
is not as simple as I thought. There doesn't seem to be anything like:

  if(angle_between(incoming_ray, normal) < 90)

(this is pseudocode, not actual C code used in povray :) )

or at least I didn't find anything like that. If there's this kind of
inversion, it's quite hidden in some formula used in the code.
  Although the heightfield normal calculation code is rather simple, it's still
rather tricky to understand what exactly is done.
  I'll try to study it more.

#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.