POV-Ray : Newsgroups : povray.binaries.images : Documenting wrinkles normal pattern bias. v3.7/v3.8. : Re: Documenting wrinkles normal pattern bias. v3.7/v3.8. Server Time
12 Jun 2021 18:53:14 EDT (-0400)
  Re: Documenting wrinkles normal pattern bias. v3.7/v3.8.  
From: William F Pokorny
Date: 8 May 2021 08:02:00
Message: <60967db8$1@news.povray.org>
On 5/7/21 6:54 PM, Bald Eagle wrote:
> William F Pokorny <ano### [at] anonymousorg> wrote:
> 
> Following along in /source/core/material/normal.cpp
> 

As I was thinking aloud I was thinking about what the base normal 
perturbation pattern would see as in normal.cpp and what the base scalar 
value patterns would see in pattern.cpp.

You're right more is available "up the call" chain. I have some code 
partly done adding a new pattern to normal.cpp where I now pass more 
information down to the base pattern. I plan to test the 'pass a 3x 21 
vector' bit as an explicit normal perturbation via a function. We'll see.

Side tracked at the moment on some questions which popped to the surface 
as I worked on the code.

> 
> Not sure about the accuracy, and not clear why the pyramid is "biased".
> I had problems using the internal sum () function, but adding the 4 pyramid
> vectors by hand gave me <0, 0, 0> (out to 8 dec places) so I'm not sure what the
> bias would be.
> 

Bias comes from the fact it's a pyramid of four scalar value evaluations 
about the center intersection point (the evaluation point ie EPoint) and 
not the min of 8 samples (a cube, dual pyramid, dual +, or...) which I 
believe necessary for 'better balanced' sampling(1). The pyramid is 
getting used for performance reasons I'd bet - and maybe we continue to 
use it for this reason(2).

(1) - The reality is there are also biases coming in from shapes on raw 
normal. From isosurfaces, for example, where the raw normals are 
calculated with three + offsets for a 'leaning pyramid' with the EPoint 
at the 'pyramid top'. My belief today is in isosurfaces this is done to 
get the inside/outside surface normals pointing in the right direction 
with respect to the ray/surface intersection (the at zero value), but 
maybe that thinking is off?

(2) - What I've not done is look at how large the bias typically is by 
coding up alternatives and measuring it! A complication is results will 
be affected by the accuracy setting because often during pattern 
perturbations / turbulence the 3D gradients about the EPoint are not at 
all constant.

Bill P.


Post a reply to this message

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