FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   multidimensional noise (what is it for?)
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: multidimensional noise (what is it for?)  (Read 483 times)
adm


multidimensional noise (what is it for?)
« on: Sep 12th, 2004, 2:36am »

hi,
 
I've been exploring perlin noise for the first time today. pretty exciting stuff. however, i noticed in the reference that the noise() function can generate one, two or three dimensional noise. i'm not really sure what this means since no matter what you feed it, noise() just returns one float.
 
can anyone explain what the purpose of two and three dimensional noise is? is there an example that illustrates the functionality? thanks.
 
-Aaron
 
rgovostes

rgovostes
Re: multidimensional noise (what is it for?)
« Reply #1 on: Sep 12th, 2004, 3:21am »

A "noise field" (I don't know what it's actually called) is generated the first time you call noise() (I think, I don't really know for sure), or change the noiseDetail() (again, a guess). This means that you are pulling different values from the field, so you get something which gradually changes.
 
If that clears anything up...
 
fry


WWW
Re: multidimensional noise (what is it for?)
« Reply #2 on: Sep 12th, 2004, 6:26pm »

the most popular is that using two dimensional noise you can make things like a simulated wood texture.. using three dimensional noise, you can make a solid block of cheezy simulated wood. i don't have an example offhand, but there oughta be something out there in computer graphics land..
 
so noise(x, y) would be a value at a specific 2d location, and noise(x, y, z) would give you a value for that 3d point in your solid texture.  
 
err, not that noise() is returning simulated wood textures.. it's that noise() returns a seed value that can be used for that sort of thing.
 
adm


Re: multidimensional noise (what is it for?)
« Reply #3 on: Sep 12th, 2004, 8:00pm »

thanks guys. actually, after looking through some other people's code, I discovered some of these uses of the multidimensional noise for myself. i'm still just experimenting at the moment, but I ran into an issue. In this applet: http://www.a2l2.com/~aaron/noiseCircle, I'm trying to use noise to give this circle a noisy perimeter, but there is a very obvious seam where the first point of the circle meets up with the last. Are there any strategies to make something like this seamless? thanks.
 
-Aaron
 
edit: oh and in this applet, the mouse x axis controls the magnitude of the noise and the mouse y axis controls the radius of the circle.
« Last Edit: Sep 12th, 2004, 8:02pm by adm »  
TomC

WWW
Re: multidimensional noise (what is it for?)
« Reply #4 on: Sep 12th, 2004, 8:32pm »

Currently, you're asking for noise which is dependent on the angle and the time elapsed.  If you use noise which is dependent on the 2D coordinates, and the time elapsed (ie 3D noise) then it *should* match up at the end.
 
Try:
Code:

    points[i].setLength( noise(points[i].x*0.005, points[i].y*0.005, millis()*0.002) * iMsx + 1 + iMsy/2);

instead of:
Code:

    points[i].setLength( noise(i*.02, millis()*.02) * iMsx + 1 + iMsy/2);

 
(Obviously you can try different multipliers as you see fit.)
 
The other way to do it is to use a certain amount of noise until halfway around, and then mirror it.
 
I think, if you try the 3D noise version, it will be symmetrical anyway, so there wouldn't be any advantage in mirroring it yourself.
 
adm


Re: multidimensional noise (what is it for?)
« Reply #5 on: Sep 12th, 2004, 8:54pm »

thanks tom. thats cool looking, but i am desperately trying to avoid symmetry. am i trying to do the impossible?
 
adm


Re: multidimensional noise (what is it for?)
« Reply #6 on: Sep 14th, 2004, 12:00am »

a friend of mine actually came up with a solution. the line of code ended up working out like this:
Code:
points[i].setLength( noise( (vPos.x+points[i].x)*0.01, (vPos.y+points[i].y)*0.01, millis()*.001) * 100 + 1 + iRad);

you can see the current state of the applet here: http://www.a2l2.com/~aaron/amoebas02/
 
toxi

WWW
Re: multidimensional noise (what is it for?)
« Reply #7 on: Sep 21st, 2004, 2:46pm »

here's an example video of a 3D noise volume rendered with ray marching (more info). you'll need a divX codec installed to watch the clip...
 
you can also use the 3rd dimension of 3D noise to create animations of 2D noise, simply by "moving along" the Z axis in noise space. eg. have a look at these clouds to see the effect.
 

http://toxi.co.uk/
Pages: 1 

« Previous topic | Next topic »