- AVS
- UnConeD - Second Reality (Rotozoomer)
Archive: UnConeD - Second Reality (Rotozoomer)
Mulefire
7th February 2002 01:12 UTC
UnConeD - Second Reality (Rotozoomer)
Hi,
I was just wondering if there were any other rotozoomers build using Dynamic Movement similar to the afor mentioned one. I am looking for one similar to Sonique's RotoZoom plugin, i.e. one that doesn't tile the image, and zooms in and out to varying degrees and at varying speeds based upon average bpm counts.
I have been fiddling with the Second Reality one but I admit I am somewhat lost as to what exactly it is doing.. I get rf for rotation, df for zoom level and I have managed to adjust the zoom speed and the total zoom in amount but that's about it...
I had a quick look for some Dynamic Movement tutorials out there but didn't come up with anything... anyone got any good links?
Cheers!
Mulefire
7th February 2002 13:02 UTC
Well after some fiddling I came up with this. It kinda words, rotation and zoom amount are decided by the music. I wanted it to stop rotating if the music dropped below a certain level and to switch rotation direction based on beat detection.
Anyone have any ideas on how to improve this code... perhaps to make it smoother?
And I guess I and stuck using "wrap"... I assume to just use the single image would require writing the entire rotozoomer as an ape plugin...
Anywayz, I'm new to all this so be nice! :)
Init:
df=0;rf=0;rot=100;zin=0.5;zout=50;zspd=2;zsmth=2;
(These are my favourite settings to higher bpm music:
df=0;rf=0;rot=20;zin=0.5;zout=30;zspd=2;zsmth=2;)
Frame:
fspec = getspec(0,0,0);
df = df + (fspec/zout);
rv = if (below (bspec,fspec),-ri,ri);
rf = rf - if (below(fspec,0.5),0,rv);
Beat:
bspec = getspec(0,0,0);
df = (bspec/zspd) - zin;
ri = (bspec/rot);
Pixel:
pspec = getspec(0,1,0);
d = d + df - (pspec/zsmth);
r = r + rf;
UnConeD
7th February 2002 22:39 UTC
You'll probably want do multiply "d" by a constant close to 0.99 (zooming out) or 1.01 (zooming in), it will result in a nice, lineair zoom. Your method will warp the image a bit.
dirkdeftly
9th February 2002 19:30 UTC
I think you should understand how the DMs work instead of just copying them over - otherwise it's just like having someone else do the work for you. But I'm willing to help anyone with DMs and so forth, just e-mail me at therealatero@hotmail.com
Mulefire
10th February 2002 21:10 UTC
Hmmmmm... I assume you haven't actually looked at the DM for Second Reality then? If you had you would realise that the only piece of code that is the same is "r=r+rf" which is well kinda generic and what...
I actually learnt how to use DM from looking at UnConeD's code and working out how it worked, then bulding something from scratch... I fail to see how that is "copying them over", but perhaps I misunderstand you and you are not really making an illformed slight but instead trying to enlighten the mind with constructive comments related to the original question... yes that must be it, of course it is...
Glad to see you are willing to help though.. perhaps you can offer a better solution than mine or perhaps a way of not using wrapping etc. I am always open to new ways of doing something.
dirkdeftly
10th February 2002 23:52 UTC
What I meant by "copying them over" was simply taking an element from someone else's AVS and using it yourself without actually going to the effort of understanding it.
If you want something like HB's Rotozoomer, try this:
Frame:
rt=rt+0.03; <-Increment the timer for the rotation shift
rs=sin(rt)/3; <-Get the shift in rotation
v=v/2+getspec(1/3,2/3,0)/3; <-Seek to the current spec. ana. volume for the zoom
Beat:
rt=rt+0.07; <-Bump the rs timer
Pixel:
r=r+rs; <-Rotate
d=d/v; <-Zoom
Mulefire
11th February 2002 00:02 UTC
Thankyou for the reply..
The reason I was annoyed was becuase I DID take the time to learn how it worked. If I hadn't I wouldn't have been able to write my own from scratch. I used UnConeD's code to learn how to use DM, not to copy from. There is no fun in just copying something...
Anywayz, I am going to go give your code a whirl and see if I like it better than my own one... cheers for the help.
dirkdeftly
11th February 2002 06:25 UTC
I tried out and tweaked the code, and was able to produce an effect much like HB's Rotozoomer.
Fadeout (2nd thick bar)
Effect list (Ignore, Max. Blend)
Render...
Water
Light Blur
DM (30x30 grid):
Frame:
rt=rt+0.06;
rs=sin(rt)/1.5;
v=v*0.75+getspec(1/3,2/3,0)*1.7+0.05;
Beat:
rt=rt-0.16
Pixel:
r=r+rs;
d=d/v
Mulefire
11th February 2002 14:05 UTC
Cool... looking good.. I will try it out when I get home tonight... I tested the previous code and yep.. it was definately smoother than my attempt... I had to add the beat matched rotation though... I like it spinning all the way round :)
Many thanks for all your help in this matter... it's very appreciated! :)