Home | Trees | Index | Help |
|
---|
Module Noise
|
|
This module can be used to generate noise of various types. This can be used for terrain generation, to create textures, make animations more 'animated', object deformation, etc. As an example, this code segment when scriptlinked to a framechanged event, will make the camera sway randomly about, by changing parameters this can look like anything from an earthquake to a very nervous or maybe even drunk cameraman... (the camera needs an ipo with at least one Loc & Rot key for this to work!):
Example:from Blender import Get, Scene, Noise #################################################### # This controls jitter speed sl = 0.025 # This controls the amount of position jitter sp = 0.1 # This controls the amount of rotation jitter sr = 0.25 #################################################### time = Get('curtime') ob = Scene.GetCurrent().getCurrentCamera() ps = (sl*time, sl*time, sl*time) # To add jitter only when the camera moves, use this next line instead #ps = (sl*ob.LocX, sl*ob.LocY, sl*ob.LocZ) rv = Noise.vTurbulence(ps, 3, 0, Noise.NoiseTypes.NEWPERLIN) ob.dloc = (sp*rv[0], sp*rv[1], sp*rv[2]) ob.drot = (sr*rv[0], sr*rv[1], sr*rv[2])
Function Summary | |
---|---|
float |
Returns cellnoise. |
3-float list |
Returns cellnoise vector/point/color. |
float |
Returns Fractal Brownian Motion noise value (fBm). |
float |
Returns Heterogeneous Terrain value. |
float |
Returns Hybrid Multifractal value. |
float |
Returns Multifractal noise value. |
float |
Returns general noise of the optional specified type. |
float |
Returns a random floating point number." |
3-float list |
Returns a random unit vector. |
float |
Returns Ridged Multifractal value. |
Initializes the random number generator. | |
float |
Returns general turbulence value using the optional specified noise 'basis' function. |
float |
Returns Variable Lacunarity Noise value, a distorted variety of noise. |
3-float list |
Returns noise vector of the optional specified type. |
list |
Returns Voronoi diagrams-related data. |
3-float list |
Returns general turbulence vector using the optional specified noise basis function. |
Variable Summary | |
---|---|
readonly dictionary | DistanceMetrics : The available distance metrics values for Voronoi. |
readonly dictionary | NoiseTypes : The available noise types. |
Function Details |
---|
cellNoise(xyz)Returns cellnoise.
|
cellNoiseV(xyz)Returns cellnoise vector/point/color.
|
fBm(xyz, H, lacunarity, octaves, basis=1)Returns Fractal Brownian Motion noise value (fBm).
|
heteroTerrain(xyz, H, lacunarity, octaves, offset, basis=1)Returns Heterogeneous Terrain value.
|
hybridMFractal(xyz, H, lacunarity, octaves, offset, gain, basis=1)Returns Hybrid Multifractal value.
|
multiFractal(xyz, H, lacunarity, octaves, basis=1)Returns Multifractal noise value.
|
noise(xyz, type=1)Returns general noise of the optional specified type.
|
random()Returns a random floating point number."
|
randuvec()Returns a random unit vector.
|
ridgedMFractal(xyz, H, lacunarity, octaves, offset, gain, basis=1)Returns Ridged Multifractal value.
|
setRandomSeed(seed)Initializes the random number generator.
|
turbulence(xyz, octaves, hard, basis=1, ampscale=0.5, freqscale=2.0)Returns general turbulence value using the optional specified noise 'basis' function.
|
vlNoise(xyz, distortion, type1=1, type2=1)Returns Variable Lacunarity Noise value, a distorted variety of noise.
|
vNoise(xyz, type=1)Returns noise vector of the optional specified type.
|
voronoi(xyz, distance_metric=0, exponent=2.5)Returns Voronoi diagrams-related data.
|
vTurbulence(xyz, octaves, hard, basis=1, ampscale=0.5, freqscale=2.0)Returns general turbulence vector using the optional specified noise basis function.
|
Variable Details |
---|
NoiseTypesThe available noise types.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Aug 12 21:47:30 2004 | http://epydoc.sf.net |