{"id":4646,"date":"2013-12-05T15:48:58","date_gmt":"2013-12-05T15:48:58","guid":{"rendered":"http:\/\/www.west-racing.com\/mf\/?page_id=4646"},"modified":"2013-12-05T15:49:47","modified_gmt":"2013-12-05T15:49:47","slug":"megawires-wind","status":"publish","type":"page","link":"http:\/\/www.west-racing.com\/mf\/?page_id=4646","title":{"rendered":"MegaWires Wind"},"content":{"rendered":"<p><a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/megawindlines.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/megawindlines-1024x405.jpg\" alt=\"Wind Component\" width=\"640\" height=\"253\" class=\"aligncenter size-large wp-image-4651 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/megawindlines-1024x405.jpg 1024w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/megawindlines-300x118.jpg 300w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/megawindlines-680x269.jpg 680w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/megawindlines.jpg 1527w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nThe 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.<\/p>\n<p>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.<\/p>\n<p><a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/megawirewind.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/megawirewind.jpg\" alt=\"Wind Params\" width=\"259\" height=\"429\" class=\"alignright size-full wp-image-4648 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/megawirewind.jpg 259w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2013\/12\/megawirewind-181x300.jpg 181w\" sizes=\"(max-width: 259px) 100vw, 259px\" \/><\/a><\/p>\n<h3>Wind Params<\/h3>\n<p>Below is a breakdown of each param in the MegaWires Wind component.<\/p>\n<h4><strong>Direction<\/strong><\/h4>\n<p>The direction the wind would be blowing in if not effected by turbulence or direction variation.<\/p>\n<h4><strong>Decay<\/strong><\/h4>\n<p>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.<\/p>\n<h4><strong>Strength<\/strong><\/h4>\n<p>The strength of the wind.<\/p>\n<h4><strong>Type<\/strong><\/h4>\n<p>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.<\/p>\n<h4><strong>Turbulence<\/strong><\/h4>\n<p>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.<\/p>\n<h4><strong>Frequency<\/strong><\/h4>\n<p>How quickly the turbulence effect changes.<\/p>\n<h4><strong>Scale<\/strong><\/h4>\n<p>How much the wind direction and strength is effected by the turbulence.<\/p>\n<h4><strong>Strength Noise<\/strong><\/h4>\n<p>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.<\/p>\n<h4><strong>Strength Scale<\/strong><\/h4>\n<p>How much the strength can change over time.<\/p>\n<h4><strong>Strength Freq<\/strong><\/h4>\n<p>How quickly the strength value will change. High values means very quick changes, values near 0 will be more natural slower changes.<\/p>\n<h4><strong>Dir Noise<\/strong><\/h4>\n<p>As fpr the strength the direction of the wind can be changed over time.<\/p>\n<h4><strong>Dir Scale<\/strong><\/h4>\n<p>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.<\/p>\n<h4><strong>Dir Freq<\/strong><\/h4>\n<p>How quickly the wind direction changes, lower values mean a slower change in direction.<\/p>\n<h4><strong>Display Gizmo<\/strong><\/h4>\n<p>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.<\/p>\n<h4><strong>Gizmo Size<\/strong><\/h4>\n<p>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.<\/p>\n<h4><strong>Divs<\/strong><\/h4>\n<p>How many sample points the wind display is broken up into.<\/p>\n<h4><strong>Giz Scale<\/strong><\/h4>\n<p>You can use this to adjust the length of the lines from the gizmo.<\/p>\n<h4><strong>Gizmo Col<\/strong><\/h4>\n<p>The color of the wind gizmo.<\/p>\n<h3>Wind Component Video<\/h3>\n<p>Coming soon.<\/p>\n<h3>Wind Component Class<\/h3>\n<p>Below are the public members of the MegaWireWind class that you can control from script or via the Unity Animation system etc.<br \/>\n[cc lang=&#8221;c#&#8221;]public class MegaWireWind : MonoBehaviour<br \/>\n{<br \/>\n\tpublic float\t\tdecay;<br \/>\n\tpublic float\t\tturb;<br \/>\n\tpublic float\t\tstrength;<br \/>\n\tpublic MegaWindType type;<br \/>\n\tpublic float\t\tfreq;<br \/>\n\tpublic float\t\tscale;<br \/>\n\tpublic Vector3\t\tforce;<br \/>\n\tpublic Vector3\t\tgizmoSize;<br \/>\n\tpublic int\t\t\tdivs;<br \/>\n\tpublic bool\t\t\tdisplayGizmo;<br \/>\n\tpublic float\t\tgizscale;<br \/>\n\tpublic Vector3\t\tgizmopos;<br \/>\n\tpublic Color\t\tgizmocol;<br \/>\n\tpublic bool\t\t\tdirnoise;<br \/>\n\tpublic float\t\tdirfreq;<br \/>\n\tpublic float\t\tdirphase;<br \/>\n\tpublic Vector3\t\tdirscale;<br \/>\n\tpublic bool\t\t\tstrengthnoise;<br \/>\n\tpublic float\t\tstrengthfreq;<br \/>\n\tpublic float\t\tstrengthphase;<br \/>\n\tpublic float\t\tstrengthscale;<br \/>\n}[\/cc]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":4638,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/4646"}],"collection":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4646"}],"version-history":[{"count":2,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/4646\/revisions"}],"predecessor-version":[{"id":4653,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/4646\/revisions\/4653"}],"up":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/4638"}],"wp:attachment":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}