Gradients aren't bending properly with bones

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
Greenlaw
Posts: 10382
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Gradients aren't bending properly with bones

Post by Greenlaw »

One way might be to make two gradients, with the upper arm shape's gradient falling off to transparency. This way, when the upper arm image folds over, it has no visible effect. This idea might be overthinking the situation, but it just popped into my head. I'd mark this as something to try when every 'simpler' idea fails.

I'm pretty sure there are easier things to try, but I need to finish a tutorial I'm working on this morning.
User avatar
Greenlaw
Posts: 10382
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Gradients aren't bending properly with bones

Post by Greenlaw »

I should mention another thing I tried: Make the gradient only as wide as the arm. This idea was that when the arm sections overlap, the overlap would stay within the lower arm sections and any error would not be visible. Unfortunately, this didn't work the way I hoped it would.

Just thought I should mention it in case you were about to try this.

My current feeling is that you need to use an Image Layer with a custom Mesh Warp layer. This is the surest way to control how the image bends and have full control over the overlap quality.

Or...just drop the gradient and make the arm a solid color. (This is what I would do.) :D

Also, it's still a good idea to rig the arm vertically or horizontally rather than at an off-angle. I generally prefer vertical because that's the usual rest state of the arms during animation.
Last edited by Greenlaw on Sun Jan 05, 2025 11:46 pm, edited 1 time in total.
User avatar
ZV1LLE
Posts: 92
Joined: Mon Apr 01, 2024 5:32 pm

Re: Gradients aren't bending properly with bones

Post by ZV1LLE »

I really dont know how, or where to even start with all of this and its just making my head spin, so I'm thinking the best solution now would be to just give you the arm itself so you can take me through this properly. I'll prepare the file later and then give it to you. Thanks!
User avatar
hayasidist
Posts: 3830
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Gradients aren't bending properly with bones

Post by hayasidist »

ZV1LLE wrote: Sun Jan 05, 2025 9:13 pm I really dont know how, or where to even start with all of this and its just making my head spin, so I'm thinking the best solution now would be to just give you the arm itself so you can take me through this properly. ...
Greenlaw wrote: Sun Jan 05, 2025 7:12 pm ...
My current feeling is that you need to use an Image Layer with a custom Mesh Warp layer. This is the surest way to control how the image bends and have full control over the overlap quality.
...
This idea is similar to the approach I used here:


That has a greyscale vector shape as a base layer with the rainbow gradient (png) above it with blend mode overlay. Both are warped using the same curver layer. They're in a masking group to constrain the png to fit the vector. (Shame the curver could be applied to the masking / blend group but ...) (the colour changes are achieved by varying the base layer fill colour)

I used point animation on the curver, but that could have been done with bones.
User avatar
Greenlaw
Posts: 10382
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Gradients aren't bending properly with bones

Post by Greenlaw »

That's fun! And good to see how it could work! Thanks for your input and example, Paul.

For the overlapping, the layer could be duplicated and masked, which is how I handled all the arm overlaps in our earliest DreamWorks TV animations. Later, I came up with tricks that made masking for overlaps unnecessary, but I think it's appropriate here.
User avatar
ZV1LLE
Posts: 92
Joined: Mon Apr 01, 2024 5:32 pm

Re: Gradients aren't bending properly with bones

Post by ZV1LLE »

Your gonna have to teach me how to achieve that mesh warp effect because I think that might be the solution! anyways here's both the arm rig, and the image texture in both png and svg form:

https://drive.google.com/drive/folders/ ... drive_link

I hope this will allow you both to help me further, Thanks :D
User avatar
ZV1LLE
Posts: 92
Joined: Mon Apr 01, 2024 5:32 pm

Re: Gradients aren't bending properly with bones

Post by ZV1LLE »

And if they're also any videos teaching how to do this mesh warp effect please let me know!
User avatar
ZV1LLE
Posts: 92
Joined: Mon Apr 01, 2024 5:32 pm

Re: Gradients aren't bending properly with bones

Post by ZV1LLE »

I found a tutorial that might just help me out!

https://youtu.be/0Qs9S4QIX8E?si=_LAyBA-3XFVLN9ih

I hope this will be able to fix my problem :)
User avatar
ZV1LLE
Posts: 92
Joined: Mon Apr 01, 2024 5:32 pm

Re: Gradients aren't bending properly with bones

Post by ZV1LLE »

So I have some good news and bad news.

The bad news is that I realized the solution I said would help me earlier just will not work for what I'm going for. Only way it will is if the entire arm was just a png image but at the point I just called it quits :(.

The good news is that I realized that changing the gradient handle actually makes a keyframe in the timeline. Although I tried it before and the handle just crazily spun around, I decided to give it another try and IT WORKS!!!!! :D. I think this is how I can fix the problem with the texture moving incorrectly by changing its handle in the smart action.

I'll give you more updates on what happens, so see you there!
User avatar
ZV1LLE
Posts: 92
Joined: Mon Apr 01, 2024 5:32 pm

Re: Gradients aren't bending properly with bones

Post by ZV1LLE »

YES YES YES YES!!!!!!!!!! THE ARMS PROPERLY BEND WITHOUT THE COLOURS DISTORTING I'M SO HAPPY I GOT THIS FIXED THANK YOU SO SO SO MUCH I'VE BEEN TRYING TO FIX THIS SINCE DAY ONE!!!!!!!!!!!!!!!

One of the reasons I love Moho is that anything can be made into a keyframe, even this gradient handle. And that just so happened to be the solution, using an image texture and animating the gradient handle in the bones smart action to correct any improper movement with the texture.

Here's a before and after, Thanks so much Greenlaw! You're the angel of this forum once it comes to solving these problems you NEED to get the Moho team to help you out in producing even more tutorials for everyone.

Before
Image

After:
Image
Post Reply