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. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi Malzbier
    Can I just check you are using the latest version from the store, that looks like what was happening in the previous version where I wasnt automatically telling the modifier system the under laying mesh had changed.

    If you are using the latest version 1.32 and above, are there any other modifiers on the mesh at all?
    Chris
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    I had 1.31 , looks like i have to update.
    Little update big change for me :) (i hope it will fix it)
     
  3. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Version 1.33 submitted to the store with the built in help, World Path Deform modifier and option to use curves to define the stretch and twist along a path.
    Chris
     
  4. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    WORLD DEFORM is in !!! nice
    and curves to define the stretch and twist.
    wow, this is becoming an absolute must-have for any Unity Dev!
     
  5. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,090
    Sorry for the newbishness, but what is the difference between path deform and world path deform?
     
  6. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    In the path deform the path is transformed to the local space of the mesh being deformed with the initial direction aligned to the axis selected, in world path deform the path is fixed in space and the mesh moves around that, so for example a train moving around a track would use a world path deform, a normal path deform would be used on say a snake mesh that moves around the world.
     
  7. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Latest version 1.33 is in the store now. Also the next version isn't far of with collider support.
    Chris
     
  8. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    collider support! pardon the fanboy antics, but you're doing a stellar job of refining and upgrading this great tool! best purchase in the asset store!
     
  9. sknne77

    sknne77

    Joined:
    Sep 9, 2009
    Posts:
    3
    Hi there, does this plugin support morph animation thats done in 3dsmax to be imported into UNITY?

    For instance, I have a fully lip synced character i did in 3dsmax using the morph channels, would this plugin retain that information once imported into UNITY using your plugin?

    Regards

    sknne
     
  10. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi Sknne
    The system will do the morph for you, though currently you will need to export the targets as OBJ files to get them in as Unity doesn't directly import morph targets. Secondly you would need to recreate the animation with the animation editor inside Unity as again Unity doesnt pick up the animation data. I do have a version that fully exports the Max data, channels, targets, animation but I have yet to get around to stripping that out of the old code and packaging it up, plus I need to strip the export code from max to a separate plugin, it's currently mingled in with about 60 custom Unity plugins we use. It is on the to do list. So probably not the exact answer you were looking for, but as it stands the system will do what you want just needs a little duplication of work currently.
    Chris
     
  11. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Here is a short video showing the flipping page effect made into Unity3D with this plugin :



    6R
     
  12. sknne77

    sknne77

    Joined:
    Sep 9, 2009
    Posts:
    3
    Thanks for the prompt response Chris, much appreciated.
    Sorry to bug, but do you have an ETA on adding in the feature you just mentioned ur stripping from code?

    Thanks again.
     
  13. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Tell you what I have a new version I hope to get out today so I'll get that done, then I will have go at the Max exporter bit later today, just need to change the export format a little which I will document on the doc site then any clever coders for Maya, Lightwave, Blender can have a go at doing exporters for those. So no promises but this week possibly though it might be a little untested in the first version.
    Chris
     
  14. sknne77

    sknne77

    Joined:
    Sep 9, 2009
    Posts:
    3
    well buddy if you can get that sorted u will deffo have another sale. I currently work for an e-learning company and using UNITY and this will be the best edition to an already awesome game engine, I look forward to using your script, if you need me to do any testing with it ill be more than happy to.

    Ian S.
     
  15. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Just submitted v1.34 to the asset store :)
    Chris

    Changes:

    • Added collider support. Has to use a mesh collider and no proxy meshes yet, and if the mesh collider is convex that can be quite slow.

    • Added tangent support. Check box on the modify object gui.

    • Fixed bug where you couldn't create more than one knot on a basic spline.

    • Slowly adding more content to the help pages.

    • Fixed missing gizmo icons on shape objects.
     
  16. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Quick work by Unity, approved and ready for download :)
     
  17. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi All
    The feature to export morph data directly from Max is now in, offering a painless solution for Max users to get their complex morphs into Unity. The file format is nice and simple so if there are any clever Blender/Maya/Cinema etc coders out there that would like to code up their own exporter then fire me an email. If you are a Max user and would like the plugin email me a copy of your invoice number from the Asset store and I will send you the plugin, it is for 2010 and onwards version of max 32bit only at the moment.
    Chris
    [video=youtube;16h203Ct6Yk]http://www.youtube.com/watch?v=16h203Ct6Yk
     
    Last edited: Mar 1, 2013
  18. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Version 1.35 in the asset store :)
     
  19. BloodFist

    BloodFist

    Joined:
    Mar 10, 2011
    Posts:
    22
    May I ask if blender can be used with this? or do you need a blender coder that adds the plugin for you?

    This looks really awesome and hope we blender users will be able to use it too, if not now in the near future.. Thanks for your work and I'll definitely follow this app.
     
  20. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi There
    Yes blender can be used with this for the morph data (everything else doesnt depend on any 3d package) currently export the morph targets to OBJ files as shown above. I am working on a blender morph exporter at the moment, though having never used blender or coded in python before Iam have to do a bit of reading first but think I have the basics done so watch this space :)
    Chris
     
    Last edited: Jun 25, 2011
  21. BloodFist

    BloodFist

    Joined:
    Mar 10, 2011
    Posts:
    22
    I'm no 3D modeller but I have a friend which uses Blender and would like to help me out, so sorry for any dumb questions I'm asking in advance...

    Everything else that is not morph data ( the other features that come with the package right? ) can still be used with blender since they are not 3d package specific? Do I get it right? Or blender gets only morph data? Thanks and well done on this, will definitely purchase soon.
     
  22. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Everything in the package is useable by everyone, no 3d packages or anything is required by MegaFiers. You can use 100% of the features. Iam just trying to make it as easy as possible for anyone who wants to morph their meshes to get the data into Unity. Curerntly if you arnt a max user it is done via OBJ files. I hope to have a blender plugin done this weekend as well.
    Chris
     
  23. bigSky

    bigSky

    Joined:
    Jan 31, 2011
    Posts:
    114
    Lovely tool, I've been watching your updates and very fast responses to suggestions, queries, bugs and so on from the community, and I must say that you seem like a stellar performer. The range and breadth of thinking in the updates is fantastic, as is the art-centric pipeline. Have you looked at supporting blendshapes from maya, as well as some of the other deformers - Lightstorm is the schiz right now. I know at least one maya user who would be very greatful for some added deformer support.
     
  24. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    Hi,
    Did you change the demo?

    I'm sill having a little trouble understanding it. One of the texts used to run on a path on the previous version, now it's static.
    Also the pipe does not animate anymore, like it use to previously.
    Is the warp bind on the ground ripple supposed to animate the sphere and other objects by warp bind, because I can't get it to work.

    I'm just trying to understand the package by playing with the demo, but not sure if it's me or the demo is broken.
    I tried a reimport but still same behaviour.

    ty!
     
  25. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    The demo hasn't really changed I just disabled some of the modifiers with the Enable check box while I was testing the new modifier and I forgot to turn it back on. The text is now on the world path deform, so click the text and if you scrub the percent value in the World Path deform you will see it move, if you want it to animate check the animate box and set the desired speed, or animate the percent value in the animation window.

    The pipe doesn't have the Morph Anim modifier on it at the moment, again I was testing the importing of the .mor files from max so I forgot to add the animation back on, I will make sure everything is back to normal for the next release.

    And yes the warp on the ground does alter the teapot and sphere etc but again I turned of the animate while testing, just select the 'Warp' object and check the Animate box and it will spring into life again.

    As for the Lightstorm system, some of those modifiers look very cool, I will have a go at some of those as they look like they could be very useful in games, added to the todo list :)

    Also I have a working exporter for Blender 2.58 to the .mor file format now, so easy importing of Shake Keys is on it's way, just need to find a good example now to show it off.

    Chris
     
    Last edited: Jun 28, 2011
  26. softrare

    softrare

    Joined:
    Jun 12, 2011
    Posts:
    444
    Good work! How much time did it take to create the scripts, if I may ask?
     
  27. sonicviz

    sonicviz

    Joined:
    May 19, 2009
    Posts:
    1,051
    kk,,ty!
     
  28. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    How long, that's a good question, I originally wrote the system for our own 3d engine in C++ a few years ago, so that probably took 3 months or so mixed in with various other max type systems like controllers, mesh building, exporters etc, then converting to Unity took about a month, was learning Unity at the same time, then I guess all the extras that have been added has been another couple of months on top of that, though that is with other systems being worked on and a game, so hard to really give an exact figure. There are over 15,000 lines of code in the entire system (9000 if you count actual lines of code and not white space, comments and brackets etc).
    Chris
     
  29. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Does anyone have a Blender file with shape keys in I could use as a test for the Blender exporter?
     
  30. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    I can prep a quick Blender shapekeys file and send it your way, would you like to PM me your email, or use a different means to get it your way?

    We're VERY psyched to hear you're considering native ShapeKeys support!!!!! sooo awesome, thank you!!! :) Our entire studio moved to Blender over the past 2-3 years, so this is great news to us(saving us steps of currently exporting and linking in each shapekey/blendshape/vertmorph/etc).

    We're said it before, Mega-Fiers ROCKS!!! Get it NOW if you already havent.
     
    Last edited: Jun 29, 2011
  31. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    zhx that would be great if you could do me a little test object, I was going to spend the day figuring out blender but got frustrated in the first 5 mins :) Too used to Max to change I fear :)

    Also the exporter for Morph data from max is now available for 64 bit Max 2010 onwards.
    Chris
     
  32. ForrestX

    ForrestX

    Joined:
    Apr 17, 2010
    Posts:
    94
    would it be possible to use Megafiers (at runtime) to manipulate a plane like photoshop does by its transform tool?
    maybe with ffd but with 4 points only?
    would it be difficult for me to convert ffd 2-2-2 to 2-2 ?
     
    Last edited: Jul 1, 2011
  33. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi Forrestxy
    I presume you mean the warp etc not the scaling rotate, well in theory yes with the FFD2x2x2 as you say but would be a bit painful as you would have to move 2 points, I can have a look at doing a 2d version but no promises on time frame for that :)

    As a side note a new version has been submitted to the store v1.36, it fixes a bug in the Morph Anim system.
    Chris

    v1.36

    • Fixed a bug in the Morph Anim system where the sliders were not being connected to the channels until runtime.

    • Max exporter for morph data now has 64bit versions.

    • Max exporter also handles Local Offsets on morphed meshes now.
     
  34. replay11

    replay11

    Joined:
    Dec 24, 2007
    Posts:
    168
    This looks really AMAZING and I'm seriously considering purchasing, but I have a few questions...

    1) I'm a Maya user and after reading through all 7 pages of this thread I'm gathering that all I would have to do to make use of the morph target feature is export out different versions of my mesh in obj format from Maya?

    2) Is this system really optimized for use on mobile devices such as the iPad and iPhone or does it work, but then take a huge performance hit on your game and reduce your frame rate?

    3) How many draw calls does it use up if, for example I just wanted to do a simple squash and stretch animation on a low-poly character (with under 5k triangles)?

    4) If I stack up modifiers (use multiple modifiers on a single mesh) will that use up more draw calls?

    5) If I have a game object mesh that requires one of Unity's built-in colliders such as the sphere collider for example, can I still make use of this system or does it only work with mesh colliders?

    6) Does the path system have to use a closed path or can you open up the path somehow?

    7) Does this system integrate with Unity's animation system or only work with it's built-in animation that you show in your videos?

    Thanks for making such an incredible contribution to the Unity community! I'm really looking forward to using this system and I'm really inspired after watching all your videos! Very exciting stuff here!
     
  35. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Yes currently if you arnt using Blender or Max you would use OBJ files to define the morph targets. I am looking at trying to do a Lightwave and a Maya exporter somewhere along the line.

    The system works fine on mobile devices, as to speed it really depends on the mesh and the type of effects you are trying to do, I have had it running on an Android phone with a bend modifier on a 4000 vertices mesh and the deformation was taking 26ms. So you can have a main character being deformed every frame and still have fluid frame rates depending on what else is going on, but the most common use seems to be setting a required deformation, updating the mesh and then turning of the system so then there is no overhead at all it just becomes another mesh.

    The system doesn't add any extra draw calls it just alters the vertex positions.

    No

    Due to the nature of the system only mesh colliders can be deformed, if you have one of the other type of colliders attached then that will still react the same it just wont be altered at all by the system.

    No the paths can be set to open via a Check Box in the inspector.

    Yes the system works with Unity's animation system, all the tweakable params are exposed, the only extra thing you may need to add is if you want to animate morph channels, Unity doesnt allow animation of array values, so you need to add a Morph Animation component, but apart from that everything is available to you in the animation window.

    Hope that helps :)
    Chris
     
  36. replay11

    replay11

    Joined:
    Dec 24, 2007
    Posts:
    168
    Chris,

    Thanks for the quick response! You have alleviated all my concerns. I look forward to making use of your Mega-Fiers system to create amazing things.

    You mentioned though that I would need to add a Morph Animation component in order to animate morph targets. Do you mean that I would have to program a custom Morph Animation Component or is there one already created somewhere that I can use?

    Thanks,

    Joey
     
  37. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi Joey

    I look forward to seeing what you conjure up with the system, please do send me a pic or two its great to see how its used.

    There is a Morph Animation component included :)

    Chris
     
  38. replay11

    replay11

    Joined:
    Dec 24, 2007
    Posts:
    168
    Hi Chris,

    More good news! Thanks! I will definitely send you some pics after I create something cool. I'm currently just trying to apply some squash and stretch to a jellyfish for the submarine game I'm working on. It looks as though your system should be able to handle that task quite easily plus a whole lot more! I'm very excited to get started using it!
    :)

    Joey
     
  39. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    It is possible to generate a spline using the Mega shape system?
    I need to set the knots and the handles via script.
    Is there a function to set knots and handles or can i access the variables them self?

    In addition: it is possible to access the path data (for me looks like a black box )?
    I need to get the Vector3 of any point of the path (not only the knots)
    I like to animate a object over the spline via iTween.PutOnPath an the function, that need a array of Vector3.


    Malzbier
     
  40. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi Malzbier

    Yes it is possible, if you look at say the CircleShape.cs code you can see how you go about adding knots etc. The system is going to be tidied up when I get around to do doing the whole shapes/primitives system but all the data is exposed. So the basics to making your own shapes would be:

    Code (csharp):
    1. public class CircleShape : MegaShape
    2. {
    3.     public float Radius = 1.0f;
    4.  
    5.     const float CIRCLE_VECTOR_LENGTH = 0.5517861843f;
    6.  
    7.     public override void MakeShape()
    8.     {
    9.         Matrix4x4 tm = GetMatrix();
    10.  
    11.         float vector = CIRCLE_VECTOR_LENGTH * Radius;
    12.        
    13.         PathSpline spline = NewSpline();
    14.  
    15.         for ( int ix = 0; ix < 4; ++ix )
    16.         {
    17.             float angle = (Mathf.PI * 2.0f) * (float)ix / (float)4;
    18.             float sinfac = Mathf.Sin(angle);
    19.             float cosfac = Mathf.Cos(angle);
    20.             Vector3 p = new Vector3(cosfac * Radius, sinfac * Radius, 0.0f);
    21.             Vector3 rotvec = new Vector3(sinfac * vector, -cosfac * vector, 0.0f);
    22.             spline.AddKnot(p, p + rotvec, p - rotvec, tm);
    23.         }
    24.  
    25.         spline.closed = true;
    26.         CalcLength(10);  // need to call this if you alter a curve so interp works correctly, 10 is the number of steps between each knot used in the calculation, seems to give nice results.
    27.     }
    28. }
    Then if you wanted to say build a Vector3 array you could just do something like:

    Code (csharp):
    1. Vector3[] GetKnots(MegaShape shape)
    2. {
    3.         Vector3[] knots = new Vector3[shape.splines[0].knots.Count];
    4.  
    5.         for ( int i = 0; i < shape.splines[0].knots.Count; i++ )
    6.         {
    7.             knots[i] = shape.splines[0].knots[i].p;
    8.         }
    9.  
    10.         return knots;
    11. }
    And to get the value of any point along a shape you do the following where alpha is value between 0 and 1 for position along the shape, the InterpCurve3D method takes 3 params, first is the curve index, this is usually 0, next if the alpha value for the point to interp and the last if method of interpolation, if false its a simple linear interpolate if true then its a proper normalized interp which is the best way.

    Code (csharp):
    1. Vector3 GetPos(MegaShape shape, float alpha)
    2. {
    3.    return shape.InterpCurve3D(0, alpha, true);
    4. }
    Hope that helps a little.
    Chris
     
  41. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    Got some strange error because the the custom shape class does run in editor but the script that is holding a bunch positioning Game Objects.

    some idea?



    and a additional error at runtime
     
    Last edited: Jul 6, 2011
  42. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Mmm that looks like you haven't set up the knots correctly. Can you send me the code you are using to setup your shape. Iam sorry it isn't obvious on how to use it but I wasn't expecting anyone to want to script up shapes and they were added as a helper to get the path deforms in. I will tidy up and doc the shape system when I get the chance :)
    Chris
     
    Last edited: Jul 6, 2011
  43. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,652
    What an awesome system! So much fun to play with!

    Is there any way to apply modifiers to the children of a game object? I'd like to be able to apply broad modifiers to a parent, then selectively tweak some of the children further with other modifiers.... Is something like that possible?

    Also is there a recommended way to duplicate an object with modifiers? After using Duplicate the meshes seem to be shared, so anything I apply to one applies to the other. It works okay if I drag a new instance of the mesh into the scene, but then I have to manually duplicate all the modifiers.

    I'd also like to be able to setup the modifiers, duplicate the object, then swap in a different source mesh in the Mesh Filter. But that didn't seem to work when I tried it...

    Anyway, thanks for making such a powerful and fun system!
     
  44. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi Alex
    I am actually working on the apply modifiers to a group of objects at this very moment, it is virtually done just some code tidying and testing to do really, makes it much more useable in my opinion :)

    I will look at the duplicating issue and see what I can do, I have not tried copying things about much so I am sure there will be improvements to be made in that area.

    Glad you are enjoying the system, it can be quite addictive piling on modifiers and playing with all the params :) Hope to see some pics of what you have come up with in your testing, feel free to email any pics and I will add them to the gallery on the docs page :)

    Also just added support for exporting of Morph channel animations from Max to the system so you dont have to recreate them in Unity, will do a video on that tomorrow.
    Chris
     
  45. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
  46. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    WOW ! Great...

    I just have added a video showing an animation morph at runtime into a game I'm making for kids...
    Balloons change their expression because of the danger of the plane (The user dosn't toucht the balloons !)
    There is no sound here because of a problem on my computer.



    6R
     
  47. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    @SpookyCAt, that video is VERY impressive. VERY. You've created the most solid VertexMorph/Deformation implementation I've seen in any modern IDE I've worked with. Stellar job.
     
  48. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Very nice video Philippe :) Love the face changing you really do seem to have a full grasp of the system now and it's always nice to see what you come up with.

    I am back on the Blender ShapeKey exporter and thanks to zhx I now have a nice animated test scene to work with so that is going well and I hope to show that off soon.

    Chris
     
    Last edited: Jul 11, 2011
  49. yannalaplage

    yannalaplage

    Joined:
    Jul 15, 2010
    Posts:
    31
    Hi,
    thanks a lot for the max morph exporter, when will it be available ?
    yann.
     
  50. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Just did a quick video to show the Blender ShapeKey workflow with MegaFiers
    [video=youtube;gQa-AOFG_Yk]http://www.youtube.com/watch?v=gQa-AOFG_Yk

    The Max exporter is ready now, just need to submit the next version of MegaFiers to the Asset Store with the animation support, which will happen today or tomorrow, so when that is up just email me with the version of Max you need the exporter for currently 2010 onwards. Or if you need the Blender 2.58 exporter email as well.
    Chris