MD Package Technical & APi Documentation
MDM_MeshNoise :: MD_ModifierBase
Namespace: MDPackage.Modifiers
Perlin noise generator with vertical and spatial features.
Read more here (Online documentation slide)
Properties
// SpatialNoise - takes the entire mesh into account (XYZ), VerticalNoise - takes only the Y axis into account
public NoiseType CurrentNoiseType { get; set; }

public float NoiseAmount { get; set; }
public float NoiseSpeed { get; set; }
public float NoiseIntensity { get; set; }
Public Methods
// Process vertical noise manually
public void MeshNoise_UpdateVerticalNoise()
// Process spatial noise manually
public void MeshNoise_UpdateSpatialNoise()
Examples
The following paragraphs contain Mesh Noise modifier used in a practical example.
using UnityEngine;
using MDPackage.Modifiers;

[RequireComponent(typeof(MeshFilter))]
public class SampleScript : MonoBehaviour
{
private MDM_MeshNoise noise;

private void Start()
 {
  // Add/Create a noise modifier to this object right after start
  noise = gameObject.AddComponent<MDM_MeshNoise>();
  // Update current modifier every frame
  noise.MbUpdateEveryFrame = true;
  // Otherwise it can be updated manually by calling...
  // noise.MDModifier_ProcessModifier();
 }

private void Update()
 {
  // Sample noise
  noise.NoiseIntensity = Mathf.Sin(Time.time * 2.0f) * 0.75f;
  // Sample extension - if space is pressed, increase the vertex count if possible
  if (Input.GetKeyDown(KeyCode.Space))
   noise.MDModifier_SubdivideMesh();
  // Sample extension - if R is pressed, restore mesh to its original state
  if (Input.GetKeyDown(KeyCode.R))
   noise.MDModifier_RestoreMesh();
 }
}