This documentation is for the free plugin Py4D in CINEMA 4D R11.5 and not for the C4DSDK of Python in CINEMA 4D R12. For R12, please visit PluginCafe.com

c4d.utils.noise.C4DNoise – a noise class

An important technique for generating procedural textures is the use of fractal noise.

class c4d.utils.noise.C4DNoise

Methods

static C4DNoise.__init__([seed=0])
Parameter:seed (int) – Noise seed.
Return type:Noise
Returns:A new noise object.
C4DNoise.CreateMenuContainer([bIncludeNone=False])

Creates a menu container with the different noise options available.

Parameter:bIncludeNone (bool) – Include the none option.
Return type:BaseContainer
Returns:Generated noise menu.
C4DNoise.InitFbm(lMaxOctaves, rLacunarity, h)

Initializes fractal brownian motion.

Parameters:
  • lMaxOctaves (int) – Max octaves.
  • rLacunarity (int) – Lacunarity
  • h (float) – H-Parameter
Return type:

bool

Returns:

Initializes fractal brownian motion

C4DNoise.Noise(t, two_d, p[, time=0.0][, octaves=4.0][, absolute=False][, sampleRad=0.25][, detailAtt=0.25][, repeat=0])

Samples a 2D or 3D noise.

Parameters:
  • t (int) –

    The noise Type: Noise Types

    Note

    Please use C4DNoise.InitFbm before you use one of the following noise types: NOISE_ZADA, NOISE_DISPL_VORONOI, NOISE_OBER, NOISE_FBM, NOISE_BUYA.

  • two_d (bool) – True for 2D Sampling, False for 3 Sampling
  • time (float) – Time.
  • octaves (float) – Octaves.
  • absolute (bool) – Return the absolute value.
  • sampleRad (float) – Sample radius.
  • detailAtt (float) – Detail attenuation.
  • t_repeat (int) – Must be 2^x - 1, where x = [1..10], i.e. one of 1, 3, 7, 15, 31, 63, 127, 255, 511, and 1023. A noise repeats itself in time every 1024 units. Using a smaller repeat the noise will repeat at an earlier time.
Return type:

float

Returns:

Noise sample.

C4DNoise.SNoise(p, lRepeat[, t=0.0])

Generate a periodic signed noise value.

Parameters:
  • p (Vector) – Noise coordinate.
  • lRepeat (int) – Must be 2^x - 1, where x = [1..10], i.e. one of 1, 3, 7, 15, 31, 63, 127, 255, 511, and 1023. A noise repeats itself in time every 1024 units. Using a smaller lRepeat the noise will repeat at an earlier time.
  • t (float) – The time.
Return type:

float

Returns:

Signed noise value, this is between -1.0 and 1.0.

C4DNoise.Turbulence(p, roctaves, basolute[, t=0.0])

Generate a turbulence value, this is a sum of multiple noises with different frequency.

Parameters:
  • p (Vector) – Turbulence coordinate
  • roctaves (float) – The number of octaves.
  • babsolute (bool) – True for absolute values.
  • t (float) – The time.
Return type:

float

Returns:

Noise sample.

C4DNoise.Fbm(p, rOctaves, lRepeat[, t=0.0])

Generate a periodic Fractional Brownian Motion value.

Note

Needs the call C4DNoise.InitFbm before.

Warning

The roctaves value must not exceed the value passed to C4DNoise.InitFbm but can be lower.

Parameters:
  • p (Vector) – The evaluation point.
  • rOctaves (float) – The octaves
  • lRepeat (int) – Must be 2^x - 1, where x = [1..10], i.e. one of 1, 3, 7, 15, 31, 63, 127, 255, 511, and 1023. A noise repeats itself in time every 1024 units. Using a smaller repeat the noise will repeat at an earlier time.
  • t (float) – The time
Return type:

float

Returns:

The fbm value.

