Forums > Jitter

Fading videoplanes

July 7, 2011 | 8:52 pm

Hi

I’m almost finished building some work which uses five videoplanes and a fader to fade them in and out (using a line on color alpha). My app is running fast but the fades themselves look pretty bad (very jerky) especially if I make them (as I want) 10 – 20 seconds long. I’ve included the basic mechanism I’m using below which looks ok as its really pared down but once I take it up to five and add my app around it slows right down.

Is there a better/faster/smoother way to fade in and out? Is the line the issue, maybe I need to use a fade that somehow speeds up as it nears it’s climax or perhaps the videoplane is the issue and I should be using something like a sketch instead (the videoplanes I’m using have jpgs showing on them)?

Any suggestions of what I could try would be appreciated. Thanks.
Garrett

– Pasted Max Patch, click to expand. –


Ed
July 8, 2011 | 7:10 am

Well, I have a patch that draws 8 small oval videos over top an HD video (as well as playing another HD video, recording and displaying webcam images, playing music, etc.). When I converted it from Jitter matrices to use videoplanes and shaders, I saw a 3X increase in the framerates. I tried a couple of different approaches but using videoplanes seemed the fastest most streamlined method.

How are you modifying the alphachannel? Are you using the alphaglue shader? How often are you opening video files? Are you doing any additional jitter matrix operations?

Have you tried running your patch on a different computer? Mine really dragged on a dual core Intel system with 4GB of RAM and an old video card but ran VERY smooth on an i7 gaming machine with 6GM of RAM and a good gaming card.


July 8, 2011 | 7:48 pm

Hi

>How are you modifying the alphachannel?
>Are you using the alphaglue shader? How
>often are you opening video files? Are
>you doing any additional jitter matrix
>operations?

As in the demo patch I posted, it’s a line fading the alphachannel of color up and down. Not sure what the alphaglue shader is, can you elaborate on that? No videos are being shown on the videoplanes, I’m pulling jpgs from the web into a matrix and showing them on the videoplane about every 10-30 seconds.

>Have you tried running your patch on a
>different computer? Mine really dragged
>on a dual core Intel system with 4GB of
>RAM and an old video card but ran VERY
>smooth on an i7 gaming machine with 6GM
>of RAM and a good gaming card.

2.33 GHz Intel Core 2 Duo with 2GB of Ram. Yes not the newest and fastest, I have one that is newer and is the destination computer anyway so I need to test on that.

Thanks for the suggestions.

Garrett



Ed
July 8, 2011 | 9:16 pm

Sorry, you don’t need to use the alphaglue shader if you’re not creating alpha masks (it lets you copy the alpha channel from another video or use the luma from one video to set the alpha in another video). Your method of setting the alpha channel is actually quite economical.

Do you see the stuttering problem when fading 5 videoplanes but without adding in the rest of your app? If so, I would tend to blame the video card or the size of your jpeg images.

I ran a test on my machine using your method. When I used HD videos, it stuttered quite a bit. When I used small videos, it worked very smoothly. How big are the image files you’re displaying?

Here’s the code I used. See how it works on your machine.

`

– Pasted Max Patch, click to expand. –


Ed
July 8, 2011 | 11:00 pm

Ran another test using jpegs and jpeg size wasn’t an issue at all during fades.


July 13, 2011 | 7:12 am

Hey

I can’t see your patch as I’m on my phone, but have you tried using bline instead of line? Doing so will make changes in sync with you renderer drawing which makes a huge difference.

DiGiTaLFX


Viewing 6 posts - 1 through 6 (of 6 total)