airbnb / lottie-web

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/
MIT License
30.54k stars 2.87k forks source link

Gradient color can not randering #719

Closed bfayangyang closed 6 years ago

bfayangyang commented 6 years ago

hi this problem always be here , I creat a gradient layer ,but when I rander .it ,it always be a white-black one.

bfayangyang commented 6 years ago

I downloaded someone else with a gradient file, with my AE output json file is still black and white, I guess it may be my AE by some permissions, do not know if you can help me?

bfayangyang commented 6 years ago

By the way, before I saw someone asked a similar question, I also AE2017, English, Window10 operating system

bfayangyang commented 6 years ago

I send the same file to others.His computer is mac and he can rander it with no problem.

wyfang commented 6 years ago

https://github.com/airbnb/lottie-web/issues/708

bodymovin commented 6 years ago

Can you try with version 5.0.1? This might be solved now.

Attitrue commented 6 years ago

hi,i also have the same problem. I've tried the latest version but it still doesn't work. it seems we have to wait for the update.but if there is a pressing need to use JSON to apply in a project,you can modify the JSON file directly with code/docs/json .for example,i modify the value of array"K" in array"G" then it can be parsed by LOTTIE correctly.

bfayangyang commented 6 years ago

I tried the new version,but it still not work

MadGraph commented 6 years ago

Hey guys, I know why it's black and white !!

I spent 2 hours playing with the json file.

which renders "k":[0,1,1,1,1,1,1,1] => positionColor1,r,g,b,positionColor2,r,g,b

I replaced that using my RGB colors:

Taking R / 255, then G / 255 etc... I got that: "k":[0,0.85,0.27,0.98,1,0.26,0.93,0.99] capture d ecran 2018-02-11 a 20 47 32

It worked...

=> Next step was understanding why ae/bodymovin output for my gradient was black&white

ANSWER:

In after effects, Go to your gradient colors and make sure you clicked RGB instead of TSL. Do a render again and you're all set. No more black and white!!

capture d ecran 2018-02-11 a 20 41 52

Hope that will help you :)

yizihan commented 6 years ago

@MadGraph your ANSWER is very helpful!

tehfailsafe commented 6 years ago

Still having same problem, only black and white output. Is there any other place to set color values? This is a fresh install of AE

bodymovin commented 6 years ago

@tehfailsafe have you tried saving the project before exporting?

tehfailsafe commented 6 years ago

I'm not at my desk at the moment to check, but I suspect I never saved since I was just working on a test project... That cost me an hour or so... Jeez hahah

BalzacV commented 6 years ago

From our tests it sees that if you change color of the gradient of a single object than you get the blackwhite results. We didnt find a solution for changing the color of a gradient on a single object.

MadGraph commented 6 years ago

@tehfailsafe Otherwise you can modify it directly in the json file That works for sure 100% of the time :)

Taking R / 255, then G / 255 etc... I got that: "k":[0,0.85,0.27,0.98,1,0.26,0.93,0.99]

SimonLeclercq commented 5 years ago

Hi guys, hope you'r all fine.

I can't create a gradient layer from AE. It always display a black & white gradient.

i tried @MadGraph solution, with no results..

Does someone have an idea ?

Help is welcome haha :)

bodymovin commented 5 years ago

@N0t-Simon hi, can you share the .aep?

ccchenlll commented 1 year ago

how