how would you do this? a one click fade out button.

Please use this part to report bugs & errors, ask questions & "How to..."
User avatar
Peter Wassink
Posts: 4437
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

how would you do this? a one click fade out button.

Post by Peter Wassink »

i would like to make a custom panel action that fades out the layer in a fixed number of frames.
i'm looking for a direct 1 click solution without having to set the fxstack fade transistion FX each time.

so for instance a 4 frame fade out would give me this:
fade-out.png
fade-out.png (25.14 KiB) Viewed 14070 times
So you would be on the last frame, click the button and the layer would get reduced capacities of 20 40 60 and 80% for the last 4 frames

i want a similar button for fade in and maybe a 5 frame variant.

i thought this could be done relatively easy using the action menu, so without scripting, just using a few script commands but i'm stuck.
how do you command a 20% opacity reduction?
Last edited by Peter Wassink on 15 Jun 2021, 11:10, edited 1 time in total.
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
Peter Wassink
Posts: 4437
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: how would you do this? a one click fade out button.

Post by Peter Wassink »

when i use this command: tv_RectFill x1 y1 x2 y2 [cx cy] [button]

by setting: tv_RectFill 0 0 1920 1080
i get a filled square... yeah!
(its easier then i thought actually, i should have dived into this earlier, its kind of fun.)
but now i want to control its opacity and also erase with it instead of coloring with it.

how do i syntax that?

do i need tv_areainit to first set opacity?
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
Peter Wassink
Posts: 4437
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: how would you do this? a one click fade out button.

Post by Peter Wassink »

in the tvpaint wiki i don't understand this part:
tv_RectFill x1 y1 x2 y2 [cx cy] [button]

Draws a filled rectangle in the current image in the current layer. The x1 y1 and x2 y2 arguments indicate the positions of the top left and bottom right corners of the rectangle respectively. If color range or opacity mapping is active,
this:
"If color range or opacity mapping is active"
how do i set the opacity for the fill?

and also i'd like to erase with the rectangle, so i guess i'd have to apply it with "button 1"?

but it doesn't seem to work
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
slowtiger
Posts: 2949
Joined: 08 May 2008, 21:10
Location: berlin, germany
Contact:

Re: how would you do this? a one click fade out button.

Post by slowtiger »

I'm lazy, so I cut that layer to have the last frame as a new layer, add an empty frame, now stretch this 2-frame layer to the desired fade length with "interpolate".
TVP 10.0.18 and 11.0 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
User avatar
Peter Wassink
Posts: 4437
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: how would you do this? a one click fade out button.

Post by Peter Wassink »

slowtiger wrote: 15 Jun 2021, 12:05 I'm lazy, so I cut that layer to have the last frame as a new layer, add an empty frame, now stretch this 2-frame layer to the desired fade length with "interpolate".
Alas, this doesn't work with content on the layer.
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
Svengali
Posts: 1571
Joined: 28 Dec 2006, 10:08

Re: how would you do this? a one click fade out button.

Post by Svengali »

I've used a custom FXStack effect that works for both fade in and fade out in 8 frames. I created a button (using the FXStack Bin option) that automatically loads the FX Stack window with the custom FXstack effect.
Then I choose Fadein8 or Fadeout8, and reposition the two keys (which can be adjusted to any length fade), test it, apply it and close the FX Stack window. The Speed Profile is handy if I want the fade in or fade out to have a different pace.
FadeIn-FadeOut.png
FadeIn-FadeOut.png (54.74 KiB) Viewed 14032 times
sven
TVP Pro 11.0.10-64bit Win10 - 64GB ram -2TB HHD - 256GB SSD - Wacom Cintiq 16, driver 6.3.41-1
Android Tablet: rel. 11, Samsung Galaxy Note10.1 - 32GB with microSD 32GB
Android Tablet: rel. 11.5, Samsung Galaxy Tab S7plus - 128GB with microSD 64GB
User avatar
slowtiger
Posts: 2949
Joined: 08 May 2008, 21:10
Location: berlin, germany
Contact:

Re: how would you do this? a one click fade out button.

Post by slowtiger »

