c4d.utils.noise

class c4d.utils.noise

Types

Functions Signatures

c4d.utils.noise.Noise(p[, t])

Generates a noise value.

c4d.utils.noise.SNoise(p[, t])

Generates a signed noise value.

c4d.utils.noise.PNoise(p, d, dt[, t])

Generates a periodical noise value.

c4d.utils.noise.WavyTurbulence(p, t, oct, start)

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

c4d.utils.noise.Turbulence(p, oct, abs[, t])

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

Functions Documentation

c4d.utils.noise.Noise(p, t=0.0)

Generates a noise value.

Parameters
  • p (c4d.Vector) – The noise coordinate.

  • t (float) – The time.

Return type

float

Returns

The noise value, between 0.0 and 1.0.

c4d.utils.noise.SNoise(p, t=0.0)

Generates a signed noise value.

Parameters
  • p (c4d.Vector) – The noise coordinate.

  • t (float) – The time.

Return type

float

Returns

The signed noise value, this is between -1.0 and 1.0.

c4d.utils.noise.PNoise(p, d, dt, t=0.0)

Generates a periodical noise value.

PNoise() is based on SNoise():

import c4d



NOISERES = 1024

pnoise = c4d.utils.noise.SNoise(c4d.Vector(p.x * NOISERES / d.x, p.y * NOISERES / d.y, p.z * NOISERES / d.z))

Parameters
  • p (c4d.Vector) – The noise coordinate.

  • d (c4d.Vector) – The period.

  • dt (float) – The time period.

  • t (float) – The time.

Return type

float

Returns

The periodical noise value.

c4d.utils.noise.WavyTurbulence(p, t, oct, start)

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

Parameters
  • p (c4d.Vector) – The turbulence coordinate.

  • t (float) – The time.

  • oct (int) – The number of octaves.

  • start (int) – The start value.

Return type

float

Returns

Turbulence value, this is between -1.0 and 1.0.

c4d.utils.noise.Turbulence(p, oct, abs, t=0.0)

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

Parameters
  • p (c4d.Vector) – The turbulence coordinate.

  • oct (int) – The number of octaves.

  • abs (bool) – True for the absolute value.

  • t (int) – The time.

Return type

float

Returns

The turbulence value, between -1.0 and 1.0 unless abs is true, in which case it will be between 0.0 to 1.0.