Trees | Indices | Help |
---|
|
The Blender.Noise submodule.
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])
|
|||
float |
|
||
3-float list |
|
||
|
|||
float |
|
||
3-float list |
|
||
float |
|
||
3-float list |
|
||
float |
|
||
float |
|
||
float |
|
||
float |
|
||
float |
|
||
float |
|
||
list |
|
||
float |
|
||
3-float list |
|
|
|||
readonly dictionary |
NoiseTypes =
The available noise types. |
||
readonly dictionary |
DistanceMetrics =
The available distance metrics values for Voronoi. |
||
__package__ = None
|
|
Returns a random floating point number."
|
Returns a random unit vector.
|
Initializes the random number generator.
|
Returns general noise of the optional specified type.
|
Returns noise vector of the optional specified type.
|
Returns general turbulence value using the optional specified noise 'basis' function.
|
Returns general turbulence vector using the optional specified noise basis function.
|
Returns Fractal Brownian Motion noise value (fBm).
|
Returns Multifractal noise value.
|
Returns Variable Lacunarity Noise value, a distorted variety of noise.
|
Returns Heterogeneous Terrain value.
|
Returns Hybrid Multifractal value.
|
Returns Ridged Multifractal value.
|
Returns Voronoi diagrams-related data.
|
Returns cellnoise.
|
Returns cellnoise vector/point/color.
|
|
NoiseTypesThe available noise types.
|
DistanceMetricsThe available distance metrics values for Voronoi.
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Oct 24 10:23:50 2008 | http://epydoc.sourceforge.net |