Noise CHOP

From TouchDesigner 088 Wiki

NoiseCHOP 03.jpg


The Noise CHOP makes an irregular wave that never repeats, with values approximately in the range -1 to +1.

It generates both smooth curves and noise that is random each sample. It uses the same math as the Noise SOP.

You can create several curves with different shapes, and you can adjust period, amplitude, harmonics and more.

Optionally, an input can be connected. It is assumed that the input contains 1 to 3 channels representing X, Y and Z coordinates of points in space, and are used to sample anywhere in 3D noise space. One index in the input produces one sample in the output.

All noise functions work identically with Time Slicing on and off, with the exception of Harmonic Summation and Brownian whose methods cannot be limited to 1 in Time Slice mode. When the Timeline wraps around to frame 1, the noise functions will continue uninterrupted.

PythonIcon.png noiseCHOP_Class

Parameters - Noise Page

Type - The noise function used to generate noise. The functions available are:

  • Sparse - Produces high quality, continuous noise based on Sparse Convolution.
  • Hermite - Quicker than Sparse, but produces lower quality noise.
  • Harmonic Summation - Sparse noise with the ability to control the frequency step of the harmonics. Slowest type.
  • Brownian - Works like a bug in random flight. With Num of Integrals at 2, its acceleration is changed randomly every frame.
  • Random - (White Noise) Every sample is random and unrelated to any other sample. It is the same as "white noise" in audio.
  • Alligator - Cell Noise

Seed /seed - Any number, integer or non-integer, which starts the random number generator. Each number gives completely different noise patterns, but with similar characteristics.

Period /period - The approximate separation between peaks of a noise cycle. It is expressed in Units. Increasing the period stretches the noise pattern out.

Period is the opposite of frequency. If the period is 2 seconds, the base frequency is 0.5 cycles per second, or 0.5Hz for short. Hz refers to Hertz, the electrical and audio engineer of the 19th century, not the car guy.
If the Type is set to Random, setting this to zero will produce completely random noise. Otherwise, the period should be greater than zero.

Harmonics /harmon - The number of higher frequency components to layer on top of the base frequency. The higher this number, the bumpier the noise will be (as long as roughness is not set to zero). 0 harmonics give the base shape.

Harmonics with a base frequency of 0.1Hz will by default produce harmonics at 0.2Hz, 0.4Hz, 0.8Hz, etc. (up to the number of harmonics specified by the Harmonics parameter).

Harmonic Spread /spread - The factor by which the frequency of the harmonics are increased. It is normally 2. A spread of 3 and a base frequency of 0.1Hz will produce harmonics at 0.3Hz, 0.9Hz, 2.7Hz, etc.. This parameter is only valid for the Harmonic Summation type.

Roughness /rough - Controls the effect of the higher frequency noise. When roughness is zero, all harmonics above the base frequency have no effect. At one, all harmonics are equal in amplitude to the base frequency. When roughness is between one and zero, the amplitude of higher harmonics drops off exponentially from the base frequency.

The default roughness is 0.5. This means the amplitude of the first harmonic is 0.5 of the base frequency, the second is 0.25, the third is 0.125. The harmonics are added to the base to give the final shape. The Harmonics parameter and the Roughness parameter must both be non-zero to see the harmonic effects.

Exponent /exp - Pushes the noise values toward 0, or +1 and -1. (It raises the value to the power of the exponent.) Exponents greater than one will pull the channel toward zero, and powers less than one will pull peaks towards +1 and -1. It is used to reshape the channels.

Num of Integrals /numint - Defines the number of times to integrate (see the Area CHOP p. 114) the Brownian noise. Higher values produce smoother curves with fewer features. Values beyond 4 produce somewhat identical curves. This parameter is only valid for the Random noise type.

Amplitude /amp - Defines the noise value's amplitude (a scale on the values output).

Parameters - Transform Page

Translate / Rotate / Scale / Pivot - The Translate, Rotate, Scale and Pivot parameters let you sample in a different part of the 3D noise space. Imagine a different noise value for every XYZ point in space. Normally, the Noise CHOP samples the noise space from (0,0,0) along the X-axis in steps of 2/period. /tx /ty /tz /rx /ry /rx /sx /sy /sz /px /py /pz

By changing the transform, you are translating, rotating and scaling the line along which the Noise CHOPs samples the noise space. A slight Y-rotation is like walking in a straight path in the mountains, recording your altitude along the way, then re-starting from the same initial location, walking in a slightly different direction. Your altitude starts off being similar but then diverges.

Parameters - Constraints Page

Constraint /constrstart /contstrend /constrnean - Constraint and its parameters allows the noise curve to start and/or end at selected values. The mean value may also be enforced. Note: This only works when Time Slice is Off because time slicing has no pre-determined start/end.

Normalize - Ensures that all noise curves fall between -1 and 1. Applied before the Amplitude parameter. Only valid for Random and Harmonic Summation noise types, since Hermite and Sparse noise are always normalized. Normalizing random noise occurs between integrations, producing a more controlled curve. Note: This only works when Time Slice is Off because time slicing has no pre-determined start/end.

Parameters - Channel Page

By typing multiple names into the Channel Name field, multiple noise channels are created. Each channel has a unique seed, so all channels will be different with the same parameter settings.

You can generate many channels at once: chan[1-4] creates chan1 chan2 chan3 chan4. See Pattern Expansion.

All parameters on this page specify the format of the channels to be filled with noise, and act the same as the Channel page in the Wave CHOP. For more information see Channel Page.

CHOP Inputs

Optionally, an input with one to three channels can be connected as an input to the CHOP. The input is interpreted as X Y and Z coordinates where the noise space is to be sampled. If there are less than two channels, the missing channels are assumed to be 0. This position can be manipulated with the matrix as well.

Normally the noise is sampled along the X-axis in an XYZ noise space. You can sample anywhere in XYZ.

Standard Options and Local Variables

Local Variables:

$I - The current index.
$C - The current channel (0 to NC-1).
$NC - The total number of channels.
$S, $E - The start and end indices of the noise curve.