Hi Friends,
I've been waiting for the gradient mesh, ever since I tried to animate my old avatar (the endless knot) so many years ago (something like 6 or 7), and discovered I couldn't bend the gradient. So now I've picked that up again, and wanted to discuss if there's a better way than my first attempt.
Here's one of the 9 pieces, and you can see what I did with the mesh. First, I added extra path nodes evenly spaced, so I could snap the mesh nodes to them. I started at the top, imagining the mesh as a ribbon. At the corners, I sort of mitered the ribbon. So on the outside of the corners, the nodes are placed one by one. But the inner side of the corners, each corner has 3 mesh nodes on top of each other.
As the nodes go along the outside of the corners, the color and transparency changes in a regular way. I think each step the opacity changes by 30%. About halfway along, I also changed the lightness, because the natural change of opacity, without changing the lightness, looked a little odd. The green color seemed to get grayer as it became more transparent. So somewhere in the middle, the lightness went up some. It still seems to get grayish on the end, and I might even change the hue towards the end, more towards yellow.
It didn't work so well for the inner nodes to match the outer ones, because 2 steps are combined into one step. There was a sudden change in the middle of the corner which looked unnatural. So all 3 corner mesh nodes are the same lightness, with only the opacity changing. I'm not sure if that's exactly proper. Maybe the opacity should hold the same as well??
Then for that middle column of mesh nodes....I guess they should be the same as the outer nodes for color and opacity, at the corners. But I'm not sure.
But what I'm really not that sure about is whether mitering is the best approach. I wonder if it would be better not to have the 3 mesh nodes on top of each other, and instead, just have them spaced evenly between the nodes before and after the corner.
Or, I wonder if there would be some way to use a conical gradient, somehow?? Would that be better? More or less realistic? The center of it would not be seen. The center of it would be in the center of the corners, about where that little black circle is, and I would clip it with the outline of the knot piece. But it seems like the conical gradient wouldn't work because those corners are 90° angles there, rather than curves.
What do you all think? Do you have any other ideas?
Of course, whenever I finally get to the animation part, I'll export PNGs, so there won't be any transparency in the gradients. It will just go green to white. And then iirc, the PNGs get converted to GIFs in GIMP.
Use SMIL, you say? Or maybe some javascript or ECMAscript? Hhm....doe SMIL support gradient mesh, or any kind of gradient? I'm guessing not. But I wonder about javascript? Well, that's still for some day in the far future!
OMg, I just thought of a way I might have been able to animate this a long time ago! I could have solid color circle move its way along through the knot, one position at a time. Wouldn't be as cool as a trailing light or flame or smoke which the gradient implies. Well, I could still do that though. Maybe even using SMIL!