POV-Ray : Newsgroups : povray.pov4.discussion.general : Suggest v4.0 inbuilt f_popnrm_rnoise(). (yuqk R16 v0.6.10.0) Server Time
10 Dec 2024 06:42:23 EST (-0500)
  Suggest v4.0 inbuilt f_popnrm_rnoise(). (yuqk R16 v0.6.10.0) (Message 1 to 3 of 3)  
From: William F Pokorny
Subject: Suggest v4.0 inbuilt f_popnrm_rnoise(). (yuqk R16 v0.6.10.0)
Date: 1 Nov 2024 08:40:58
Message: <6724cc5a$1@news.povray.org>
About a year ago I was playing some with an idea for a facets normal 
perturbation.

Ref:

https://news.povray.org/povray.pov4.discussion.general/thread/%3C652b157c%40news.povray.org%3E/

As part of that work I mentioned using the population count opcode in 
most modern processors as part of a creating a normal-ish / 
sloppy-Gaussian distribution of not more than 64 values.

I had the thought at the time, we could probably extend the technique to 
random noise generation too.

Release (R16) of yuqk is adding a new inbuilt function called 
f_popnrm_rnoise(). Attached is an image of the +-1 noise created (no AA) 
and a histogram of the value distribution.

pigment {
     function { f_popnrm_rnoise(x,y,z,now,1) }
     function_interval
     color_map {
         [-1.0 rgb 0]
         [+1.0 rgb 1]
     }
}

The steps of the technique are certainly visible, but for a really fast, 
normal-ish, random, noise distribution - I think it will often be useful.

Bill P.

Hmmm, I wonder what happens if I use this directly as an isosurface 
function... To a first order, renders a noisy shape constrained by the 
container. Relatively quick, but HUGE max gradients need be ignored. :-) 
Mind running - what if we stick this noise only inside more usual shape 
functions or inbuilt shapes as part of a function. I bet they'd all show 
up... Anyhow. More play to be had I guess.


Post a reply to this message


Attachments:
Download 'f_popnrm_rnoise_story.png' (149 KB)

Preview of image 'f_popnrm_rnoise_story.png'
f_popnrm_rnoise_story.png


 

From: William F Pokorny
Subject: Re: Suggest v4.0 inbuilt f_popnrm_rnoise(). (yuqk R16 v0.6.10.0)
Date: 1 Nov 2024 15:11:12
Message: <672527d0$1@news.povray.org>
On 11/1/24 08:40, William F Pokorny wrote:
> Mind running - what if we stick this noise only inside more usual shape 
> functions or inbuilt shapes as part of a function. I bet they'd all show 
> up...

Attached an image where I filled text object characters with noise as a 
function for an isosurface. Here not that fast because the inside test 
for a single text string like "Halloween" is slow.

#declare Fn01 = function {
     pattern {
         bool_object {  // In POV-Ray proper this called 'object'
             text {     // yuqk has also list_object etc.
                 ttf "timrom.ttf" "Halloween"
                 0.15, 0.001
                 translate <-2.0,0,0>
             }
         }
     }
}
#declare Fn02 = function (x,y,z) {
     (Fn01(x*3,y*3,z*3) > 0.0)*f_popnrm_rnoise(x,y,z,now,1)
}

No real shape - just enough +-noise that the isosurface root finder 
finds plenty of roots.

Bill P.


Post a reply to this message


Attachments:
Download 'fillewithnoise.png' (78 KB)

Preview of image 'fillewithnoise.png'
fillewithnoise.png


 

From: William F Pokorny
Subject: Re: Suggest v4.0 inbuilt f_popnrm_rnoise(). (yuqk R16 v0.6.10.0)
Date: 2 Nov 2024 16:14:59
Message: <67268843@news.povray.org>
On 11/1/24 15:11, William F Pokorny wrote:
> No real shape - just enough +-noise that the isosurface root finder 
> finds plenty of roots.

Playing now and again with this idea. I wondered how the roots / 
surfaces bits from the 'random noise filling' would affect normals and 
finish. They still work in a noisy way. Interesting effects in any case.

Just a quilted normal used in the attached images. On my i3 the top 
image took about 20 seconds elapsed the bottom roughly 30 with mid to 
light AA and simple radiosity.

Bill P.


Post a reply to this message


Attachments:
Download 'filledwithnoise.png' (157 KB)

Preview of image 'filledwithnoise.png'
filledwithnoise.png


 

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