leetful / u.movin

Unity library for rendering After Effects shape animations
MIT License
255 stars 32 forks source link

DON'T DRAW SHAPE -> NO PTS #1

Open asger60 opened 5 years ago

asger60 commented 5 years ago

Hey I'm having a hard time importing animations exported from AE / Bodymovin into Unity. I can view the animations on the lottiefiles webpage, so the files must be ok. I've attached one of the animations, maybe you can see what's wrong with it? {"v":"5.5.2","fr":60,"ip":0,"op":60,"w":600,"h":600,"nm":"start_sprite","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[301,302,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[500,500],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":100,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[-1,-2],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[301,302,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":1,"k":[{"i":{"x":[0.4,0.4],"y":[1,1]},"o":{"x":[0.2,0.2],"y":[0,0]},"t":0,"s":[500,500]},{"t":59,"s":[0,0]}],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":100,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[-1,-2],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0}],"markers":[]}

d-ocean commented 5 years ago

Same issue - with ellipse path too. Im guessing it isnt supported.

leisztom commented 4 years ago

I managed to make my test JSON file work in Unity by enabling "Export old json format (for backwards compatibility)" in the Advanced settings. Hope this helps.

Shaun-Fong commented 4 years ago

I managed to make my test JSON file work in Unity by enabling "Export old json format (for backwards compatibility)" in the Advanced settings. Hope this helps.

there is no advanced for json file, what unity version you using?

leisztom commented 4 years ago

there is no advanced for json file, what unity version you using?

Not in Unity, that's a setting in the Bodymovin extension inside After Effects.

Shaun-Fong commented 4 years ago

there is no advanced for json file, what unity version you using?

Not in Unity, that's a setting in the Bodymovin extension inside After Effects.

okay , thanks bro

dburongarcia commented 4 years ago

It's not working with the "Export old json format (for backwards compatibility)" in the Advanced settings.

dburongarcia commented 4 years ago

I just checked a plenty of animations and some of them work with "Export old json format (for backwards compatibility)" but the majority has problems or errors. I guess the code could be updated with the new features of vector graphics and trying to get more compatibility with different shapes and features. Trim path would be great for motion graphics.

ManikandanDennis commented 2 years ago

Make sure all shapes are created by the bezier path in AfterEffects. If you created an object using a circle shape, you have to convert the circle path to a bezier path.