-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duik Bassel wrong hand rotation #1661
Comments
Hi, I'm having a problem when opening the .aep |
Hi! Sorry for that, I have accidentally deleted null layers while preparing project for sharing. I have fixed missing layers now and re-saved the project. To be sure, I've also confirmed that error still persists. New version is available at the same link: |
Yes, indeed valueAtTime doesn't work with properties with expressions. |
Thank you for taking the time to look at this issue! I think this limitation of Also, in case someone stumbles upon this thread, I'd like to share a possible workaround. Possible workaround One can use In my particular case I've pre-baked the |
It makes sense to report the limitation somewhere. Perhaps on the wiki pages of the player. I'm more concerned about the phrasing since it fails on very specific cases where the targetted property is itself targetting other properties. |
Are you saying that if I use |
yes, it should, but if you are saying that it always targets getStaticValueAtTime, perhaps it doesn't. |
I was just asking to clarify if I understood correctly, so I could write that in the PR for documentation. To be sure, I've made a simple demo for testing purposes. Demo have 5 layers, each of which is the shape layer containing a square. Squares go from left to right:
Layers 1,2,4,5 behave in Lottie the same as in AE:
But Layer3 stays in place instead of behaving like Layer2 with 0.5s delay. According to my definition of the "simple" expression property in the question above, Actually, based on this block of code I think In fact, if I add keyframes to the Layer1's transform.position property and make the square move in the opposite direction, Layer3 gets that data from I think that in the end there should be two |
I've checked the code and it targets |
Tell us about your environment
I am running lottie-web 5.5.4 in very simple create-react-app single page web app.
Here is the complete codesandbox:
https://codesandbox.io/s/lottie-web-duik-bassel-error-k2s7t
What did you do? Please explain the steps you took before you encountered the problem.
I used Duik Bassel to make a simple humanoid character and added Walk Cycle to it.
I attached a single hand to the bones.
I exported the animation using bodymovin to
v8.json
(see in codesandbox).I played this animation using the
lottie-web
version 5.5.4.What did you expect to happen?
Walk Cycle uses Forward Kinematics (instead of IK) for hand wobbling, so the hand gently moves.
Hand is oriented down.
What actually happened? Please include as much relevant detail as possible.
Hand has constant orientation (as if I disable the hand rotation expression on layer "S | Hand 2")
Arm movement is correct. (Only hand wobble is missing)
Investigation
I digged through the source code and exported v8.json, comparing it with the values I see in AE, and found out that:
Property "Rotation" of Layer "S | Hand 2" uses expression which in this case essentially boils down to:
which references property 13 of the effect "IK | Hand" on the layer "C | Hand 2".
That property is defined using the expression which can be simplified to:
Going next to the property 75 of the effect "Walk Cycle" of the layer "C | Walk Cycle" resolves in simple negation of property 69 of the same effect. While the property 69 has some extensive computation in which it references property 68 like this:
Debugging this in Chrome reveals that call to the function
valueAtTime
is directed to thegetStaticValueAtTime
function which returnsthis.pv
which equals 0.Apparently this is a bug and
valueAtTime
should reference thegetValueAtTime
function.At this point I came to the idea that
valueAtTime
for expression properties may not be supported at all, so I've decided to pause the debugging and write this issue and probably get some feedback before digging deeper.Please provide a download link to the After Effects file that demonstrates the problem.
https://drive.google.com/file/d/1gWUJkCiilNDO0d3c4yB_K7JeI15WNYX0/view?usp=sharing
The text was updated successfully, but these errors were encountered: