Can I import maya blend shape animations so they work in sketchfab?

exporter
maya
animation
3d
upload

(Nickholl) #1

Is there any way of getting maya blend shape animations working within sketchfab? Im unable to bake them into an fbx was hoping there may be another solution?

thanks for any help!
Nick


(Nickholl) #2

bump :slight_smile:

If not, would be a great feature to add! :slight_smile:


#3

We support morph targets, but I'm not super familiar with Maya. Is it the same thing or some Maya-specific feature?


(Dark Minaz) #4

Well you can use the blend animation, cache it out and bake the animation down.
Then export it as fbx (should make one red line on every second = it worked)
then it should work.
The blend shape in itself is just a modifier, as long that animation isn't "saved" you can't run it in sketchfab :slight_smile:
so anything under "animation - deform" won't work unless you somehow save it.


(Nickholl) #5

hi - thanks for the feedback.

Would you be able to advise me on the best way to bake the blend shape down in Maya? Ive tried this before but didn't have any luck :frowning:

many thanks!


(Dark Minaz) #6

i mostly don't use blend shapes, but baking the simulation should work
https://knowledge.autodesk.com/support/maya-lt/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/MayaLT/files/GUID-72394768-6DD7-4676-857F-B0468509CFF6-htm.html

That way you kinda save out the animation without the deformer, then select fbx and upload it.
if that doesn't work send me the file and ill have a look at it and try to figure out why not :slight_smile:


(Nickholl) #7

hi,

just tried baking simulation but haven't had any luck :(. Ive attached the file if you'd be so kind as to take a look?body.zip (9.1 KB)

thanks again


(Dark Minaz) #8

sure ill give it a shot :slight_smile:

what i did
- go to body:pcube2 (or pcube2 inside yours probably)
so the one in the group
hit key-bake animation (leave everything as standard)
file export all (not just the object! won't work without that!)
dae_fbx export (make sure animation got a [x] under include

and then it should work :slight_smile:

of course you need to set the proper time in the timeline in the end if you just want that little animation :slight_smile: i left mine on default so its 120 frames rather than 45 :slight_smile:


(Nickholl) #9

Hi,

yes this is the result I got. Unfortuantely the arms don't seem to have converted though (those are what are using blend shapes - the other bits are just scale changes.)


(Dark Minaz) #10

oh didn't notice that.

well i tried to export it as fbx now in all different forms but it somehow looses the blend shape every single time. not sure why it does that. Even when reimporiting it into maya again.
or rather it looses the keys to the blend shape really strange :open_mouth:


(Dark Minaz) #11

ha managed to get it to work

wup wup :smiley:


(Dark Minaz) #12

So here is what i did, for some reason once you export it as fbx (ascii 2014, the default for ue4)
it keeps the node but looses the keys, don't ask me why.

So once you import that file again you should have a object with body:blendshape2 node
set keys for that node again, export it and it works.

test4.fbx (65.6 KB)

edit: went over your original file and i don't get why exactly it didn't save them out in the first place, since you did set 3 keys, but it just doesn't. maybe there is some weird mixup in the nodes there or idk.
in theory what you did should have worked that way, it just decided to not do that :smiley:
edit 2: so the simplest way to check it is to reimport the fbx, check if it really works, if not rekey the blend and then export again (check, if it works - upload it :D) it's a bit of a pain but not really sketchfabs fault, i kinda blame fbx + maya. That just seems to have a mind on it's own sometimes


(Nickholl) #13

oh wow - how interesting - and annoying :slight_smile: . Thanks a lot for your help. So basically I need to animate it twice? ill see if I can replicate what you did

thanks again


(Nickholl) #14

Could you possibly explain again what you did? :slight_smile: (not sure Ive totally grasped it).

thanks


(Dark Minaz) #15

Sure, from your file i simply hit export as fbx
ascii, 2014/2015 version
(that also shows in a popup that it converted something to a curve, might be the reason why it didn't work, although not 100% sure)
new file
import fbx that you just exported
test it - notice arms won't wave, go to the blend tab and animate it again
export
-
new file, import, now arms wave .. magic
upload that file to sketchfab :stuck_out_tongue:

i think most of the time it "SHOULD" work by default, but who knows why it didn't


(Nickholl) #16

cool- ill give it a try later :slight_smile: thanks!


(Kokusho) #17

Maya Blendshape works perfectly with FBX import.
I'm using 2 blendshapes in this model

1 for the Big Smile
1 to fix something in the right eye without modifying the original mesh.

The big Smile is animated with a few keyframe, no need to bake before exporting (it may be baked each frame during the fbx export if you check "bake animation")
The second blenshape isn't supposed to be animated, it's supposed to be always at full weight, but what I've discovered is, even if something is keyframed, if the value doesn't change during the animation it's not exported. A quick fix is to applied a very small animation for 1 frame just to be sure the exporter take account of it.

another thing is, your base mesh and target mesh must be exactly the same, Maya has an option with blendshape to not check for similar topology, and allow to blend 2 slightly differents mesh. It works in maya but it doesn't export well.


(Nickholl) #18

Hi

thats interesting (and promising) sounds like its something Im doing wrong somewhere.

Would you possibly be able to look at the file I attached further up the thread and see if there's anything Ive done wrong?

many thanks!