MegaWires Wind

Wind Component
The MegaWires Wind component allows you to add multiple areas of wind to your scene that will effect your wires. Each set of wires in the scene can either use the global wind strength and direction value or can be pointed at a MegaWires Wind object in the scene. Each wind component allows you to define strength and direction as well as variations in the strength and direction over time plus an option to add turbulence to the wind.

To create a Wind object in the scene either add the MegaWiresWind script to an object or go to the GameObject/Create Other/MegaWire/Wind menu.

Wind Params

Wind Params

Below is a breakdown of each param in the MegaWires Wind component.

Direction

The direction the wind would be blowing in if not effected by turbulence or direction variation.

Decay

How quickly the strength of the wind falls off from the centre of the wind object. This allows you to only influence a section of wires as opposed to the whole length.

Strength

The strength of the wind.

Type

The wind system currently supports two types of wind, planar which is the normal wind blowing in one direction, similar to say how a directional light works. The other option is Spherical so the wind force acts outwards from the centre, so here direction has no effect as the direction is calculated as from the mass of the wire to the wind position.

Turbulence

Instead of consistent direction and force for the wind you can ask to add some turbulence effects in, so for any given point in space the wind direction and strength could be very different depending on the values you set below. This gives a much more natural feel to the effect the wind as on any wires.

Frequency

How quickly the turbulence effect changes.

Scale

How much the wind direction and strength is effected by the turbulence.

Strength Noise

As well as turbulence you can add noise to the strength value so that you can have the strength fall and rise in a natural way over time.

Strength Scale

How much the strength can change over time.

Strength Freq

How quickly the strength value will change. High values means very quick changes, values near 0 will be more natural slower changes.

Dir Noise

As fpr the strength the direction of the wind can be changed over time.

Dir Scale

How much the wind direction can change over time, so a value of say 20 here will only allow a +-20 degree change in direction, 180 could mean the wind could come from any direction.

Dir Freq

How quickly the wind direction changes, lower values mean a slower change in direction.

Display Gizmo

The system has a gizmo to help you visualise the wind flow in the scene. Click this to turn it on. When on you will see a bunch of lines coming from boxes, this indicates the direction of the wind and the strength. There is a position handle you can use to change the gizmo position in the scene.

Gizmo Size

How big the gizmo should be, as the wind can vary at any point in the world you may want to make the gizmo cover your entire set of wires, so you can adjust the size here.

Divs

How many sample points the wind display is broken up into.

Giz Scale

You can use this to adjust the length of the lines from the gizmo.

Gizmo Col

The color of the wind gizmo.

Wind Component Video

Coming soon.

Wind Component Class

Below are the public members of the MegaWireWind class that you can control from script or via the Unity Animation system etc.

public class MegaWireWind : MonoBehaviour
{
    public float        decay;
    public float        turb;
    public float        strength;
    public MegaWindType type;
    public float        freq;
    public float        scale;
    public Vector3      force;
    public Vector3      gizmoSize;
    public int          divs;
    public bool         displayGizmo;
    public float        gizscale;
    public Vector3      gizmopos;
    public Color        gizmocol;
    public bool         dirnoise;
    public float        dirfreq;
    public float        dirphase;
    public Vector3      dirscale;
    public bool         strengthnoise;
    public float        strengthfreq;
    public float        strengthphase;
    public float        strengthscale;
}

You must be logged in to post a comment.