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

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    I'm trying to use Mega Wrap with the latest Morph 3D character system but without much success. For some reason the mapping process seems to be working but when i morph the character the wrapped object is not deforming. I have watched your video on the subject matter and have set it up the same. Because the characters have 5 LODs i'm wrapping the jacket mesh to LOD 2 which is approx 10K verts. The jacket is around 3200 verts in which the mapping takes approximately 90 seconds.

    Whats the different between the types Mega and Unity?

    Setting the character on LOD2 then adjusting the blendshapes of the character does not change the jacket mesh.


    Am i missing something here?
     
  2. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    Unable to wrap some pants to a genesis 2 figure as with the latest release
    The exception im getting is
    NullReferenceException: Object reference not set to an instance of an object.
    MegaWrapEditor.Attach(.MegaModifyObject modobj) (at Assets/Mega-Fiers
     
  3. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    514
    Another Exception being see is Mesh.vertices is too small. The supplied vertex array has less vertices than are referenced by the triangles array.

    This is the MCSFemale genesis character where the Mega Modify component is attached to any of the LOD levels.
     
  4. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @GXMark - If you could submit a support ticket at the website we can help you out, one quick question are you using Unity Blendshapes or MegaFier morphs?
     
  5. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Just submitted a small update to the Asset Store, this adds in 3 new Warp modifiers namely the FFD modifiers, so you can now use the FFD systems to warp space and move your objects through those. We also fixed a bug in the Max morph exporter when exporting progressive morphs from Max 2015 or 16. We will also shortly have a Max 2017 version of the exporter available. And we also fixed a small bug in the Wrap system that could cause an exception when a mesh was being copied.

    Changes in v3.09
    • Added beta FFD2x2x2 Warp Modifier.
    • Added beta FFD3x3x3 Warp Modifier.
    • Added beta FFD4x4x4 Warp Modifier.
    • Fixed an issue with the 2015/16 3ds max exporter crashing with Progressive morph targets.
    • MegaMelt modifier custom inspector code updated to support multi object edit and undo/redo
    • Fixed a bug in the wrap system when a mesh is being copied causing an exception.
     
  6. Nijamyang

    Nijamyang

    Joined:
    Aug 8, 2012
    Posts:
    34
    Hi SpookyCat,
    i took over a project and have to make a windows phone export. Now I'm seeing that your plugin is in the project and it's giving me an error because some vars and funcs are excluded for the windows store plattform ("MegaCacheImage" could not be found). The version of the mega-fier plugin is 2.97. I'm not sure if the problem's gone if i would update the plugin? Does the plugin work for "Windows Store"?
     
  7. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    I see no reason why MegaCacheImage is not included in a Windows Store build, there are no conditional options that would exclude it. Which version of Unity are you using?
     
  8. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    @SpookyCat Hi, is there a way that I could bend a mesh at runtime using handles? For example, if I had a plane and had handles on each corner, when these are moved the mesh should bend according to the handles position? An example of the plane and handles is shown below.

    plane-handles.png
     
  9. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Interesting, you could certainly have 4 bend modifiers applied and use the position of the objects to control the bend values, I would probably use the attach system to keep the objects attached to the surface as it deforms, but not sure what you are expecting the end results to be, say if 3 corners are dragged different amounts what would you expect the end result to be? If you could maybe provide an example image of what you are wanting to achieve then I can probably give a better answer.
     
    mimminito likes this.
  10. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Thanks. Ill try and get something better to show you, not sure how to do it though! Ill look into the bend modifiers to see if that will do the trick.
     
  11. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Hi @SpookyCat , I have a question about the morph modifier. I am using a progressive morph which is the result of several morphs combined into the one morph channel. Therefore at 33% the morph channel reaches 100% of the first of the combined morphs, at 66% it reaches 100% of the second, 99% the third etc. When I use the percent slider in the the morph component, for this particular channel it will naturally move through the different morphs.

    My question is, is it possible to create a second "strength" slider which can control the strength of the morphs effect? For example at 0% the strength of the morph would be zero and it would not deform the mesh at all, at 50% it would deform the mesh at half strength and so on.

    Any suggestions as to how this could be done?
     
  12. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @Hamesh81 - Are you needing a 'strength' value for each channel or a general strength for the whole morph effect for all the channels?
     
  13. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    It would need to be for each blend shape/morph channel.
     
  14. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    How does that differ from the Percent value for the channel, can you not just reduce the percent value?
     
  15. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    I thought that the percent value was the same as the morph dial values in 3ds Max? If so I am asking for an additional value slider which would work slightly differently. I will use the example diagram below to hopefully explain this better.
    Morphs.jpg
    In the project I am working on there are many different species (eg. Alien 1 and Alien 2 above), each specie has 4 subspecies (represented as 0, 33, 66, 99 above). Similar to GTA Online, a player is able to choose their avatar's heritage (parent's appearance) via one slider each (eg. Alien 1 & Alien 2), and then via a third slider they can choose their resemblance to either parent (this would be the "strength" slider).

    So for example:

    The player may choose their heritage as Alien 1 99% (so parent 1 will have a bird face) and Alien 2 66% (so parent 2 will have a cat face). But for their resemblance the player will choose parent 1 at 70% and parent 2 at 30%. This is where the "strength" slider would come in, it would allow me to lower the morph deformation strength so that the player avatar would be 70% bird face (parent 1) blended with 30% cat face (parent 2). Otherwise what ends up happening is that parent 1 at 100% strength is combined with parent 2 at 100%, causing quite extreme deformation since a single morph at 200% will create twice the intended affect.

    Another way to think about is, if you consider each morph target as a separate layer in Photoshop, the "strength" would be like the opacity slider next to each Photoshop layer. I'm not sure if that makes more sense :D Basically it is being able to control how multiple morphs are blended together. Please let me know if anything about the above is unclear. Thanks for your patience SpookyCat
     
  16. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Ok gotcha, no problem, added that in and it will be in the next update :)
     
    Ony likes this.
  17. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Wow really!? That was superhero quick! Thank you very much

    Another quick question. For the same project I am finding that the 100 morph channel limit in 3ds max is not enough. I am considering using a second morpher modifier on the same character, but I wanted to double check first how exactly this would work in Unity. For example, would I need to use 2 separate morpher components in Unity and if so how would I export 2 separate .mor files? Also would having such a large number of morphs or having multiple morpher components have any performance problems?
     
  18. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @Hamesh81 - Wow more than 100 channels :) To do that you would just have a second copy of your character in Max and add the extra channels to that, then export that to a new .mor file. Then in MegaFiers just click the Import Morph File button and select the new file, a pop up will open asking if you wish to replace the current channels or add to them, select add and those channels will be added to the current ones on your character in Unity. As for performance it depends on how many channels are contributing to the end result and how many vertices are being changed by each channel, if you have 200 channels but only 5 say have a non zero percent value then it takes no more time than having just five channels on your character. Also if you have 100 active channels but each channel only changes 100 vertices then that would be roughly equivalent to 1 active channel effecting 10,000 vertices. So it depends on various factors and your target platform.

    Also bare in mind once you have the character morphs set you can turn off the modifier and use zero CPU time.
     
    theANMATOR2b and Ony like this.
  19. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Sure that makes a lot of sense, thanks for that. I also have some morphs that use 3ds Max's vertex selection option (since they need to only apply to parts of the character), I haven't tried whether vertex selection morphs work with megafiers so I will post back if I have any issues :)
     
  20. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    The system will detect which vertices are being changed when it imports the morph data file so you dont need to worry about it.
     
    Ony and Hamesh81 like this.
  21. B2_Squared

    B2_Squared

    Joined:
    Mar 13, 2013
    Posts:
    14
    Hello!

    I read a few pages back that you had abandoned the collision deform modifier and started working on it again. That was about a year ago. Has it made any progress? I recently had the chance to play around with an older version of Megafiers and the collision deform was exactly what I needed. The only problem was framerate drop. The version I tried has a Raycast method too that seemed lightweight, but I couldn't get it to work. Granted, I didn't have much time to play around with it so I can't say for certain if I just wasn't setting it up correctly.

    Have you been able to optimize that collider since you started working on it again? I've started working on a project that needs collision deformation like shown in your video, and I'd buy Megafiers in a heartbeat if I knew it had been optimized and was ready to go.



    EDIT: Would it be possible to achieve the above results with the Raycast method? If memory serves me right, I recall the mesh not deforming properly and not resetting like with the "Old" method. If the above results are possible with the Raycast and I just couldn't get it to work, I'd buy it right now haha.

    Thanks!
     
    Last edited: Jun 1, 2016
    Fluffy-Tails likes this.
  22. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @b2-Squared - I have not revisited that modifier, it could be sped up with a better FindNearestFace method, it currently goes through the entire target mesh, using a BSP style list instead would greatly improve the performance but I haven't had the time to write one of those. I think I may have something similar I use in some of my mesh building systems which could be adapted possibly. Finding the time is the key though. It would be nice for this modifier to be done properly as it would be useful.
     
  23. wargod

    wargod

    Joined:
    Mar 13, 2013
    Posts:
    16
    Hello,
    We seem to be having major performance issues with megawrap
    We have loaded 2 characters into a simple test scene and are using the megawrap modifier to drive the cloths / hair/ facial hair.The frame rate has taken a huge drop ( below 25 fps ).We checked the unity profiler and mega wrap is 58.3% of cpu usage ( off the megawrap late update). If we disable the wrap modifiers the performance jumps straight back up but obviously the clothes no longer following the underlying skinned mesh.

    Max Distance has for the items are set to low and all of them have a Max Points of 1.

    What would you recommend we try , any help would really be appreciated.

    Cheers
    Neil
     
  24. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @wargod - The wrap is a very fast system, faster than skinning so very odd for it to be slow, if you could submit a support ticket and possibly include a test scene I can take a look.
     
  25. wargod

    wargod

    Joined:
    Mar 13, 2013
    Posts:
    16
    Ok Cool, thanks. Will submit one now
     
  26. Fluffy-Tails

    Fluffy-Tails

    Joined:
    Jun 28, 2009
    Posts:
    120
    What I am seeing here is exactly what I need in a game currently early in production and I have spent months finding a solution for.
    My team is using Adventure Creator, is there support for Mega Fiers in Adventure Creator?

    Our budget is small but having that type of collision deformer is an instant buy for my project.

    Will there be any future plans to implement this type of deformer or something similar or advanced?

    The project we are working on is an adult game and having collision deformers for genitalia, penetration, suction and more would be very helpful.
    Additional dynamics such as realistic breast jiggle, fat jiggle and butt jiggle is another aspect we are looking into.

    Also, me and my team are exploring options for facial bone-based animation and a helpful mix of morphs to aid in problematic areas.
    Would Mega-Fiers work as a solution for specialized facial animation or would a separate asset be best?

    We are currently considering:
    Lip Sync Pro and Realistic Eye Movements

    Does this asset work with ragdoll stuff like FinalIK and Puppet Master?

    We are a team of artists, not programmers.

    Thank you if you can provide some answers, we are serious about our project.
     
    Last edited: Jun 9, 2016
    theANMATOR2b likes this.
  27. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @Janet Merai - Sorry I didn't get an email notification for your post, it is always best to contact us directly through the website. I have not used Adventure Creator so not sure what needs to be done to to have support for AC, would have thought there would be no problems, MegaFiers works on Mesh objects and can be controlled from the Unity Animation system or scripting so should be fine.
    I do hope to get back to the collision deformer at some point, it worked fine for some cases but not more complex concave meshes etc, not sure when I will be working on that, long todo list.
    MegaFiers can certainly help with facial animations, you can use its advanced Morphing system on its own, or use any of the other modifiers alongside the Unity blendshapes if you want, or you could use point cache for more complex animations created in a 3d package. There is also the Morph Link system which allows you to automatically drive morphs from gameobject or bone positions or rotations.
    As for FinalIK or PupperMaster again there should be no problem using them together as they work on object transforms where MegaFiers works on vertex data.
     
  28. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    We have just submitted a small update to the AssetStore and our web store. This brings a few bug fixes such as a missing Copy Object method when using the Windows App target platform, and also MegaCache missing a method on platforms that do not support multi cores. We also added the requested Morph weight option for progressive morphs, and finally did some work on the Wrap system which fixed a problem with wrap prefabs on skinned objects not work working when added back into the scene and we have also greatly sped up the wrap system to between 2 and 4 times faster. This also adds an option to use the Unity BakeMesh system for faster calculation of skinned mesh vertices which again is a lot faster but note using that option will generate GC, if you turn it off it will be a little slower but no GC will happen, hopefully Unity will fix the BakeMesh so it will reuse a mesh instead of allocating one each time in the future.

    Changes since v3.09
    • Greatly sped up the MegaWrap system, 2 to 4 times faster.
    • Added option to MegaWrap to use Unity BakeMesh for faster calculation of skinned vertices, note using the Bake option is a lot faster but will generate some GC.
    • Fix for MegaCache missing a method when used on a platform that does not support multi threading.
    • Fixed MegaCopyObject not present on Window App platforms.
    • Fixed error in SVG code on Windows App platforms.
    • Changes to the Progressive Morph Weight option so works as expected now.
    • Helper script MegaShapeRBodyPath.cs moved from Test Scene folder to MegaShapes folder to stop duplication if MegaFiers and MegaShapes are used together in a project.
    • Added weight option to Morph channels to allow adjustment of each channels contribution to the morph, useful for progressive morphs.
    • Fixed a problem with Wrapped object prefabs when they were wrapped to a skinned target causing errors and not working when added back to a scene.
     
  29. wargod

    wargod

    Joined:
    Mar 13, 2013
    Posts:
    16
    Thanks for the Awesome update on v3.09. Is there anything i need to do to the wrapped object to use bakemesh ? When i have the Bakemesh option ticked on it does not appear to be mapping to the target mesh at at all, as soon as i switch it off ( untick it ) the wrapping mesh snaps to the correct location ?
     
    Last edited: Jun 14, 2016
  30. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @wargod - Could you submit a support ticket with an example scene so I can take a look.
     
  31. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Actually I did test with the scene you sent through the other day and all was working fine with BaleMesh on and off?
     
  32. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    Hello! I have an issue about megamorph, after i've attached megamorph component and then import morph file i get sliders by which I can morph my model. Could you explain me how can i interact with those sliders in my own script? I want to make control from the game...Thx
     
  33. wargod

    wargod

    Joined:
    Mar 13, 2013
    Posts:
    16
    I just tested it in the scene i sent through ( updated megafiers of that version ) and as soon as i tick use bake mesh it no longer maps to the underlying animated skinned mesh?.You should still have access to the test project I can send a support ticket if you require one
     
  34. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    I still have will look into that for you today.
     
  35. wargod

    wargod

    Joined:
    Mar 13, 2013
    Posts:
    16
    Thanks Man, I sent through a support ticket. Let me know if you need me to send through the project location
     
  36. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    Hello! why are ignoring me?? I've written you on support 2 times, and here but you didn't answer me, why? I've bought your product!
     
  37. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @KeeLo - I don't think I am ignoring you as I have sent your four emails to you replying to your emails, I did ask for you to submit a support ticket and include your invoice number and asked for images of the inspectors for all objects that had the MegaModifyObject component attached and also asked for a test scene, you submitted a support ticket but didn't include your invoice number so it did not go into the action queue, you attached a pdf of your invoice but our support ticket system does not scan pdfs for invoice numbers. I work through support tickets in the order they come in and at this time I am just finishing off the ones ahead of you.
     
  38. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @wargod - Found the problem and a new version should be in the AssetStore with that fixed for you.
     
  39. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    Ok! So what i need to do now? I need help)
     
  40. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    As I said in my last email to you, if you could send some screenshots of the inspector for all objects that have the MegaModifyObject component attached or even better upload a test project and send a link so I can take a look.
    As for your question about changing the values of the morph amounts from script if you go to the morph page on out website there is a simple example script there that shows how that can be done. http://www.west-racing.com/mf/?page_id=257
     
  41. wargod

    wargod

    Joined:
    Mar 13, 2013
    Posts:
    16
    Thanks Chris, Really appreciate the quick turn around time.
     
  42. KeeLo

    KeeLo

    Joined:
    Nov 1, 2013
    Posts:
    76
    About our last problem, we already done, Thx
     
  43. wargod

    wargod

    Joined:
    Mar 13, 2013
    Posts:
    16
    Thanks Chris, We have tested it and it seems that there is a introduced defect. The wrapped object is not taking into account the local target transform ( the wrapped object when the target transform is set jumps to the wrong position).

    Also we have noticed that when we pull down the build from the store there is an additional file that we have to keep deleting to get the project to work.
     
  44. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    @wargod - I tested it with the test project and others and it is working fine here in Baked mode and not in baked mode, if you can submit another project that shows the problem then I can take another look.
    As for the file, it was out of place in old versions of MegaFiers and some nice kind user gave us a very low review because it was not in the right place so we moved it so it matches the location it is in in the MegaShapes asset, if you remove the one in the Test Scene folder then all will be fine.
     
    theANMATOR2b likes this.
  45. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Just tried it again and it all works fine here, I can rotate and move the target mesh and the items stay wrapped correctly, and also moving and rotating the wrapped object transform gives correct results.
     
  46. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    345
    @SpookyCat The bug that @wargod is talking about happens for non-skinned mesh, it works fine if it's a skinned mesh it's attached to.
     
  47. wargod

    wargod

    Joined:
    Mar 13, 2013
    Posts:
    16
    @SniperED007 described the the issue above. If you have a mesh that is not skinned and you wrap an object to it, as soon as you set the target it jumps to the incorrect position
     
  48. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Oh right, must have missed a change in the non skinned part of the code, was testing with skinned targets only I guess. Will get a fix done for that.
     
  49. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    For some reason I commented out a matrix multiplication in the last update, If you cant wait for the next update then if you change line 650 to:
    Code (csharp):
    1.       stm = transform.worldToLocalMatrix * target.transform.localToWorldMatrix;
    Then it should work correctly, sorry about that.
     
  50. wargod

    wargod

    Joined:
    Mar 13, 2013
    Posts:
    16
    Thanks Chris, Really appreciate you doing the updates and responding so quickly. The last bunch of performance improvements have been fantastic.