FBX export to Unity with Switch Layers

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
embraiz
Posts: 1
Joined: Mon Dec 05, 2016 2:01 pm

FBX export to Unity with Switch Layers

Post by embraiz »

...(or other visibility toggle function)

Hi All,

I'm fresh to this forum and also not native English speaker, so please bear with me.

I have been trying to have my characters exported as FBX and then import them to Unity. This whole FBX topic has several serious issues both on AS and Unity side, most of which I have successfully tackled. Yay! (btw. I am planning to write a thorough tutorial when I am done, but I have to solve this [hopefully] last issue. I am nearly there guys, and it is gonna be awesome, but I need your help!)

This far I learned:
- FBX is a very limited very format in terms of 2D model creation. There is not at all any support for vector operation e.g. point binding, point translation, etc. Basically you have to consider your vector layers as if they were images. - check
- AS Pro 11.2 is required, mostly due to the importer script to be put into Unity Editor folder - check
- Tick on FBX Preview mode to see what is exactly going to be exported to the FBX - check
- Use flexi binding instead of layer binding - check
- This I learned myself (and asking whether others had this issue as well): if there IS a red dot (e.g. vector layer is optimized for flash export), flexi binding does NOT work, not even inside AS Pro. Had to redo quite many layers of my models because of this. - check

Most of the things work when all the above are being taken into consideration. BUT! I can't have the switch layers tool/effect (whatever) working reliably. As with the case of one of my characters: I am trying to "animate" the mouth movement. Because FBX does not let you translate points, I decided to create the character's mouth positions on different layers and switch them when the character's talking. Inside AS it shows as it was switching (I can see the the different layers appearing/disappearing in the animation inside Anime Studio), but after exporting to FBX, and importing to Unity, nothing happens with the switches. Only the top layer is visible from the switch layers throughout the whole clip. Other part of the same animation clip is playing perfectly.

Is anybody still here? Good, because it gets worse! I have an animated background element in the same game. On this BG element, I am also using switches (among other layer based animations), and there it works!

Main differences between the two models are:
- BG element's layers are imported images (PNGs), while the character's layers are vectors
- BG element does not have bones at all, while the character does
- BG element is a completely new model, while some parts of the character come from a model made with an earlier version of AS Pro (10 maybe)

My findings so far with the switch problem:
- It does not work without bones
- It does not work ticking off Allow nested layer control
- It does not work if enabling animated layer order, and trying to hide/show layers that way instead of using switches
- It does not work either with vector layers, nor imported images

The main reason I am coming here and not to Unity forum is my guess for the root of the problem: for some reason AS Pro does not include (or does not always include) some information about these layers. I found that when successfully exporting and importing an FBX model with switches, the switch layers themselves are being stored in the FBX like this:
- the "switched off" layer is being scaled down to minimal, not visible level (scale: 1-e06)
- the "switched on" layer is being scaled up to the proper value on the same frame
What I found is that when a switch does not work in an FBX model, the file itself does not have the information stored (or it loses the information through the import process?).

I am happy to share my work with any of you who is able and willing to help. I'd really appreciate that.

One last thing: when trying to export an FBX, sometimes my AS simply does not create the file. Maybe there is a compatibility issue? I am using Win 7 x64 on an old-ish Toshiba laptop with AMD mobile GPU.

Many thanks advance!
embraiz
ilovelessons
Posts: 52
Joined: Sat Dec 03, 2016 12:11 pm

Re: FBX export to Unity with Switch Layers

Post by ilovelessons »

Hey Embraiz,

I am having the same exact problem with the Switch layers in Moho 12. In Moho 12 the switch layers look perfectly fine in the FBX preview mode but when imported into Unity only one of layers in the switch layer shows. I was wondering if you found a solution by now and if so are willing to show such with me / us :)

I have been trying for a few days now to resolve this issue with no luck.

Thanks.

Regards,
iLoveLessons
hano
Posts: 27
Joined: Sun Jan 01, 2017 7:37 pm

Re: FBX export to Unity with Switch Layers

Post by hano »

So you guys are having trouble with Unity? Damn, this exactly why I'm using Moho because I heard it is easy to export animation to unity.
So have you solved your problems or should I be wary?
ilovelessons
Posts: 52
Joined: Sat Dec 03, 2016 12:11 pm

Re: FBX export to Unity with Switch Layers

Post by ilovelessons »

hano ,

I would advise be cautious.. if you plan to use FBX files MOHO in my opinion is not a good option. I have not resolved the issue totally as yet. I have received a lot of help from the forum here but nothing is working perfect.. the fact that you need to write code to partially resolve this error says a lot. They say Maya FBX export works fine but I can't afford it lol... I think the Moho company really needs to address this issue on this forum and have their staff solve this issue because using FBX in game designs are really a big thing.

I am really dissapointed in the Moho Company. When I get a chance I'll post how they tried to help me and show you all the "suggestions" they made in helping me resolve this issue.. it was really ridiculous... :S

Yes I am still angry GRRRR
hano
Posts: 27
Joined: Sun Jan 01, 2017 7:37 pm

Re: FBX export to Unity with Switch Layers

Post by hano »

ilovelessons wrote:hano ,

I would advise be cautious.. if you plan to use FBX files MOHO in my opinion is not a good option. I have not resolved the issue totally as yet. I have received a lot of help from the forum here but nothing is working perfect.. the fact that you need to write code to partially resolve this error says a lot. They say Maya FBX export works fine but I can't afford it lol... I think the Moho company really needs to address this issue on this forum and have their staff solve this issue because using FBX in game designs are really a big thing.

I am really dissapointed in the Moho Company. When I get a chance I'll post how they tried to help me and show you all the "suggestions" they made in helping me resolve this issue.. it was really ridiculous... :S

Yes I am still angry GRRRR
It's disappointing to hear that and just when I was almost finished rigging my character too :(

I just tested exporting FBX to Unity and the result was funky with the leg acting not as it should.

So my question to you dear, did you just redo the work you did in Moho in another program? (Starting over) or did you find a workaround other than using FBX and continue to use Moho for game development?
ilovelessons
Posts: 52
Joined: Sat Dec 03, 2016 12:11 pm

Re: FBX export to Unity with Switch Layers

Post by ilovelessons »

hano ,

What I ended up doing was I had to re do my rig and had to make my animation less complex. Like when my character is moving Ii cannot make his eyes blink etc .. so my animation ended up not looking as cool as I wanted it too GRRRRR...

I think Moho should develop a patch ! whos with me ! PATCH PATCH PARCH !!! RAHHHHHHHHHHH lol
hano
Posts: 27
Joined: Sun Jan 01, 2017 7:37 pm

Re: FBX export to Unity with Switch Layers

Post by hano »

ilovelessons wrote:hano ,

What I ended up doing was I had to re do my rig and had to make my animation less complex. Like when my character is moving Ii cannot make his eyes blink etc .. so my animation ended up not looking as cool as I wanted it too GRRRRR...

I think Moho should develop a patch ! whos with me ! PATCH PATCH PARCH !!! RAHHHHHHHHHHH lol

I love this software but if that is the case we were victims to false advertisement. SmithMicro always used this as a selling point, that Moho works great with Unity. GRRR now I'm angry as well.
Post Reply