POV-Ray : Newsgroups : povray.pov4.discussion.general : Suggest new v4.0 'spatial' normal{} perturbation. (yuqk R15 v0.6.9.0) Server Time
14 Oct 2024 07:10:20 EDT (-0400)
  Suggest new v4.0 'spatial' normal{} perturbation. (yuqk R15 v0.6.9.0) (Message 1 to 3 of 3)  
From: William F Pokorny
Subject: Suggest new v4.0 'spatial' normal{} perturbation. (yuqk R15 v0.6.9.0)
Date: 1 Jun 2024 11:11:26
Message: <665b3a1e$1@news.povray.org>
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'
spatialstory.jpg


 

From: William F Pokorny
Subject: Re: Suggest new v4.0 'spatial' normal{} perturbation. (yuqk R15 v0.6.9.0)
Date: 1 Jun 2024 11:22:58
Message: <665b3cd2$1@news.povray.org>
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'
wildwarp.jpg


 

From: William F Pokorny
Subject: Re: Suggest new v4.0 'spatial' normal{} perturbation. (yuqk R15 v0.6.9.0)
Date: 13 Jun 2024 19:29:06
Message: <666b80c2$1@news.povray.org>
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

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