I've tried creating noise expressions using noise(X,Y,Z)^x.
This causes weird flipping of the result. Anyone noise experts out there who have a better method for this?
Exponents in Noise Equations
3062 1 0- jacob clark
- Member
- 665 posts
- Joined: July 2005
- Offline
- Mario Marengo
- Member
- 941 posts
- Joined: July 2005
- Offline
jacob clark
I've tried creating noise expressions using noise(X,Y,Z)^x.
This causes weird flipping of the result. Anyone noise experts out there who have a better method for this?
The noise functions have an output range of approximately . This means that in your expression noise(x,y,z)^p there's about a 50% chance that you'll be trying to raise a negative number to some exponent. This will work for integer exponents but not necessarily for *all* real-valued exponents – the root of a negative number gives a complex number. Hscript's pow() function returns NaN for these cases:
/ -> echo `pow(-0.5,0.5)`
nan
So maybe try:
pow(abs(noise(x,y,z)),exponent) * sign(noise(x,y,z))
HTH.
-
- Quick Links