animate shape visibility

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
Daxel
Posts: 967
Joined: Wed Mar 27, 2019 8:34 pm

animate shape visibility

Post by Daxel »

Hi!
I have one vector layer with a few shapes that are using a style. I want to make those shapes sometimes invisible and sometimes visible again, but I have a few problems:
I need a reversible solution because I want to be able to make those shapes appear again if needed.
I want the reference to keep working as good as possible, and I would like to keep using the style they have.
I tried animating the change of the style from it's style to a new style I named "invisible", but I can't find the way to do that. Is that possible? I know it's possible to animate a certain style, but that's not what I want because I dont want to affect the other shapes that are using that style. Do you know another technique that could help with this?
User avatar
slowtiger
Posts: 6067
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: animate shape visibility

Post by slowtiger »

Much easier to animate layer visibility. If necessary, transfer shapes to additional layers.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15

Moho 14.1 Mac Mini Plus OS 13.5
Daxel
Posts: 967
Joined: Wed Mar 27, 2019 8:34 pm

Re: animate shape visibility

Post by Daxel »

slowtiger wrote: Thu Feb 27, 2020 10:01 am Much easier to animate layer visibility. If necessary, transfer shapes to additional layers.
Yes but in this case I need them on the same layer because the shapes are conected, like triangles on a mesh. Keeping the style is not that necesary so I will give up using styles for this and will just make the stroke and fill transparent to make them dissapear. It's just that sometimes I don't know if there is a better way to do what I'm doing because Moho is incredibly flexible and the documentation only scratch the surface. Thank you.
User avatar
slowtiger
Posts: 6067
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: animate shape visibility

Post by slowtiger »

In that case you can only make them invisible at the same time anyway, so I'd do it with the layer tab settings.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15

Moho 14.1 Mac Mini Plus OS 13.5
Daxel
Posts: 967
Joined: Wed Mar 27, 2019 8:34 pm

Re: animate shape visibility

Post by Daxel »

slowtiger wrote: Thu Feb 27, 2020 1:59 pm In that case you can only make them invisible at the same time anyway, so I'd do it with the layer tab settings.
No, I mean different shapes but connected because they are using some common points, like a square right next to other square (that way moving those common points between them would animate both shapes). So just turning down the opacity of the colors of one of those shapes I make it dissapear but the other one remains visible.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: animate shape visibility

Post by Greenlaw »

To keyframe a layer's Visibility, open the layer settings and disable the Visibility option. Once the Visibility channel appears on the timeline (you need at least one animation keyframe in the timeline, not just frame 0,) then you can simply double click on any frame in that channel and it will toggle Visibility. I find this method is quicker than opening the Layer Settings.

This will affect the visibility of all shapes in the layer. If you want to affect multiple layers with one channel, place the layers inside a Group and animate the groups visibility.

BTW, it's not necessary to enable Allow Animated Layer Effects to animate Visibility.

If the layers cannot be contained in a single group, then you should use a Smart Bone Action to control the visibility of all the layers you wish to control with it.

If all the shapes you with to affect are in a single layer, and you want to control the visibility of the shapes inside that layer individually, then you need to control each shape's opacity. To do this, you can affect the transparency in the Style of each shape in a Smart Bone Action. If you need different shapes to come on and off, you can have multiple keyframes in the Action to control this. When animating this on the Mainline, be sure to set the Smart Bone to animate with Step keys...this way, it can show each the state non-linearly.

IMO, this last approach is probably making the work more complicated than necessary but there can be situations where this is ideal method. It's good to be aware of all the options so you know what to do in special cases.

The first suggestions above should pretty much cover any situation but just in case, here two other methods you can explore: using animated masks or simply moving the shapes/layers off camera or scaling and hiding them behind other shapes. (I've actually used this last one.)
Last edited by Greenlaw on Thu Feb 27, 2020 6:31 pm, edited 1 time in total.
Daxel
Posts: 967
Joined: Wed Mar 27, 2019 8:34 pm

Re: animate shape visibility

Post by Daxel »

Greenlaw wrote: Thu Feb 27, 2020 4:05 pm To keyframe a layer's Visibility, open the layer settings and disable the Visibility option. Once the Visibility channel appears on the timeline (you need at least one animation keyframe in the timeline, not just frame 0,) then you can simply double click on any frame in that channel and it will toggle Visibility. I find this method is quicker than opening the Layer Settings.

This will affect the visibility of all shapes in the layer. If you want to affect multiple layers with one channel, place the layers inside a Group and animate the groups visibility.

BTW, it's not necessary to enable Allow Animated Layer Effects to animate Visibility.

If the layers cannot be contained in a single group, then you should use a Smart Bone Action to control the visibility of all the layers you wish to control with it.

If all the shapes you with to affect are in a single layer, and you want to control the visibility of the shapes inside that layer individually, then you need to control each shape's opacity. To do this, you can affect the transparency the Style of each shape in a Smart Bone Action. If you need different shapes to come on and off, you can have multiple keyframes in the Action to control this. When animating this on the Mainline, be sure to set the Smart Bone to animate with Step keys...this way, it can show each the state non-linearly.

IMO, this last approach is probably making the work more complicated than necessary but there can be situations where this is ideal method. It's good to be aware of all the options so you know what to do in special cases.

The first suggestions above should pretty much cover any situation but just in case, here two other methods you can explore: using animated masks or simply moving the shapes/layers off camera or scaling and hiding them behind other shapes. (I've actually used this last one.)
Thank you so much! The smartbone action controlling the transparency of the shapes is exactly what I need in this case.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: animate shape visibility

Post by Greenlaw »

Glad that helped!

I wish the custom Styles list was keyframeable. This way, we could just create a fully transparent Style (maybe called 'Hide',) and select it from the list. Unfortunately, that's one of the features you can't keyframe and use in an SBA.
Daxel
Posts: 967
Joined: Wed Mar 27, 2019 8:34 pm

Re: animate shape visibility

Post by Daxel »

Greenlaw wrote: Thu Feb 27, 2020 6:38 pm Glad that helped!

I wish the custom Styles list was keyframeable. This way, we could just create a fully transparent Style (maybe called 'Hide',) and select it from the list. Unfortunately, that's one of the features you can't keyframe and use in an SBA.
Yes that would be cool, its what I tried first.
Post Reply