POV-Ray : Newsgroups : povray.general : f_noise_generator Server Time
29 Dec 2024 12:11:01 EST (-0500)
  f_noise_generator (Message 1 to 5 of 5)  
From: kurtz le pirate
Subject: f_noise_generator
Date: 14 May 2021 06:17:53
Message: <609e4e51$1@news.povray.org>
Hello,

I use "f_noise_generator" in the function définition of an isosurface.
I generate several isosurfaces in loops.


Does "f_noise_generator(x,y,z,g)" always return the same value or not?



-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: Bald Eagle
Subject: Re: f_noise_generator
Date: 14 May 2021 06:35:00
Message: <web.609e51b3733177711f9dae3025979125@news.povray.org>
kurtz le pirate <kur### [at] gmailcom> wrote:
> Hello,
>

> I generate several isosurfaces in loops.
>
>
> Does "f_noise_generator(x,y,z,g)" always return the same value or not?

It should, unless it somehow gets changed mid-scene.

Noise Generators
There are three noise generators implemented. Changing the noise_generator will
change the appearance of noise based patterns, like bozo and granite.

noise_generator 1 the noise that was used in POV_Ray 3.1
noise_generator 2 range corrected version of the old noise, it does not show the
plateaus seen with noise_generator 1
noise_generator 3 generates Perlin noise
The default is noise_generator 2

Note: The noise_generator can also be set in global_settings

https://wiki.povray.org/content/Reference:Pattern_Modifiers#Noise_Generators



Noise_generator
There are three noise generators implemented.

noise_generator 1 the noise that was used in POV_Ray 3.1
noise_generator 2 'range corrected' version of the old noise, it does not show
the plateaus seen with noise_generator 1
noise_generator 3 generates Perlin noise
The default is noise_generator 2

Note: The noise_generators can also be used within the pigment/normal/etc.
statement.

https://wiki.povray.org/content/Reference:Global_Settings#Noise_generator


Post a reply to this message

From: William F Pokorny
Subject: Re: f_noise_generator
Date: 14 May 2021 06:42:28
Message: <609e5414$1@news.povray.org>
On 5/14/21 6:17 AM, kurtz le pirate wrote:
> 
> Hello,
> 
> I use "f_noise_generator" in the function définition of an isosurface.
> I generate several isosurfaces in loops.
> 
> Does "f_noise_generator(x,y,z,g)" always return the same value or not?
> 

If all the arguments are the same, it should return the same value - to 
16 significant digits.

Bill P.


Post a reply to this message

From: kurtz le pirate
Subject: Re: f_noise_generator
Date: 14 May 2021 09:07:00
Message: <609e75f4$1@news.povray.org>
Thanks guys. That's what I thought :(

Bad news for me. I need to find a way to make the appearance of the 
isosurface more random.

Changing the generator in the loop does not change the appearance enough.


-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: Alain Martel
Subject: Re: f_noise_generator
Date: 14 May 2021 10:34:36
Message: <609e8a7c$1@news.povray.org>
Le 2021-05-14 à 09:07, kurtz le pirate a écrit :
> 
> Thanks guys. That's what I thought :(
> 
> Bad news for me. I need to find a way to make the appearance of the 
> isosurface more random.
> 
> Changing the generator in the loop does not change the appearance enough.
> 
> 
Easy.

Add :
#declare R = seed(0);

then, do this :

#local RX = rand(R)*100;
#local RY = rand(R)*100;
#local RZ = rand(R)*100;

Then, change your calls as follow :
f_noise_generator(x+RX,y+RY,z+RZ,g)

That way, the samplings for the function are jittered around, resulting 
in different objects.

Instead of using a random value, you could also use the intended 
displacement of the isosurface as an offset.

f_noise_generator(x+Location.x,y+Location.y,z+Location.z,g)

This will have an effect similar to applying a pattern to an union as a 
whole.

Then, in some cases, adding some random rotation can work great to make 
identical irregular objects look different.
Add
rotate<rand(R),rand(R),rand(R)>*360
before translating your objects to their final location.


Post a reply to this message

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