Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

MegaWires - Easy Dynamic Powerlines - Released

Discussion in 'Assets and Asset Store' started by SpookyCat, Dec 12, 2013.

  1. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083

    Introducing MegaWires
    MegaWires is an Editor extension that makes it very easy to add fully dynamic wires, cables or ropes to your games. Draw out your path and select your pole type from one of the 42 included or use your own pole objects and then with one click have full physics controlled wires strung between all the connections, even add a Wind object for even more realism.


    The system comes with various components that make adding dynamic wires, ropes or cables to your scene easy. You can either select your objects that already exist in the scene and then have wires created between them, or you can lay out a complete path and ask the system to position your selected pole object along that path, you are free to add extra path points or move points around and the system will automatically update the wires for you. If you are a user of our MegaShapes system you can even use the splines created in that package for positioning your poles. The system allows you to have the poles automatically snap to the surface of any objects that are under it and there are options for adding in variations to positioning, rotation etc to give just the look and feel you are after.


    There are helper scripts included that allow you to define wire connection points on any object, and you can define any number of connection points for complex wiring cases. Or you can use one of the different pole types included in the system, we have included 6 different pole objects each one with 7 different textures given a total of 42 different pole types to choose from. We have also added extra objects such as supports and two types of transformers to add extra detail to your scene. Those included poles come with wire connection points predefined so making fully dynamic wires in your scene is just a matter of a couple of clicks.


    Once you have your wires in the scene you can add the Wind object to allow those wires to sway and move realistically to add further interest to your project. You have complete control over the Wind force and direction as well as turbulence and strength and direction variations. Also included are two helper scripts to allow you to attach objects to your wires, so making it easy to add birds perched on the wires or to hang swinging rigid body objects that cause the wires to sag under the weight.


    The system uses a heavily optimized custom physics system for super fast performance, plus the system has a LOD system to allow you to disable any wire based on distance from the camera, but the system will automatically handle waking up of any wires that are sleeping if a pole they are attached to moves etc. And along with the meshing options you can have wires all over your scene with little or no CPU use making it suitable for mobile game projects as well.

    Included Objects
    Included with MegaWires are 6 different pole objects and for each one you can choose from one of seven different materials giving in total 42 different poles ready to be used in your scene, also included are some extra objects such as support poles and two different types of transformers you can add to your poles in the scene. We hope to add more objects and pylons to the system over time. All the included pole objects have wire connection points pre defined for you.


    Included Components
    As well as the 42 different pole prefabs included with the system comes with various scripting components to extend the functionality of the system or make the generation or wires and poles easier, below are links to the various included components that come with MegaWires.

    Features
    Some of the features of the MegaWires system, we plan on adding new systems and more features as well as more pole object types, textures and support objects.

    • Super Fast custom Physics
    • Works with All versions of Unity
    • 42 Pole Objects included, 6 pole types with 7 textures
    • Full source code
    • LOD system to disable wires
    • Automatic waking of physics on pole movement
    • Wind system with turbulence and variation
    • Attach Objects to Wires for swinging signs
    • Path Drawing system
    • Complete control over mesh creation
    • UV Mapping options
    • Have wires detach and attach themselves

    Buy Now and More Info

    MegaWires is in the Asset store now, more information plus complete docs on all parts of the system can be found on our Website The introductory early adopter price is $45. As with all our assets we will be releasing new features over time so any ideas or suggestions please let us know.

    Videos
    Quick and easy adding of poles and dynamic wires to your scene.


    Some of the Physics and Meshing options.


    Dynamic interaction and hanging objects.
     
    Last edited: Mar 11, 2017
  2. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Very cool, added to my wish list for sure. Can it handle ropes without endpoints? Like do they always need to be attached to a pole of some sort? or attached to 1 side for example?
     
  3. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    Thank you. In the inspector or from script you can disconnect any wire from either end to have it hang down and at any point reconnect it again. We are doing a proper demo scene to do some better tutorial videos and they will show the connection system.
     
  4. Andrew_atl

    Andrew_atl

    Joined:
    Sep 21, 2010
    Posts:
    103
    Awesome, this is exactly something that I wanted.
     
  5. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    Looks great, will you be adding high power pylon models in the future.
     
  6. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    Tony is working on other object types where wires, strings or cables are strung between them so I can do a better demo, high power pylons are on the list, and possibly cable car or ski lift pylons, have to see what he comes up with. You are off course free to make your own objects which the system can use, there is a helper script you can attach to your object where you define the various connection points for the wires, and the radius of the wire, then you just save that as a prefab and that's it.
     
  7. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    Nice, picked it up from the asset store. Was thinking a nice feature if possible would be to have chicken wire (crisscross wire) also.
    Would allow the creation of security type fence's between the poles.
    Also would it be possible to have a bard wire type cable?

    Cable cars would be a fantastic addition, look forward to them.
     
    Last edited: Dec 16, 2013
  8. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    @John G - Fences are something we are looking at doing in some form. Barbed wire is also on the todo list with a noise value to define how non straight the wire is and spacing option for the barbs.

    We have also just submitted an update to the asset store and on our website. This brings an improvement to the Plant Poles system where it will not preserve the existing wire params if you update the pole planter params, so before if you built a wire and then adjusted all the physics params etc then changed a pole planter way point those settings were reset, now they aren't making it much nicer to tweak things. Also if you had added you own child objects under the plant poles objects they were destroyed, now they aren't.

    Changes in v1.03

    • Wire window now shows arrows and spacing details.
    • Pole Planter now preserves wire settings if you change any settings on exisiting wire.
    • Pole Planter will only delete Wire objects from the children list so you can add your own child objects without them getting destroyed if you update the Pole Planter settings
    • Objects attached to planted poles will now work correctly if plant poles values change.
     
  9. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    Excellent looking forward to future updates.
     
  10. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    Just submitted a small update to MegaWires to the Asset Store, this fixes a problem when using the system with MegaShape splines. If you do have MegaShapes and would like to plant your poles along a spline then you just need to change the #if false to #if true in the MegaWirePlantPoles.cs and MegaWirePlantPolesEditor.cs scipts to enable that support. I also added the docs as a pdf to the asset.

    Changes in v1.04
    • Fixed the bug that stopped the poles being planted on MegaShape splines.
    • Added PDF docs file.
     
  11. GrooGadgets

    GrooGadgets

    Joined:
    Apr 2, 2009
    Posts:
    60
    Heya,

    I'm about to purchase Megawires and I would like to know if I can use this system as a "zipline" for my character in my game.

    I see that I can hang objects on the wire but i'd like to know if it's robust enough to move the object down the wire in realtime. Can I adjust the speed of the object rather than the alpha of the wire?

    I would also like to know if I can have my character jump while on the wire. The character would jump up and leave the wire then land back on the wire.

    Would I be able achieve all of these functions right out of the box?

    Cheers,

    Simon
     
  12. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    megagrave1.jpg
    If anyone would like to see an example of MegaWires being used in a game then take a look at Broken Window Studios Horror Experience game Grave, you can download a demo of the game from their website and if you like what you play you can help support the development of the game.

     
  13. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    A small update is now available in the AssetStore, this fixes a couple of small bugs and also adds support for our MegaFlow system to be used as a wind source for the wire movement
    Changes since v1.04
    • Added support for using MegaFlow sources as wind inputs MegaWireFlowWind.
    • Fixed the bug that stopped changes in the stretch value on the plant poles being passed to the actual wires.
    • Fixed warnings about obsolete methods in Unity 4.5 and 4.6
     
  14. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    Just submitted an update to the store, this brings optimized physics code for even better performance, and changes to make fully compatible with Unity 5.

    Changes v1.08
    • Optimized the physics code for nearly double the speed.
    • Made changes for Unity 5.
     
  15. cjrussel14

    cjrussel14

    Joined:
    Jun 20, 2014
    Posts:
    69
    hi,there's something wrong about my end, i follow the tutorial and whenever i add a wire a error occured and the wire is always colored pink

    MissingReferenceException: The object of type 'Transform' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object
     
  16. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    322
    Hi Chris,

    I have Megaflow deeply integrated in my game, and am very satisfied with how it works. I have been using it to define wind force over a large terrain, with a sampler to determine the vector3 at the player position and affect a craft in quite a specific way.

    For environmental feedback, I would quite like to have an object like a kite respond to the vector field in a manner consistent with wind. Would it be possible to 'tie it down' with a Mega Wire object, and then have the kite object affected by a Megaflow Rigidbody, resulting in equilibrium between the two?
     
  17. Pryzmeister

    Pryzmeister

    Joined:
    Jan 21, 2015
    Posts:
    26
    This looks great and i had no hesitation in purchasing for use in a huge world simulation project we are building currently. Unfortunately i have a problem i hope is caused by user error, although i did read the docs and watch the videos so fairly sure i am not doing something wrong.

    I lay down the path with plant poles easily enough, and also assign a pole and wire model and material accordingly.

    However when i go to adjust the spacing between the poles as they are too close, it just generates many many pole models following the path- it definately is not working as intended for me.

    The only way to fix this then is for me to delete them all, which is of course not the desired outcome.

    See attached image.
    This is with Unity 5.0.0f4
     

    Attached Files:

  18. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    @ddnharris - MegaFlow has an API where you can find out the flow direction and speed at any point in the flow so that could be used to control or influence a rigid body kite object. As for using MegaWires to attach a line to that I suspect that would need a little bit of changes to the script as it is expecting to link a couple of pole objects. Sorry for the delay in replying, the forum seems hit and miss about sending out new post emails.

    @Pryzmeister - That looks like you just have the pole spacing value too small, if you could submit a support ticket at the website with some more grabs of the inspector to show the settings or maybe a video showing the wires creation steps you are taking I will be able to see what is going on.
     
  19. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    Just submitted an update to the Asset Store and our website, this adds the option to choose raycast collisions for the wires, you can also select the layer mask and add a collision offset to keep your wires off any surfaces.

    v1.10
    • Added new collision option to use raycasts for better collisions with the world
    • Added layer mask option to raycast collsion to choose layers to hit.
    • Added offset value for the raycast collision system to allow you to raise the wires of hit surfaces.
     
  20. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    Submitted another small update to the asset store. This fixes an exception that was generated when working with poles with no wires, and we also optimized the wire physics code a little for better performance.

    Changes in v1.11
    • Fixed an exception when building poles with no wires attached.
    • Small optimization to the wire physics.
     
    John-G likes this.
  21. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    Another small update submitted this fixes the problem of poles not getting deleted when a pole object with no wire connections is used.

    Changes in v1.12
    • Fixed bug of poles not being deleted when a pole object with no wire connections is selected.
     
    John-G likes this.
  22. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    Another quick update, fixed a bug which meant you could not use the 'Run Physics' button on a wire system with a single span.

    Changes in v1.13
    • The Run Physics button will now work on a wire system with a single span.
     
  23. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    Another update, we have made MegaWires fully 5.4 compatible removing all the obsolete warnings etc. We have also fixed a problem if you made a prefab out of a wire set and added it back into a scene it would generate errors about a missing mesh, that now works correctly.

    Changes since v1.13
    • Adding a wire object that was made into a prefab to a scene will now work correctly.
    • Updated for all depreciated methods etc for Unity 5.3 and 5.4
     
  24. zeb33

    zeb33

    Joined:
    Nov 17, 2014
    Posts:
    91
    Hi, how do I create a wire between two objects? The instruction starts with 'once your wires are in the scene', is there a section entitled 'how to get started' or 'how to get a wire in the scene'?
    using unity5.5
    'add new wire' gives:
    ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: index
    System.Collections.Generic.List`1[MegaWireConnectionDef].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
    MegaWireEditor.OnInspectorGUI () (at Assets/MegaWire/Scripts/Editor/MegaWireEditor.cs:85)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1227)
    UnityEditor.DockArea:OnGUI()
     
  25. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    @zeb33 - If you could submit a support ticket at the website including the steps you are taking so we can recreate the issue that would be great.
     
  26. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    Just submitted a small update to the Assetstore which makes MegaWires fully compatible with the final release of Unity 5.6.

    Changes in 1.17
    • MegaWires made fully Unity 5.6 compatible
     
  27. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    Another small update submitted to the Assetstore, this makes MegaWires fully Unity 2017 compatible.
     
  28. drsmetamoto

    drsmetamoto

    Joined:
    May 8, 2017
    Posts:
    12
    Hi Chris,
    We are looking to use MW to recreate wire networks similar to the attached image. You'll see there are different connector types between wires. Is it possible to create multiple wire styles to achieve something similar in the image? thanks in advance, d Wires.jpg
     
  29. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    779
    Could this be used for something other than wires, for example dynamic pipework between two locations?
     
  30. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    @mimminito - I guess it could be used to create pipelines as well if you turned of the physics you would just need suitable replacements for the poles and you just add connector points to those. If you could post an example image of the kind of pipeline you are looking to create I could give a better more certain answer.
     
  31. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    779
    The idea is to place two objects in an environment and then connect those two (along a single plane) with conduit pipes. As you mentioned they would need to be rigid, and have corners at certain locations etc. Not sure if this would fit the scenario or if any of your other solutions would work?
     
  32. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    I think MegaShapes would probably be a better solution, you then use splines to control the pipeline and either use the basic spline to mesh option to turn the spline into a tube or use the advanced lofter to extrude any spline cross section along the length of the spline. One caveat is tight corners would not work well due to pinching in the inside radius, but we have users that use the spline meshing and lofter to connect junction pieces.
     
    mimminito likes this.
  33. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    779
    Thanks, good to know. I'll take a look and see if it can help.
     
  34. Hattoriseed

    Hattoriseed

    Joined:
    Feb 24, 2015
    Posts:
    23
    Is it possible to replace the wire with a Chain and still keep the physics from your system? I tried by creating a Material with a Chain Texture to fake the effect but it doesn't look good.
     
  35. Marcos-Elias

    Marcos-Elias

    Joined:
    Nov 1, 2014
    Posts:
    93
    I bought it today, it looks so beautiful!

    But... I had a huge problem. I must use Floating Origin (based on this script: http://wiki.unity3d.com/index.php?title=Floating_Origin ), because my project have a really large world. When floating origin moves the entire world all the wires disappear. If I turn some options off and on again manually in editor, they reappear... I also load scenes in runtime and reposition them to rearrange my terrain neighbors. Due to floating origin I cannot have fixed positions in world space for anything.

    How could I tell the script to regenerate the wires once floating origin has moved everything to a new position?

    I tried this:

    Code (CSharp):
    1.  
    2. var wiress = FindObjectsOfType(typeof(MegaWire));
    3. foreach(MegaWire w in wiress) {
    4.             try {
    5.                 //w.Rebuild = true;
    6.                 w.RebuildWire();
    7.             } catch {
    8.             }
    9.         }
    10.  
    And also this:

    Code (CSharp):
    1.  
    2. var megaw = FindObjectsOfType(typeof(MegaWirePlantPolesList));
    3.  foreach (MegaWirePlantPolesList x in megaw) {
    4.         try {
    5.             x.addwires = false;
    6.             x.addwires = true;
    7.         } catch {
    8.         }
    9. }
    10.  
    None of them worked. But if I change that options while in editor (manually in inspector), they reappear...

    This is crucial for me, otherwise I could not use this project... :(
     
  36. Marcos-Elias

    Marcos-Elias

    Joined:
    Nov 1, 2014
    Posts:
    93
    No way to support floating origin (a must for open world)? :( I still cannot use this asset due to this...
     
  37. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    621
    Any way to keep your chain of positioned waypoints from being reset when adding additional waypoints?
     
  38. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    621
    How do you re-sync wires to poles when they become separated after moving the poles? The wire's wireframe shows correctly between the poles after rebuilding, but the wire meshes end up somewhere else in the scene. Please advise.
     
  39. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,083
    Just submitted a small update to the Asset store this makes MegaWires fully compatible with Unity 2018.1 and 2018.2, we also added an option to rotate the wire mesh.

    Changes in v1.19
    • Added Rotation value to Mesh Params so you can easily rotate the wire mesh if needed.
    • MegaWires made fully compatible with Unity 2018
     
    John-G likes this.
  40. Marcos-Elias

    Marcos-Elias

    Joined:
    Nov 1, 2014
    Posts:
    93
    Do you know if it works with floating origin now? I wanted to use this a long time ago but just wasted time trying and cannot achieve it... When we move everything in the scene all wires disappear. How to avoid this? Or maybe make a static version once generated... It was too good to be true for my use, since my game relies on open world (so floating origin).
     
  41. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    +1 for a floating point fix.
     
  42. Tony-Lovell

    Tony-Lovell

    Joined:
    Jul 14, 2014
    Posts:
    93
    I also need a floating origin solution, or I can't really use this. Essentially, I need to be able to translate all objects by a given constant without ill physics effects, ala static void MegaWire.translateEverythingBy(Vector3 bump);

    Unlike any other motion of endpoints for wires in my game, this one should impart no momentum to the wires, as it does not signify a real motion - just a change in the frame of reference. e.g., the wires should not sway at all as a consequence of calling that function.
    tone
     
    Last edited: May 30, 2019
    Marcos-Elias likes this.
  43. Tony-Lovell

    Tony-Lovell

    Joined:
    Jul 14, 2014
    Posts:
    93
    Ok -- I have a major misconception, it seems. I am trying to use MegaWire to model cables and fairly taut ropes on a moving ship model. The endpoints for my rope are children of a Ship GameObject which is mimicking the movement of a physically-modeled ship, but the MegaRope's root ship itself isKinematic.

    A quick test with a single wire span shows that this does not "just work". The wire span does not follow its end-point GameObjects. The weird thing is that it appears to follow them at double their speed: if my ship moves forward at 10 knots, the wire span moves through the world at 20 knots.

    Is what I am trying to do possible with your asset?

    tone
     
    Last edited: May 30, 2019
  44. Tony-Lovell

    Tony-Lovell

    Joined:
    Jul 14, 2014
    Posts:
    93
    FYI, the Uservoice system does not work. It is impossible to submit an idea: you can type a string in the "I suggest you..." field and hit enter and precisely nothing happens. Tried this on Chrome and Safari
     
  45. PlayingKarrde

    PlayingKarrde

    Joined:
    Aug 19, 2013
    Posts:
    28
    I'm curious if it's possible to have realtime physics that react to collisions with this tool? It LOOKS like the physics sim is only run to get the wires into place and then baked, is that correct? I'm in need of an elastic type rope for my game and was hoping this would work but am not sure yet so hoping to find out a bit more before purchase.