Log in

View Full Version : making screensavers and rotate filter


Wilbert
7th August 2002, 14:35
After seeing an example of Dividee of the use of Layer, Mask and some gonio-functions look here (http://forum.doom9.org/showthread.php?s=&threadid=30014) (results in a clip where the overlay clip is moving in a circle over the background clip) it seemes funny to make a screensaver this way. I have two questions:
[list=1]
It would be nice if someone could make a rotate filter for rotating clips in a smooth way with a certain angular speed.
Is it possible to convert an avi to the screensaver format scr?
[/list=1]

Richard Berg
7th August 2002, 14:52
This is a wild guess (never looked into it in the slightest, just going by filesize & hunches) -- I'll bet an SCR file is in "vector" format, at least one level of indirection away from actual video. I.e., it mostly consists of rendering instructions and/or some compiled code.

Poptones is writing a rotate filter, or was before he got on his Python kick.

sh0dan
7th August 2002, 16:23
.scr filters are just renamed exe-files. ;)

poptones
7th August 2002, 16:30
No, the rotate is still on its way. So is the image import. So is a quantizer. And I put daily effort into them.

I really want the python, too. But as I said: that's gotta be more long term, because I'm nowhere near being able to DIY.

Marc FD
7th August 2002, 17:36
simply compile a .scr (yes it .exe renamed files ;) )
who would render a .avi file ...
but i only know how to do 3D OpenGL screensavers...
i cannot help you there...

@poptones
what's this quantize idea ??
could you expose it? (i had a idea too, who is similar (by name :) ))

poptones
7th August 2002, 21:02
The quantizer is nearly done. It's also the simplest damn filter you've ever seen. I made up for this fact by optimizing it heavily with a binary structured op sequence (ie it does blocks of 4, then 2, then 1).

A quantizer is used in audio for a variety of effects, yet the other day when I was playing around with this very cool analog synth emulator (http://www.syntiac.com/synfactory.html) (that would make keith emerson drool, BTW) I realized we had none for avisynth, and that it was sorely needed.

Basically all it does is quantize the bits in each plane corresponding to your settings when you call it. And it works the same for YUV or RGBA, 'tho the effect will be necessarily very different for each.

clip.quantize(r=8,g=6,b=8,a=1)

This will have the effect of reducing noise in the g plane because you are truncating resolution from 8 bits to 6. And it will make the mask either "on" or "off" by way of truncation to a single bit.

clip.quantize(y=8,u=0,v=0)

will simply strip the color info out. Of course it will also leave it discolored because u and v will both be zero, but that really doesn't matter if your aim is to merge it in later.

rgbclip.quantize(8,0,0,0)

Will strip out the color information from all except the red plane. Or you could just make it

rgbclip.quantize(8)

since I only look for specified args. To leave only blue you could write either

rgbclip.quantize(b=8)

or

rgbclip.quantize(0,0,8)

What use is that? Now you can separate the color planes as you like. You can see them, and you can filter them individidually before adding them back together with

rbclip=layer(redclip,blueclip,255)
colorclip=layer(rbclip,gclip,255)

Color planes can be processed and viewed separately without having to create a new "monochrome" data type.

Of course, if someone wants to adapt "merge" to optimize this operation, that would be cool, too...

And lastly I'll mention the reason I thought of doing it in the first place: you can use it to create animation type effects by posterizing color.

64colorclip=rgbclip.quantize(2,2,2)

Marc FD
7th August 2002, 22:39
i see...
and HSL colorspace :D ?