noise function..

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  03 March 2003
noise function..

ok guys, what am I doing wrong here, i'm putting this into the alpha gain..

file1.alphaGain = noise (0.04,0.1);

so I want it to vary between 0.04 and 0.1 but when I apply it, it gives it a value of -0.306, what's up with that?
  03 March 2003
i think noise returns the value from a static noise field (like a 3d texture).. for the same input you always geht the same output..

what you are looking for is
rand(0.04, 0.1)
i think


  03 March 2003
Quote: so I want it to vary between 0.04 and 0.1 but when I apply it, it gives it a value of -0.306,

Noise returns a value from -1 to 1. IŽd recommend checking the expressions docs when youŽre not sure about these things.

  03 March 2003
Just remember, Perlin noise (as represented in the noise function) and "white" noise, (also known as broad-spectrum noise, represented in the rand function) are NOT the same.

Perlin noise is pretty much low-pass-filtered white noise.

-- Mark
Mark R. Wilkins
author of MEL Scripting for Maya Animators
  03 March 2003
i used the noise function once in an expression. i used it as a way to get around animating an always moving tail on a ghostly figure. i loved it

  03 March 2003
well, I've kindof gotten it working now, I wanted to use the noise fucntion to give a more smooth interpolation between values rather than a rand function, because this is controlling a glow, and I wanted it to oscillate rather than flicker....but I figure it might be easier to key it and then set it to post infinity.... Thanks for the help guys!
  03 March 2003
If you want some continuity between frames( this is usually desirable ) then use noise. The inputs to noise are coordinates, not ranges, so you need to remap the output of noise ( -1 to 1 ) to your desired range. To animate noise you pass in a changing value into the input coordinates(like walking along a texture).

float $speed = 1.0; // speed of flickering
float $minValue = 0.04;
float $maxValue = 0.1;

file1.alphaGain = (noise( $speed * time )+1.0)*0.5 * ($maxValue-$minValue) + $minValue;

Note that this is only using a one dimensional noise. One can use two or three arguments to the noise function as well for 2 and 3D noises. Typically we use spacial values (x,y,z) or (u,v) as inputs to noises, but one can be creative and use time or other values that vary.

  01 January 2006
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 07:19 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.