POV-Ray : Newsgroups : povray.general : image based normal maps? : Re: image based normal maps? Server Time
2 May 2024 09:10:10 EDT (-0400)
  Re: image based normal maps?  
From: Kenneth
Date: 21 Jan 2019 18:15:01
Message: <web.5c465208e20dd126cd98345b0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 21.01.2019 um 13:05 schrieb Kenneth:
>
> In the case of `bozo` this colour map has some ranges of "raw" pattern
> values where the colour (and thus the height value computed from it)
> remains constant, which correspond to the "plateaus".
>
> ...Its default colour map consists
> exclusively of plateaus, and the slopes are infinitely narrow. So as you
> increase the precision of the normal computations, the slopes will
> eventually vanish entirely, and you'll end up with a seemingly flat
> surface (because perturbed normals don't cast shadows)...

Yeah, I had an intuition that bozo's  flat RGB colors and sharp color borders
were at least one of the reasons for the 'plateaus' (plateux?), but I didn't
know how to put my fuzzy thoughts into words. You're much better at explanations
than I am ;-)

I'm still digesting your info, it's admittedly above my head at the moment (on a
higher plateau!)

My initial tests were actually with a continuous-tone color photo (as the
normals pattern), along with a bump_map-- then as a function normal instead, to
compare the two (which also showed the plateau difference.) THEN I chose bozo as
an 'in-built substitute' for using the color photo, to show the absolute
worst-case scenario. I wanted a *color* pattern rather than something grayscale
like bumps; but alas, POV's color patterns all have sharp color borders (bozo,
hexagon, etc.). I guess I could have made my own more 'continuous' color
pattern, but that didn't occur to me yesterday(!)

Anyway, I'm still a bit perplexed about the normals difference between the
following two constructs (using a continuous-tone color photo of your choice):

1)
box {<0, 0, 0>, <1, 1, 0.1>
pigment {rgb .5}
normal {bump_map {jpeg "my color photo.jpg" interpolate 2} bump_size 10}  }
....

and 2)
#declare NORM_FUNCTION =
function {pigment {image_map {jpeg "my color photo.jpg" interpolate 2} }}

box {<0, 0, 0>, <1, 1, 0.1>
pigment {rgb .5}
normal {function { NORM_FUNCTION (x, y, z).gray} bump_size 1.0}
....

The normals on box 1) look nice-- the 'expected' embossed appearance. Box 2)
shows the plateau effect (and the 90-deg 'quadrant' behavior)-- although it will
probably be more difficult to see when using a typical 'busy' photo. This is
what originally made me think that the image-to-FUNCTION process was the sole
cause.

But now I'm wondering if box 1's normals *also* have the plateaus and 90-deg
quadrants, just on a much smaller scale that can't readily be seen?

Your detailed explanation probably describes the reason(s) for the difference,
but I'm not yet grasping it...


Post a reply to this message

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