POV-Ray : Newsgroups : povray.general : f_noise_generator : Re: f_noise_generator Server Time
28 Jul 2021 00:49:11 EDT (-0400)
  Re: f_noise_generator  
From: Alain Martel
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-2021 Persistence of Vision Raytracer Pty. Ltd.