Peter, are you sure it doesn't work? It does here all the time!
TVP 10.0.18 and 11.0 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
User avatar
Peter Wassink
Posts: 4437
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: how would you do this? a one click fade out button.

Post by Peter Wassink »

slowtiger wrote: 15 Jun 2021, 14:08 Peter, are you sure it doesn't work? It does here all the time!
yes, i didn't explain clearly... i need to fade out animated content not a still image.
your method works if you then turn stencil on and clear the bottom layer.
those are all extra steps i was looking to avoid.
but i could try and see if i can get all these steps inside a custompanel action.

i was just hoping someone would tell me something like:
use this command: tv_setthecurrentframeopacitytothispercentage
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
Peter Wassink
Posts: 4437
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: how would you do this? a one click fade out button.

Post by Peter Wassink »

Yes, i thought about this approach but it would be nice to get rid of this step:
Svengali wrote: 15 Jun 2021, 13:51and reposition the two keys
as well.
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
Peter Wassink
Posts: 4437
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: how would you do this? a one click fade out button.

Post by Peter Wassink »

trying to built a custom action using Markus approach

i get stuck at trying to stretch the layer:
i think i should use this command: tv_layerstretch

but the wiki does not give me example of how to use it...
script.png
script.png (6.18 KiB) Viewed 13995 times
Attachments
Screenshot 2021-06-15 153306.png
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
slowtiger
Posts: 2949
Joined: 08 May 2008, 21:10
Location: berlin, germany
Contact:

Re: how would you do this? a one click fade out button.

Post by slowtiger »

Ah! Of course, animated content is different.

I remember a project once where I had to do a lot of fades, all of the same length fortunately. So I created a frame filled with colour, extended this to make a fade, then later placed this at the right frame and used as a mask on the animated layer, selected frames, hit delete - done.

Speaking in general, being able to script fades would be really nice. I'm thinking of the old technique of animating with multiple crossfades. There was a diagram for this somewhere in the net ... think of Frédéric Back.
TVP 10.0.18 and 11.0 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
User avatar
D.T. Nethery
Posts: 4225
Joined: 27 Sep 2006, 19:19

Re: how would you do this? a one click fade out button.

Post by D.T. Nethery »

slowtiger wrote: 15 Jun 2021, 16:37

Speaking in general, being able to script fades would be really nice. I'm thinking of the old technique of animating with multiple crossfades. There was a diagram for this somewhere in the net ... think of Frédéric Back.
This ? -- https://one1more2time3.wordpress.com/?s=dissolves

Animator, TVPaint Beta-Tester, Animation Educator and Consultant.
MacOS 12.7.1 Monterey , Mac Mini (2018) , 3.2 GHz 6-Core Intel Core i7,
16 GB RAM , TVPaint PRO 11.7.1 - 64bit , Wacom Cintiq 21UX 2nd Gen.
,Wacom Intuos Pro 5 , Wacom driver version 6.3.39-1
User avatar
slowtiger
Posts: 2949
Joined: 08 May 2008, 21:10
Location: berlin, germany
Contact:

Re: how would you do this? a one click fade out button.

Post by slowtiger »

Yes, exactly! (I was searching the wrong blogs.)
TVP 10.0.18 and 11.0 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
Xavier
Posts: 1855
Joined: 01 Oct 2019, 11:08

Re: how would you do this? a one click fade out button.

Post by Xavier »

As for me, I would rather add a new layer that darkens with the fade. Easier to do than to modify the actual layer.
User avatar
Peter Wassink
Posts: 4437
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: how would you do this? a one click fade out button.

Post by Peter Wassink »

Xavier wrote: 16 Jun 2021, 10:33 As for me, I would rather add a new layer that darkens with the fade. Easier to do than to modify the actual layer.
Well yes, but i need to crossfade. So there is no way other then to gradually erase the current layer.

i would love for it to be possible to have a new type of layer, like Photoshop's layer-fx
Where you could create a fade layer with for instance erase blend mode that would only act upon a specific layer/group (or folder... in the future)
this could allow a crossfade to be non-destructive!
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
Post Reply