Class NoiseSettings
This is an asset that defines a noise profile. A noise profile is the shape of the noise signal as a function of time. You can build arbitrarily complex shapes by combining different base perlin noise frequencies at different amplitudes.
The frequencies and amplitudes should be chosen with care, to ensure an interesting noise quality that is not obviously repetitive.
As a mathematical side-note, any arbitrary periodic curve can be broken down into a series of fixed-amplitude sine-waves added together. This is called fourier decomposition, and is the basis of much signal processing. It doesn't really have much to do with this asset, but it's super interesting!
Implements
Inherited Members
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
[HelpURL("https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/manual/CinemachineNoiseProfiles.html")]
public sealed class NoiseSettings : SignalSourceAsset, ISignalSource6D
Fields
OrientationNoise
The array of orientation noise channels for this NoiseSettings
Declaration
[Tooltip("These are the noise channels for the virtual camera's orientation. Convincing noise setups typically mix low, medium and high frequencies together, so start with a size of 3")]
[FormerlySerializedAs("m_Orientation")]
public NoiseSettings.TransformNoiseParams[] OrientationNoise
Field Value
Type | Description |
---|---|
TransformNoiseParams[] |
PositionNoise
The array of positional noise channels for this NoiseSettings
Declaration
[Tooltip("These are the noise channels for the virtual camera's position. Convincing noise setups typically mix low, medium and high frequencies together, so start with a size of 3")]
[FormerlySerializedAs("m_Position")]
public NoiseSettings.TransformNoiseParams[] PositionNoise
Field Value
Type | Description |
---|---|
TransformNoiseParams[] |
Properties
SignalDuration
Returns the total length in seconds of the signal.
Returns 0 for signals of indeterminate length.
Declaration
public override float SignalDuration { get; }
Property Value
Type | Description |
---|---|
float |
Overrides
Methods
GetCombinedFilterResults(TransformNoiseParams[], float, Vector3)
Get the noise signal value at a specific time
Declaration
public static Vector3 GetCombinedFilterResults(NoiseSettings.TransformNoiseParams[] noiseParams, float time, Vector3 timeOffsets)
Parameters
Type | Name | Description |
---|---|---|
TransformNoiseParams[] | noiseParams | The parameters that define the noise function |
float | time | The time at which to sample the noise function |
Vector3 | timeOffsets | Start time offset for each channel |
Returns
Type | Description |
---|---|
Vector3 | The 3-channel noise signal value at the specified time |
GetSignal(float, out Vector3, out Quaternion)
Interface for raw signal provider
Declaration
public override void GetSignal(float timeSinceSignalStart, out Vector3 pos, out Quaternion rot)
Parameters
Type | Name | Description |
---|---|---|
float | timeSinceSignalStart | Time at which to get signal value |
Vector3 | pos | The position impulse signal |
Quaternion | rot | The rotation impulse signal |