Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Released] Mega-Fiers. A mesh deformation system - RELEASE

Discussion in 'Assets and Asset Store' started by SpookyCat, May 18, 2011.

  1. brianasu

    brianasu

    Joined:
    Mar 9, 2010
    Posts:
    369
    Do the morphs get updated every frame in an Update loop? I've noticed some performance degradation on iPad3 when there are many active morphs. Is it possible to get the morphs only updating when changed. Also if you have a morph with multiple channels is it required to update all those channels when modifying just one?

    Thanks
     
  2. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi There
    Yes while the modify object component is enabled the morphs will continue to update. I was going to add in some code to automatically not update but there were s many ways in which a modified object could be updated that adding all the code and checks for every modifier and every case was getting very messy so I decided that the best person to decide when to turn off the system was the user, so if you have a morphing object that doesnt change then just disable the modify object using the Enable param. As for multiple channels only those with a non zero percent will be calculated and added into the morph, so if all channels are zero no action is taken.

    Hope that helps.
    Chris
     
  3. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    I have been busy working on the new MegaShapes system recently but have managed to do a little update to MegaFiers, this is mainly improvements to the shape editing code and a rework of the Undo system which just wasn't working properly, so now all the modifiers, spline editing, FFD editing should have properly working Undo and Redo. Surprised no one grumbled about that :) Anyway version 1.92 should be in the Asset Store now.

    And in case you haven't seen the videos on the new upcoming MegaShapes system the latest video is below.
     
    Last edited: Mar 1, 2013
  4. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    A little sneak peek at a new modifier I am dabbling with for a future update.
     
    Last edited: Mar 1, 2013
  5. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    There must be a wee blockage in the submission system, still pending approval on v1.92, it is usually instant but been a day so far, hopefully the blockage will clear soon.
     
  6. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Latest version is in the Asset Store now :)
     
  7. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Wow Chris this looks great! Any idea when it will roll out?
     
  8. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Not really sure, it's a spare time thing really as I get MegaShapes ready for release. But it is a fun one, got some issues to work around but sculpting with meshes is fun.
     
  9. brianasu

    brianasu

    Joined:
    Mar 9, 2010
    Posts:
    369
    Thanks for the quick reply. Would it work if you placed code in so only when the percent of the morph is changed it would update?
     
  10. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Well yes that could be done but then that is just as easily done by the user of the system as they are the ones setting or changing the morph values. I wanted to keep the system is flexible as possible for scripters and the various ways in which people approach the issue of updates, some have added code to stagger updates say every 2nd frame for some objects, every 3rd or 4th for others. Other approaches are turning of modifiers for objects a certain distance away, or only turn them on for the 4 closest. So the reasoning was I didn't want to clog the system up with a load of checks on every value when users would be caching changes themselves or adopting out strategies better suited to their game. But if an automatic disabling system is wanted then I will surely have a ponder about the best approach :)

    On another note done another quick tutorial video on the twit modifier, more coming.
     
    Last edited: Mar 1, 2013
  11. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hump Modifier Tutorial
     
  12. droderick

    droderick

    Joined:
    Aug 25, 2008
    Posts:
    169
    Hi Chris,
    Was wondering if there might be support for C4D spline exports into unity along with PCA data - kinda similar to what you've going on with Max. I'd be happy to help provide any C4D files/docs which would help you achieve such a thing. Lemme know and thanks!

    d
     
  13. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    I would like to extend the the spline exporting to other packages, I am looking at adding support for illustrator files as well so photoshop could be used to generate splines. The problem is the amount of time it takes to learn the SDK of new packages, I spent nearly a week a while back learning the Lightwave SDK and currently I cant spare that kind of time.
    Chris

    Taper Tutorial
     
    Last edited: Mar 1, 2013
  14. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Just submitted a small update to the store, brings improvements to the spline and FFD handle code and a new modifier in Curve Sculpt which allows you to define a complex deformation via curves for offsets and scaling in each axis.

    v1.94 Changes

    • Fixed a bug in the SetKnot method where tangents weren't being set.

    • Added Curve Sculpt Modifier

    • Spline handles no longer scale with the object

    • FFD handles no longer scale with the object

    • Improvements to the Spline and FFD handle code
     
  15. Evil-Dog

    Evil-Dog

    Joined:
    Oct 4, 2011
    Posts:
    134
    Hey there, amazing add-on to unity, I have an issue right now. I have a FBX, I put it in the scene, add the Modify Object and Morph to the appropriate object, load the morph file, it all works, but I put that whole object into a prefab. When I drag back the prefab in the scene, the mesh in the mesh filter is lost for the child that has the morph on it. Ever seen that issue?
     
  16. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi Evil-Dog
    Glad you are liking the system. The Unity prefab system was not designed to work with meshes that can change (apart from skinned meshes but they have a different system internally for that) so that is why I added the Mesh Copy, Copy Object and Copy Hier methods to the system which allow you to create copies of modified objects easily in the scene. I still need to do the docs for those as they are still in Beta but they seem to be working well for people and I guess we can call them ready.

    You problem does sound a little different in the mesh being lost, I haven't seen that before but due to the general prefab issue I guess I haven't had much chance to see it, I will have a look today and see if I can recreate the issue and find out what is going on.
    Chris
     
  17. Trikona23

    Trikona23

    Joined:
    Oct 29, 2011
    Posts:
    26
    Hi chris.

    Ive been looking at buying megafiers but need a few questions answering.
    Is it possible to do something like a bouncing rubber ball ,wherin I could use a stretch or FFD and have the gizmo orient to the collision surface normal and perform a squash at that point?
    Is there something available that can lag vertices? ( i.e that stretches fast accelerating objects ?)
    Is it possible to do something like an eleastic band(hinged at 2 points like a catapult ) that can propell objects with the rope system?
    can all of these system be used in combination with skinned meshes?

    Also how long before the collision deformer is added to the package?

    thanks in advance
     
  18. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi Manticor
    Yes doing the bouncing ball thing is part of the reason the system exists to allow such deformations to be done to meshes in a dynamic way, it will take a little scripting but I did do for example a bouncing ball helper script in the system that shows how a stretch could be used to give a squashing effect on an object.

    Also the lagging effect is also covered by the 'Rubber' modifier which allows you to add secondary motion to a mesh weighted by either vertex selection modifiers or by vertex color data. Again a video of this is on the channel.

    The catapult could probably be done with the Rope deform modifier indeed, I haven't actually tried to do that but it has a full physics core so no reason why it couldn't.

    All the modifiers work on normal or skinned meshes and I hope to have the collision deformer ready in a week or so, busy getting MegaShapes together so that will have an effect of that time frame.
    Chris
     
    Last edited: Mar 1, 2013
  19. Trikona23

    Trikona23

    Joined:
    Oct 29, 2011
    Posts:
    26
    Thanks for the quick reply Chris

    I did see the bouncing example before my only concern was being able orient the deformation gizmo to orient to a collision normal.If this is possible to do then you have yourself another customer.
    Do you have any plans for a modo exporter for exporting splines an morph targets?
     
  20. Trikona23

    Trikona23

    Joined:
    Oct 29, 2011
    Posts:
    26
    oh one other thing.Would it be possible to do something like a rubber grappling hook.Where a character could shoot out an elastic rope which sticks to a surface and then be able to swing on it and then detach ...all on the fly?
     
  21. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    All the modifiers have Gizmo transform values so you can translate rotate and scale the effect, so you would need to code a little script to find the Gizmo Rot value which would be a Lookat from the collision point to the centre of the mesh and you would set that for the duration of the squash effect, you may also need to change the Gizmo position to the collision point as well.

    Eventually I do want to add exporters for most packages, but each package takes a fair chunk of time as I have to learn the 3d package and then learn the SDK to get access to the data so it can be a 2 or 3 week process, so tricky to find the time, I have been investigating parsing FBX files but again that is a chunk of work. So answer is I hope to but not sure when. But off course if anyone knows any coders with knowledge of a package then I can give out a code snippet that shows the format for the mor files, it is a very simple format.
     
  22. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Just wanted to say if you have 3ds max, you can always try and recreate the effect in there to check before you buy so to speak, if you can achieve the result you are looking for in a comparable modifier in Max then it will work in MegaFiers.
     
  23. Trikona23

    Trikona23

    Joined:
    Oct 29, 2011
    Posts:
    26
    thanks for the info Chris.

    Yes I can do it in max no problem so should be able to do it with your system aswell as it looks like its based on max's system.
    Thanks for the help.

    From the looks of it you only need to add a modeling system to your package list and we probably wouldn't need an external package at all...
     
  24. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    In my own version of the Unity NinjaCamp (just me) I added a new modifier to the MegaFiers suite, this one is a Curve Sculpt modifier which gives a lot of control to the artist. This video is a first look at the WIP modifier that will be in the next update of MegaFiers, this allows you to sculpt the entire mesh or regions of it with curves, this allows for complete control over the deformation and an easy way to deform just parts of a mesh. This would be the ideal base for say an Avatar customizing system or vehicle upgrades such as flared arches or bonnet bulges. The system works of a layer based approach and each layer can be disabled and also its contribution to the end result can be weighted so allowing even finer control over customizing a mesh in a game.
     
    Last edited: Mar 1, 2013
  25. Evil-Dog

    Evil-Dog

    Joined:
    Oct 4, 2011
    Posts:
    134
    Thanks for the quick reply SpookyCat

    Were you saying that Mesh Copy, Copy Object and Copy Hier woudl fix my problem? If so how? Should I include the mesh in the prefab somewhere else and copy the mesh for the morph to work on it? Can you elaborate on these methods?

    The steps I described are pretty straight forward I hope it'll do the same thing for you. The mesh on which the moprh is applied isn't lost, just, unassigned I guess.

    For my app, it's pretty important that the morph is maintenained in a prefab somehow, because eventually they'll be in Asset bundles, do you know if that's supported? Have you tried it?

    Thanks a bunch
     
  26. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Yay more new stuff for the asset that keeps on giving. That looks a very useful modifier, though I am looking forward to the collision deform one.
     
  27. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @Evil Dog - I hope to have a page on the web site explaining this very soon, I am also working on a rewrite of some of the core to try and do a work around for the whole prefab and mesh instances issues to make the problem just go away, so I will keep you posted on this.

    Super busy getting MegaShapes ready for release as well at the moment. I also hope to get a little update released with the Curve Sculpt beta modifier in for people to try.
     
  28. Evil-Dog

    Evil-Dog

    Joined:
    Oct 4, 2011
    Posts:
    134
    Ok cool, thanks for your hard work.
     
  29. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Version 1.97 in the Asset Store now. This release sees the inclusion of the new Curve Sculpt modifier which gives an amazing amount of control over a deformation, it makes use of layers so allowing many different curves to be applied in different ways, and allows each layer to be used on the whole mesh or confined to a user defined region. The shape system has seen a little work as a result of the work being done on MegaShapes, both systems will share a common shapes core so as more work is done on MegaShapes the MegaFiers shape system will see some of the benefits for free.

    I have also added a WIP script to allow FFD lattice points to be animated via the Unity Animation system. To use add the FFD Animate script to an object with a FFD modifier on it, and when you are wanting to setup an animation make sure the 'Record' box is checked, and then un check it when you are finished recording. The one issue with the system is Unity seems very very slow recording for objects with a lot of exposed params, playback is no problem though.

    Changes in v1.97:

    • Add support for FFD lattices to be animated via the Unity Animation system

    • Curve Sculpt modifier now has layers of curves

    • Curve Sculpt modifier can now be limited to regions of a mesh

    • Can add and delete curves to a shape

    • Shape editor allows you to select the curve to edit

    • Improvements to Shape editing and inspector
     
  30. Screenhog

    Screenhog

    Joined:
    Jul 2, 2009
    Posts:
    498
    Is there a way to make the Morph Animator sliders extend beyond 0-100? The Mega Morph script supports ranges beyond 0-100, but I haven't found a way to make the Morph Animator extend beyond that.
     
  31. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Sorry about that, I will get that fixed today.
     
  32. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Ok I have updated the Morph Anim script to use the min and max values of the channel its animating, it will be in the next update, if you need it sooner pm or email :)
     
  33. Screenhog

    Screenhog

    Joined:
    Jul 2, 2009
    Posts:
    498
    It's not urgent... if you're planning to update within the next two weeks, I can wait. Thanks for the quick response!
     
  34. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    The next update should be sometime this week, hopefully coinciding with the beta release of MegaShapes.
     
  35. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Just submitted version 1.98 to the asset store.

    Change in v1.98:

    • Made sliders in Morph Animate script match the min max limits of the channel they control

    • Added Copy Object and Copy Hierarchy button to the Inspector to allow creation of new objects that will modify interdependently

    • FFD Gizmos now respect the Modify Object Draw Gizmo value

    • Copying FFD components now works correctly.
     
  36. payneb25827

    payneb25827

    Joined:
    Jun 6, 2012
    Posts:
    4
    Hi Chris,

    Just purchased Mega-Fiers and tried to import into a new scene. I'm getting the following namespace errors:

    Assets/Mega-Fiers/Scripts/MegaFiers/Modifiers/MegaDisplaceWebCam.cs(9,16):
    error CS0246: The type or namespace name `WebCamTexture' could not be found.

    Assets/Mega-Fiers/Editor/MegaFiers/MegaModifierEditor.cs(5,2): error CS0246:
    The type or namespace name `CanEditMultipleObjects' could not be found.

    Assets/Mega-Fiers/Editor/MegaFiers/MegaModifierEditor.cs(5,2): error CS0246:
    The type or namespace name `CanEditMultipleObjectsAttribute' could not be
    found.

    Is there any work around for these errors? We are running unity 3.1 and due to government policies we cannot update to the current version right now. Any help is much appreciated, Thanks!
     
  37. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi There
    I did send you an email about this, guess it didnt get through the security. For 3.1 you should be able to delete the source files that use the webcam so the MegaDisplaceWebCam and the MegaDisplaceWebCamEditor cs files. And just delete the CanEditMultipleObjectsAttribute where ever it shows up and you should be good to go.
     
  38. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    With the last updates I I get, between others, this error:

    Assets/Mega-Fiers/Editor/MegaFiers/MegaFiersWindow.cs(279,135): error CS1502: The best overloaded method match for `ModBut.ModBut(string, string, System.Type, UnityEngine.Color)' has some invalid arguments
     
    Last edited: Jun 6, 2012
  39. payneb25827

    payneb25827

    Joined:
    Jun 6, 2012
    Posts:
    4
    Hi Chris,

    Thanks for your quick reply. I didn't get the email, probably because I used my government email. I applied the suggested fixes, and I am getting similar errors to those that angel_m mentioned above me.

    Assets/Mega-Fiers/Editor/MegaFiers/MegaDisplaceEditor.cs(16,54): error CS1502: The best overloaded method match for `UnityEditor.EditorGUILayout.ObjectField(string, UnityEngine.Object, System.Type, params UnityEngine.GUILayoutOption[])' has some invalid arguments

    I tried commenting some of these lines of code out, and gives me many more CS1502 errors. Please help! Thanks
     
  40. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Very odd not getting any errors here for that, have you got the file WalkRope.cs. When you say 'between others' what others would they be?
     
  41. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @payneb25827 - Arr Texture2D would appear to be something new since 3.1. I do have an older version 1.83 which should work fine, you will be losing out on some of the newer modifiers and fixes but if its mainly the morphing you are looking to use I can send that over, if you email/pm me with your invoice number and maybe an email I can get through on I can sort that out for you. How did you manage to get the bersion you have if you are still on 3.1, the asset store doesnt let you get packages for older versons of Unity to avoid just these kind of problems :)
     
  42. payneb25827

    payneb25827

    Joined:
    Jun 6, 2012
    Posts:
    4
    Hi Chris,

    Thanks for your help! I sent you an email with my contact information and the invoice number from the purchase today.
     
  43. NanoMobile

    NanoMobile

    Joined:
    Jun 8, 2012
    Posts:
    4
    Great Work ! Awesome ! Thank YOU VERY MUCH ! Yesterday I purchased this project ... Can YOU HeLp me PLEASE with SOFT BODY ? Can Soft Body in Mega-Fiers collide with all physic objects in a world game ? Can I attach RigidBody Component to SoftBody ? Can you please give us more info tutorials (from SCRATCH) ? Thank YOU VERY MUCH ! Sorry for my bad english ... Success !!!
     
  44. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi There, if you are talking about the Rubber Modifier then that is really meant as a system to provide secondary motion to objects, there is a softbody system in the pipeline but if you are using the Rubber modifier then yes it can still collide with other objects, you can even update the mesh collider if you want (can be slow depending on mesh density).

    Can you say a little about what you are trying to do with the system then I can maybe guide you a little better,
     
  45. NanoMobile

    NanoMobile

    Joined:
    Jun 8, 2012
    Posts:
    4
    I'm trying Stretch Modifier with BallBounce Script to make soft body like in this video http://www.youtube.com/watch?v=AJw4b0x4PME&feature=BFa&list=PLB3E66886C652F648 (and i want this soft body will collide with all physic objects), can you help me please ? I want to make 2d soft body like in this video http://www.youtube.com/watch?feature=endscreen&NR=1&v=gHPDJS74F70 , can YOU HELP me please with this Soft Body ? Is YOUR AWESOME Mega-Fantastic Modifiers can do such a thing ? Thank YOU VERY MUCH !!!
     
  46. NanoMobile

    NanoMobile

    Joined:
    Jun 8, 2012
    Posts:
    4
  47. tonycoculuzzi

    tonycoculuzzi

    Joined:
    Jun 2, 2011
    Posts:
    301
    Hey SpookyCat. This addon is at the top of my to-buy list, but I've got one question before I do. If I apply the megafier (bend, to be specific), will it bend all the children of the bending GameObject?

    This is a feature I desperately need for a project I'm working on and I'm really hoping Mega-Fiers can do the job.

    Hope to hear from you soon! :)
     
  48. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @NanoMobile - If you are looking to to full Gish type softbody then you will either need to code your own modifier or wait till I can get back to my softbody and cloth test modifiers. It wouldnt take much to do a 2d system and I do have a complete softbody system and pressure based softbody system I did years back for a 3ds Max plugin. I plan on getting all the softbody systems into Unity either as modifiers or as part of the MegaMesh system that is coming soon.
    [video=youtube;d07Kv1VkeHM]http://www.youtube.com/watch?v=d07Kv1VkeHM

    @Tonzie - Currently I still need to finish of the modify group code, it is in there but very untested at the moment so cant say it works. Having said that if it is just the Bend you are looking at using then there is a Bend Space Warp in the system which will do the same job (need to have a test), so if you bound each object to a Bend Space Warp object that was attached to the same parent (ie so it moves with the objects) then changing the bend on the warp will effect all children. If you have access to 3ds max you can try it in there and see if that does what you need. The group modify is something I really want to get working though again when I have spoken to people it the past who have needed such functionality it turned out that what they actually wanted is the ability to have objects move with a deforming mesh hence doing the MegaAttach system so I never had any need to finish it off. As for the Attach system I will be extending that when MegaShapes is out to also work on Skinned meshes, so very useful of Avatar systems where the characters are morphed as well as skin and boned animated.
    [video=youtube;6aOz8rmv22s]http://www.youtube.com/watch?v=6aOz8rmv22s
     
    Last edited: Mar 1, 2013
  49. NanoMobile

    NanoMobile

    Joined:
    Jun 8, 2012
    Posts:
    4
    SpookyCat THANK YOU VERY MUCH FOR YOUR ANSWER, I will try to script my own implementation of such soft body, but I will be very glad to see your implementation in Mega-Fiers for such Soft Bodies, how soon will be next update of Mega-Fiers ? Thanks for great, awesome project !!!!
     
  50. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Funny : I just wanted to ask you to adapt your tyre deformation system to the Megafiers plugin !
    Great !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    6R