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
    It is a system I could look at adding ie building a point cache animation data from a megafied mesh and then playing it back as a baked animation via point cache. Point cache playback is very very fast as it isnt doing any complex maths per vertex it just lerps between values, morphing is usually even faster but that is due to it only processing vertices that actually change whereas point cache updates all vertices.
     
  2. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Thanks very much for the info, I was hoping that was the case :)

    Anyway I know that you are working on multiple different aspects of the system and there are so many other wonderful things on the horizon, so I will not complain if this stuff is low on the priority list. As I getting slightly more confident at messing with scripting I may have a bit of an attempt at this myself at some point.

    One more thing I was pondering was the best way to handle the sort of morphing where we are morphing between two completely different models, which don't have the same number of vertices. Im sure its not a trivial problem to solve but there are ways to 'fake' this sort of thing. For example if I wanted to have a go myself without any proper coding, I would have both my models morph to an intermediate state which looked similar. Then I would morph from the first object to its intermediate state, then stop rendering that model, start rendering the second model in its intermediate state, then morph the second model to its original form. But since you are a wizard at mesh manipulation I thought I would ask whether you could do something that used a vaguely similar but superior technique?
     
  3. ChuckT

    ChuckT

    Joined:
    Aug 18, 2008
    Posts:
    94
    My question was simply if you could import a particle cache animation to start at a frame other than 1. That way if you had a flag for example, it could be already "relaxed" so the mesh didn't pop back to a fully rigid state when the animation looped.

    In Maya, you can pre-relax the mesh/cloth then start the animation.

    Oh, and any chance to download the 3.5 release from somewhere other than Unity? It still shows the older rel.

    Thanks Chris-
    C-
     
  4. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @ChuckT - The next release (hopefully Monday if Unity stick to there promise) has the Animation clip system used for the morphs available for Point Cache files so you can set up multiple sub anims and choose which one to play and looping modes etc.
     
  5. S0ULART

    S0ULART

    Joined:
    Jun 14, 2011
    Posts:
    131
    maybe a bit dumb question but is it already possible to start particle effects not from beginning/zero than from 30 seconds or from the middle or anything like that? If so how may I achieve that?

    edit: oh sorry wasn't sure whether ChuckT talked about particles or point cache, sorry for the off topic question!
     
    Last edited: Feb 19, 2012
  6. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Oh I see, you are talking about point caches not particles.
     
  7. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @Soulart You can set the 'time' param to be what you like, though when it reaches Loop Time it will go back to zero. The new clip system will make life a lot easier.
     
  8. S0ULART

    S0ULART

    Joined:
    Jun 14, 2011
    Posts:
    131
    thank you Chris :)
    Oh so you are going to implement a new animation system that's working not only with the mega-fiers ut also unity's basic components like particle systems Oo?
     
  9. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Ok Iam getting confused now, I am talking about point cache, I am not doing anything with the particle system. Going to have go back and re read a chunk to figure out how things got on to particles :)
     
  10. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Sorry about that! All that happened is that ChuckT used the word particle instead of point, which made me go on about the Unity 3.5 particle with Megafiers stuff which I had been messing with some days back.
     
  11. ChuckT

    ChuckT

    Joined:
    Aug 18, 2008
    Posts:
    94
    point/particle/meh- point cache. Any chance the point cache animation can start on an already deformed mesh?

    And is the new version uploaded to the asset store and you're just waiting for Unity do do "something" to release it? I'm confused.

    Gracias-
     
  12. S0ULART

    S0ULART

    Joined:
    Jun 14, 2011
    Posts:
    131
    I think he's waiting for Unity fixing the access to the asset store in version 3.5
     
  13. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    In the process of submitting the new version to the store though the new tools have a wee bug for me at the moment but hopefully will be fixed soon. The fixes in this release are below and can also be found on the web site at http://www.west-racing.com/mf/?page_id=891 Note that megafiers will compile to Flash builds but it seems there is still something not implemented in the Unity to Flash mesh serializer that stops it from working, hopefully the next update of the Unity Flash platform will fix that. All other platforms work :)

    There will be some new modifiers coming to the system in the next release which will be after MegaShapes is out.

    v1.84

    • Added a Point Cache animation clip system like the morph system.

    • Fixed bug on Path Deform path drawing which showed knots too big and path step to large.

    • Fixed uv mapping bug on Page Mesh.

    • Fixed wrong check for UNITY_FLASH builds that stopped multithreading from being enabled

    • Removed workarounds for Unity bug of Handles.matrix not being used that was fixed in 3.5

    • Tangents optionally calculated on Shape meshes now
     
  14. TBYG

    TBYG

    Joined:
    Sep 29, 2011
    Posts:
    158
    Not quite sure if this is a Unity 3.5 bug, or Mega-Fier, but after using the modifiers to deform the mesh and recording the animation, anytime you go back in and try to edit the animation, Unity freezes. I've tried with 3 different meshes, 3 different times. Same problem every time. Not a game breaker, but it is a bit of a pain having to start the animation over if it's not absolutely perfect the first time!

    Thanks for the great extension!

    EDIT - this only happens on my mac, if that makes a difference...
     
  15. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    @SpookCat
    thank you for the 1.84 updates :)

    I have a few questions regarding the new point cache additions:

    is this similar to the MD2 file format? http://tfc.duke.free.fr/coding/md2-specs-en.html

    if this is similar to MD2, this could allow for FAR faster processing on portables. In my previous experience, point cache animation systems, not armature/bone/rig based systems, are much much faster than any sort of dynamic animation system relying on bones or vertex morphing.

    Have you benchmarked this on an iOS device yet?
     
  16. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @Ruin - That sounds like an odd problem and I cant see why or how anything in the MegaFiers side would cause the animation window to freeze, and it seems that is all is fine on PC and not on Mac that there is probably an issue in Unity somewhere. I still don't have a Mac so I am not currently able to test it for myself. But just so I know which modifier were you animating?

    @zhx - Yes it is similar to the id md2 format and it does allow for very fast playback of animating meshes without the limitation of set number of bones per vertex and will work on top of animated characters, the down side is larger file sizes but that can be mitigated by tweaking the rate the animation is sampled and exported at.

    As for the next release I still haven't heard anything back from Unity about a fix to the crashing asset store problem so sorry about that.
     
  17. TBYG

    TBYG

    Joined:
    Sep 29, 2011
    Posts:
    158
    Not causing the animation window to freeze, Unity locks up.

    And it was the stretch modifier that caused the problems.
     
  18. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    I think that is going have to one for a Unity bug report as there really isn't anything in MegaFiers that can cause that and especially in the stretch modifier as that is a very basic modifier. And the fact PC works and Mac doesn't again points more at a Unity issue.
     
  19. hay78

    hay78

    Joined:
    Sep 25, 2011
    Posts:
    41
    Hi Chris

    Appreciate your help last time.

    Now i'm experiencing mapping failed problem again.

    When i drag the fbx object (head with facial morph) from project to the scene and load the mor data, it works.

    Then i drag the same fbx to the scene( because there are 2 character using the same head), and load the same mor data, it is giving me mapping failed error. But the first one still working.

    But when i deleted those two head fbx from the scene, and drag it again to the scene, it's giving me that error.

    Thanks

    Hay
     
  20. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Mmm that sounds like another odd bug, I will have a look at that and try and recreate it.
     
  21. ChuckT

    ChuckT

    Joined:
    Aug 18, 2008
    Posts:
    94
    Any news on the Asset store bug?
    I'm curious why there aren't more complaints in the forum about the 3.5 bug and why there are recent updates from other product vendors. It's hard to believe everyone is using 3.4.

    Thanks
     
  22. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Thats probably because some people have submitted 3.5-compatible updates using Unity 3.4, or because their assets don't cause the new tools bug that SpookyCat has experienced to manifest itself for them.
     
  23. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Seems that it is a bug that effects Assets that have a fair few screenshots attached to show the product off, there is another with the same problem here http://forum.unity3d.com/threads/124581-Too-many-threads-error-in-Asset-store-manager.

    I have posted, submitted a bug, talked via twitter to Will, emailed Caitlyn, PM the asset store tech guy and as of now not heard anything back so no idea when they are going to look at it.
     
  24. ChuckT

    ChuckT

    Joined:
    Aug 18, 2008
    Posts:
    94
    An alternate download location would be greatly appreciated- I'm kinda dead in the water with 3.5
     
  25. GennadiyKorol

    GennadiyKorol

    Joined:
    Jul 10, 2010
    Posts:
    107
    We have bought MegaFiers recently for the ability to play point cache animations on the meshes.
    But now I've spent about 2 hours to try to make it work and all without luck.
    There was also nothing in the documentation that seems to help.

    What we're doing is:
    Have a very simple plane mesh in 3d max with some animation on it.
    Export that plane as an fbx into Unity.
    Export the point cache using the Point Cache modifier in pc2 format, just as shown in the waving flag video.

    Trying to import this point cache files gives "mapping error".
    I have tried different ways of exporting the fbx, and point caches but without any luck.

    This seems like a very daunting task for something this simple.

    Is there something we're doing wrong?
    Thanks!

    Gennadiy
     
    Last edited: Feb 25, 2012
  26. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi There
    Sorry you are having troubles, can I ask are you using the World Space or Object Space version of the Point Cache modifier? Also you need to make sure that the fbx you export is the first frame of the animation so that the system can match up the points, ie you cant just export the flat plane then build the deformation and export the point cache.
    Chris
     
    Last edited: Feb 25, 2012
  27. 60days

    60days

    Joined:
    Jan 27, 2012
    Posts:
    23
    Also is it possible that the mesh is being triangulated at different stages in each process? Maybe ensure its an editable triangulated mesh in 3d max (not sure what the specific menu item is as I dont use it myself).

    I could also do with an alternate download source if the asset store issue is going to be unresolved and theres a way of checking legitimate ownership (I'm in the midst of a project I bought megafiers to help with and foolhardily went right into 3.5 beta).
     
  28. GennadiyKorol

    GennadiyKorol

    Joined:
    Jul 10, 2010
    Posts:
    107
    SpookyCat:

    We're using the Local Space version, exactly the one from the flag video.
    It doesn't seem like exporting the first frame of the animation helps either.

    So the system isn't based on vertex indexes but is based on vertex positions?

    That's quite a bummer since I was looking into building a database of different cache animations for the core set of meshes.
    Is there a way to match up the points using indexes instead?

    60days:
    Triangulation shoudln't be relevant since the point cache only deals with vertices. But in any way, exporting the first frame of the animation should guarantee the same triangulation.

    Thanks!
     
  29. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    When I was first messing around with the morph stuff, I sometimes had more luck if the base model I'd loaded into unity was an obj rather than a fbx. So I suppose theres no harm in me suggesting that when stuck with either morph or point cache issues, try an obj just in case this helps.
     
  30. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Can you email me the max scene so I can see what is going on to chris@west-racing.com as there should be no reason why it shouldnt be working. The system cant be based on vertex indices as Unity totally mangles the order and the number of vertices on importing the fbx hence it needs to do a mapping on loading the point cache file. I will be able to maybe extend the system to layer extra point cache files like the morph system.. But first I would like to find out what is going wrong with the export etc.
     
  31. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hiya,

    As a mobile developer, I'm interested in mobile performance. Hows mega-fiers looking on that platform? Sorry if it was answered in the last 39 pages but my head's hurting at the moment :)
     
  32. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    In regards to my earlier droning on about better system to manage megafied meshes, and morph between different megafied meshes. For now I decided to use the ObjExporter script thats available at http://www.unifycommunity.com/wiki/index.php?title=ObjExporter to achieve this stuff, will report back on how I get on.
     
  33. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Which 3.5 issue is spoiling your fun? If you are still stuck then maybe someone else can give you a manual fix for the problem.
     
  34. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @GennadiyKorol - Did you get it working, I pm you saying you could email me the file but didnt hear anything?

    @Hippocoder - Sorry I missed your post. MegaFiers is being used on a fair few mobile titles and the reports I have are that its working very well, the last test I did on a not current gen Android phone with a 4500 vertex mesh and a complex bend modifier showed it was taking 28ms to process, and a 1000 vertex mesh was taking 7ms expect a lot faster than that on current devices, also you can turn on multi threading if your devices support it. Plus most people seem to be using the Morph or point cache systems on mobile devices and they are a lot faster than bends so I would be surprised if in normal use or say facial morphs you see any real decrease in performance.
     
    Last edited: Feb 27, 2012
  35. GennadiyKorol

    GennadiyKorol

    Joined:
    Jul 10, 2010
    Posts:
    107
    SpookyCat:

    Still haven't gotten it to work.
    I will try to perform stupid simple tests to see if maybe some of the unit conversion or axis conversion settings make that difference, since the tool is based on point positions.
    If not, I will create a version of an asset that I could replicate the problem with and send for an investigation.

    Thanks!
    Gennadiy
     
  36. PutOption

    PutOption

    Joined:
    Nov 18, 2009
    Posts:
    9
    I recently upgraded to Unity 3.5.0f5 and am running Mega-Fiers 1.83 and have recently got the "Mapping failed" error on an attempt to import the morph file after it was working in an earlier version of Unity. The console shows the following stacktrace -- does this require a Mega-Fiers update or is this due to a problem with a changed asset?

    Error Loading chunk id StartPoints
    UnityEngine.Debug:Log(Object)
    MegaParse:parse(BinaryReader, ParseBinCallbackType) (at Assets/Mega-Fiers/Editor/MegaFiers/MegaParseEditor.cs:240)
    MegaMorphEditor:LoadMorph(BinaryReader) (at Assets/Editor/MegaFiers/MegaMorphEditor.cs:1004)
    MegaMorphEditor:MorphCallback(String, BinaryReader) (at Assets/Editor/MegaFiers/MegaMorphEditor.cs:956)
    MegaMorphEditor:parseFile(String, ParseClassCallbackType) (at Assets/Editor/MegaFiers/MegaMorphEditor.cs:917)
    MegaMorphEditor:LoadMorph() (at Assets/Editor/MegaFiers/MegaMorphEditor.cs:975)
    MegaMorphEditor:OnInspectorGUI() (at Assets/Editor/MegaFiers/MegaMorphEditor.cs:667)
    UnityEditor.DockArea:OnGUI()

    Thanks!
     
  37. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    I have applied the taper modifier on a textured cube, (Unity primitive) to make a frustum like figure, and the texture tiles on the sides (the ones affected by the modifier) appear not stretched (like expected) but rotated.(???)
    I don´t know the reason because I think the taper modifier does not rotate the polygons,faces or vertex on the mesh.
    You can make an easy test to check this.
     
    Last edited: Feb 28, 2012
  38. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @PutOption - There should be no reason why the upgrade to 3.5 would cause a problem, I would suspect the asset must have changed in someway ie a pivot has moved of the first frame nolonger matches the fbx base mesh, if you want me to check it out then let me know.

    @angel_m - Interesting, as you say the modifier only changes vertex positions, I just added a taper to the basic cube with a texture and I am seeing expected behavior, ie stretching textures (though the cube is not ideal as you ideally need a few more vertices to get a nicer result with textures, try the PageMesh) instead of rotating textures. Could you post a pic of the issue, and could you try it with a cube made from the pagemesh with a few more vertices in to see if that gives a different result.
     
    Last edited: Feb 28, 2012
  39. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    @SpookyCat - I'm interested in using your Morph modifier to create a character customization system for a game I'm developing. I remember a while back that you talked about wanting to use Mega-fiers for your own. Did you ever work on that and have an example video? What are your thoughts on how to re-size clothing based on the underlying mesh using your system? Thanks!
     
  40. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hi Adam
    I have yet to get around to starting on our Avatar system due to support for MegaFiers and working on the new systems. The resizing of clothes etc is something I hope to get around to with a modifier that maps one mesh to another so changes in one will be reflected in the other. But until that time the best way to work it with the current systems is via morphs, use the systems in Max/Maya that deal with resizing and save out the morphs for each item and then when setting the base morph channel percents set the corresponding values in the attached objects. By the way I did reply to your email.
    Chris
     
  41. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Hopefully new version will be in the store soon, new Asset Store tools dont crash but dont seem to allow me to submit anything either but hopefully will be fixed soon.
     
  42. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Hi! I'm dealing with similar issue. When I make prefab for megafiers-influenced mesh, mesh filter sets to 'none'. Any workaround for this for Unity3.5? I'm on Mf 1.83
     
  43. PutOption

    PutOption

    Joined:
    Nov 18, 2009
    Posts:
    9
    SpookyCat -- thanks for the help on the import issue. I've got another question related to coordinating the morphs. I have a set of 5 morphs that are paired with 5 animations. The MegaModifyObject script is attached to a game object with a SkinnedMeshRenderer along with 5 copies of the MegaMorph - 1 per morph. When an animation is triggered, the proper morph is ModEnabled (and the others disabled), the channel percentages are zeroed out, and the Animation option is turned on. This works fairly well except when the animation is stopped, the morph might be stopped at any percentage setting leaving the mesh deformed rather than at its unmodified state. Attempting to reset the channel percentages to zero doesn't seem to help. So, is there a clean way to shut off the morph so that the mesh is returned to its original state?
     
  44. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @PutOption - You should be able to get that to work by settignn the animate flag on the morph to false and then using either of the SetPercent methods to either instantly reset the channels or to move to a reset over time, you wont be able to disable that morph until the channels are reset though. You shouldnt need to disable the morphs if the all the percents are at zero as the system will skip those morphs if it sees nothing is being added to the deformation. I can look at adding some extra methods to ease all channels to zero over a set time and then disable the mod, but with the current state of the asset store not sure when I will be able to make that available, still waiting for them to fix the bugs that stop the latest version appearing on the store.

    @RyuMaster - The prefab and instance stuff is going to be redone in upcoming releases to make use of the hopefully properly working and fixed prefab system in 3.5. Others currently deal with prefabs and instances by scripting the addition of the modifiers to instantiated meshes, its not ideal but it works, I hope to get it working nicely one way of another in the near future. The system was originally designed to only be used at runtime and it was Unity that asked if I could make it work in editor mode but altering with meshes in editor mode and having it all work with prefabs and instances didn't work well prior to 3.5 so fingers crossed it works better now.
     
  45. yty

    yty

    Joined:
    Aug 10, 2009
    Posts:
    82
    Submit a bug:unity3d v3.5 f5&megaFiers v1.83

    Draw Knots and Draw Handles only if position is zero, is the correct one.

    Figure
     

    Attached Files:

    • $mfy.jpg
      $mfy.jpg
      File size:
      74.4 KB
      Views:
      1,440
    • $mfn.jpg
      $mfn.jpg
      File size:
      76.4 KB
      Views:
      1,505
  46. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @yty - Thank you for that but this has been fixed as can be seen futher up this thread, it was due to working around a bug in earlier versions of Unity that they fixed in 3.5. There would have been a updated version available on Feb 14th but unfortunately the new Asset Store tools have a few bugs in them that stops me from submitting the new version to the store so I am kinda in Unitys hands as to when the latest version will be available.
     
  47. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Still no luck with getting the latest version into the store, Unity chaps are beavering away with new versions but none of them are working :( Hopefully they will crack the problem before the weekend.
     
  48. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Version 1.84 finally in the Asset Store :)
     
  49. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Updated to 1.84 and I get this error:

    Assets/Mega-Fiers/Scripts/MegaFiers/Modifiers/MegaPointCacheAnimator.cs(124,37): error CS1061: Type `MegaPointCache' does not contain a definition for `SetAnim' and no extension method `SetAnim' of type `MegaPointCache' could be found (are you missing a using directive or an assembly reference?)
     
  50. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Mmm that is very odd as my MegaPointCache.cs file shows the SetAnim method at line 360 so looks like something went wrong with the import and you only got the new files for some reason. Try a redownload and a reimport.