|
|
Reference:
https://news.povray.org/povray.unofficial.patches/message/%3C60a268da%241%40news.povray.org%3E/
The general idea with the 'spatial' normal{} perturbation pattern is to
use only spatial modifiers (warp, rotate, etc) to create various normal
perturbations. In other words, there isn't any inbuilt perturbation code
per se, but rather a few post treatments for the difference between the
true surface intersection point vs its spatially modified location.
It's an attempt to open the door for users to create normal patterns
based on spatial information in a way sort of like what happens when
scalar value patterns / functions are used in a normal{} block.
Currently, the only options are three 'type' values in 0,1 and 2.
Zero is the simplest treatment and basically the spatial difference
weighted by the bump_size.
One is more complicated and it allows bump_sizes much larger than 1.0
without inverting - so long as the values are not negative.
Two is like (1), but with additional code to prevent larger negative
bump_size values from inverting the normals (turning lit surface
contributions black).
Please see the attached files. With respect to the image: Obj_1 is shown
in the upper left, Obj_2 in the upper right, Obj_3 in the lower left and
Obj_4 in the lower right.
Lastly I'll add, 'spatial' is the most experimental of the new normal{}
perturbation patterns added of late. I've played with a larger
collection of 'spatial' difference treatments, but only these initial
three types 'feel' stable enough at this point.
Bill P.
Post a reply to this message
Attachments:
Download 'spatial.pov.txt' (4 KB)
Download 'spatialstory.jpg' (73 KB)
Preview of image 'spatialstory.jpg'
|
|
|
|
On 6/1/24 11:11, William F Pokorny wrote:
> It's an attempt to open the door for users to create normal patterns
> based on spatial information in a way sort of like what happens when
> scalar value patterns / functions are used in a normal{} block.
Another 'spatial' normal{} image using the following code:
#declare Nrml_0 = normal {
//spatial type 0 bump_size +0.3 // Left
spatial type 1 bump_size +1.5 // Right
warp { repeat x offset 1/3 flip y}
warp { repeat y offset 2/3 flip z}
warp { repeat z offset 0/3 flip x}
rotate <+22,+44,-43>
warp { repeat x offset 0/3 flip y}
warp { repeat y offset 1/3 flip z}
warp { repeat z offset 2/3 flip x}
rotate <-33,+22,-11>
scale 1/17
}
Bill P.
Post a reply to this message
Attachments:
Download 'wildwarp.jpg' (112 KB)
Preview of image 'wildwarp.jpg'
|
|
|
|
On 6/1/24 11:11, William F Pokorny wrote:
> Currently, the only options are three 'type' values in 0,1 and 2.
A quick note. I moved up a planned 'type' to 'ip_type' change to release
(R15) of the yuqk fork.
This affects yuqk's new 'spatial' perturbation syntax.
Bill P.
Post a reply to this message
|
|