C4DNoise.RidgedMultifractal(p, rOctaves, rOffset, rGain, lRepeat[, t=0])

Generate a periodic fractal function used for such things as landscapes or mountain ranges.

Note

Needs the call C4DNoise.InitFbm before.

Warning

The rOctaves value must not exceed the value passed to C4DNoise.InitFbm but can be lower.

Parameters:
  • p (Vector) – The evaluation point.
  • rOctaves (float) – The octave.
  • rOffset (float) – The zero offset, this controls the multifractality.
  • rGain (float) – The amplification of the fractal value.
  • lRepeat (float) – Must be 2^x - 1, where x = [1..10], i.e. one of 1, 3, 7, 15, 31, 63, 127, 255, 511, and 1023. A noise repeats itself in time every 1024 units. Using a smaller lrepeat the noise will repeat at an earlier time.
  • t (float) – The time.
Return type:

float

Returns:

The fractal value.

Noise Types

BoxNoise

Type: NOISE_BOX_NOISE

../../../../_images/BoxNoise.jpg

Blistered Turbulence

Type: NOISE_BOX_NOISE

../../../../_images/BlisteredTurbulence.jpg

Buya

Type: NOISE_BUYA

../../../../_images/Buya.jpg

Cell Noise

Type: NOISE_CELL_NOISE

../../../../_images/CellNoise.jpg

Cell Voronoi

Type: NOISE_CELL_VORONOI

../../../../_images/CellVoronoi.jpg

Cranal

Type: NOISE_CRANAL

../../../../_images/Cranal.jpg

Dents

Type: NOISE_DENTS

../../../../_images/Dents.jpg

Displaced Turbulence

Type: NOISE_DISPL_TURB

../../../../_images/DisplacedTurbulence.jpg

Electrico

Type: NOISE_ELECTRIC

../../../../_images/Elektrisch.jpg

FBM

Type: NOISE_FBM

../../../../_images/FBM.jpg

Fire

Type: NOISE_FIRE

../../../../_images/Feuer.jpg

Gas

Type: NOISE_GASEOUS

../../../../_images/Gas.jpg

Hama

Type: NOISE_HAMA

../../../../_images/Hama.jpg

Luka

Type: NOISE_LUKA

../../../../_images/Luka.jpg

Mod Noise

Type: NOISE_MOD_NOISE

../../../../_images/ModNoise.jpg

Naki

Type: NOISE_NAKI

../../../../_images/Naki.jpg

Noise

Type: NOISE_NOISE

../../../../_images/Noise.jpg

None

Type: NOISE_NONE

../../../../_images/None.jpg

Nutous

Type: NOISE_NUTOUS

../../../../_images/Nutous.jpg

Ober

Type: NOISE_OBER

../../../../_images/Ober.jpg

Pezo

Type: NOISE_PEZO

../../../../_images/Pezo.jpg

Poxo

Type: NOISE_POXO

../../../../_images/Poxo.jpg

Sema

Type: NOISE_SEMA

../../../../_images/Sema.jpg

Sparse Convolution

Type: NOISE_SPARSE_CONV

../../../../_images/SparseConvolution.jpg

Stupl

Type: NOISE_STUPL

../../../../_images/Stupl.jpg

Turbulence

Type: NOISE_TURBULENCE

../../../../_images/Turbulence.jpg

VLNoise

Type: NOISE_VL_NOISE

../../../../_images/VLNoise.jpg

Voronoi 1

Type: NOISE_VORONOI_1

../../../../_images/Voronoi1.jpg

Voronoi 2

Type: NOISE_VORONOI_2

../../../../_images/Voronoi2.jpg

Voronoi 3

Type: NOISE_VORONOI_3

../../../../_images/Voronoi3.jpg

Wavy Turbulence

Type: NOISE_WAVY_TURB

../../../../_images/WavyTurbulence.jpg

Zada

Type: NOISE_ZADA

../../../../_images/Zada.jpg