Forum

This forum is for swapping tips or ideas with fellow users, suggesting new features, or showing of what you have created with the system etc, there is no guarantee of an answer to questions posted in the forum. All support questions must be submitted via the Support ticket system

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Unity Hangs After Importing Morph File
daemionx
Newbie
Posts: 3
Permalink
Post Unity Hangs After Importing Morph File
on: May 15, 2012, 18:59
Quote

Our team is having a problem importing morphs onto our character. We have a bunch of morphs (.MOR exported from Max) for our character - each of them contains 10-20 channels and an animation corresponding to an animation clip also from Max (FBX exported). What's happening is once we import ~25 morphs onto our character, importing additional ones causes Unity to become unresponsive for about fifteen minutes and then the morph is successfully available. All morphs prior to this take only seconds to import.

I attached MonoDevelop's debugger to the MegaMorphEditor script and it looks like it's completing the entire morph import process successfully, marking the inspector dirty, then returning from OnInspectorGUI. Some time soon after that, Unity hangs. I tried getting more information (logs, a stacktrace, etc.) but was unable to figure out anything. If I removed morphs after it got to a state where it seemed "full", I was once again able to add more morphs until I got to ~25 again.

Each morph is somewhere between 100-200KB (claims the "Channel Compressed" field). Also each morph contains only a single animation (the same length as a corresponding anim clip we'll play simultaneously).

Anybody experience something similar or have any ideas for how we could handle/workaround/fix this?

spookycat
Administrator
Posts: 148
Permalink
Post Re: Unity Hangs After Importing Morph File
on: May 15, 2012, 19:33
Quote

Hi There
That is a new one to me, not heard of anything like that before. I will have a go and see if I can recreate this but I and others are using many morphed objects in a scene with no hangups like this. Can you maybe email me the fbx and mor file you are using incase there is something odd in the morph.
Chis

daemionx
Newbie
Posts: 3
Permalink
Post Re: Unity Hangs After Importing Morph File
on: May 15, 2012, 20:26
Quote

For our character, there are many FBXs (one for each animation) and many MORs (again, one for each animation). We probably have close to 50 pairs for our main character.

spookycat
Administrator
Posts: 148
Permalink
Post Re: Unity Hangs After Importing Morph File
on: May 15, 2012, 20:44
Quote

So does that mean you have a lot of Morph components on a single object? If so can I ask why you are doing it that way and not just using more morph channels. If you are using lots of Morph Components you will be wasting a lot of memory as each will have all the mapping data etc. The best practice is to make use of the channels and get it all into one morph.

daemionx
Newbie
Posts: 3
Permalink
Post Re: Unity Hangs After Importing Morph File
on: May 15, 2012, 22:38
Quote

Yeah, there are many Morphs on a single object. At startup we disable all of the morphs (set animate to false and reset the channels), then when we want to play any particular animation clip and morph pair, we start playing the clip and we set the animate field for the corresponding morph to true and reset the animtime to 0. Is there some better way we should be going about this? Our animator would like to continue using Max to animate the bones and the morphs.

spookycat
Administrator
Posts: 148
Permalink
Post Re: Unity Hangs After Importing Morph File
on: May 15, 2012, 22:50
Quote

Yeah that really isnt an ideal way of doing it. You can still use Max but just have each or your morphs as a different channel in the Max morph modifier, then do you animations in turn in max so you have one long animation, export to a mor file and import to Unity as normal, then you will have a single morph component on your object with 25 or so channels of morph data.

You can use the Morph Animator component to set up your anim clips and you can link the morph anim playback to the objects current playing anim clip if you use the same names.

It will be a lot better doing it that way, faster and use a lot less memory and produce a smaller program size at the end.

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.036 seconds.