Archive: Argh!!!


26th November 2005 21:28 UTC

Argh!!!
This wacky zoom out effect, I see this all the time, and I can't figure out what makes the effect. Its so cool, and I have at least two deas for it.

P.S. Thanks to Deskmod...


26th November 2005 22:53 UTC

Oooh. It's simple, but cool.

It's obviously the Trans / Dynamic Movement that makes that preset. Try turning on "Wrap" for a different effect!

Anyway, let's take a look at some of the DM code and see if I can help you figure out how it works:

x=(x+xt) ;
y=(y+yt)*asp2 ;
d=sqrt(sqr(x)+sqr(y)) ; r=atan2(x,y) ;
d=d*z ; r=r+rt ;
x=sin(r)*d-xt ; y=cos(r)*d*asp1-yt
Most of the magic is in the fourth line, which multiplies "d" by a constant (z=1.1) to create the zoom effect, and adds a random value "rt" to "r" to create the rotation.

The third line is what gets the "d" and "r" values from the "x" and "y" coordinates. The fifth line converts the modified "d" and "r" values (also known as "Polar coordinates") back into the rectangular coordinates "x" and "y".

Now, you may be wondering why "xt" and "yt" are added to "x" and "y" at the beginning of the code, and then subtracted at the very end. This serves to change the center of rotation.

The multiplication by "asp1" and "asp2" are a form of aspect ratio correction. This prevents the rotation from skewing the image a little bit when your visualization window isn't perfectly square.

The "Frame" code basically causes "xt", "yt" and "rt" to gently slide towards the random values set in the on-beat code. This is also where the "z" constant is set for some reason.

Hope this helps.

By the way, I dare you to try adding a Trans / Mirror right after the DM. Make it a four-way mirror (top to bottom and left to right). Oooooh, wacky.

27th November 2005 00:18 UTC

Re: Argh!!!

Originally posted by JFASI
I can't figure out what makes the effect
Do you understand how Movement/DM work? This is a 'textbook' example of what they are for. Try expermenting with them a bit more and you might be able to come up with some similar effects from scratch.

Btw StevenRoy, nice description of how the code works.

27th November 2005 01:40 UTC

Hehe, this is my favorite type of dm to work with. My latest and greatest work with it being "The Convicts" which was released in WFC3.

JFASI, let this one fuck with your head for a while. Try and figure out why it's so strange, not just observing the code, but why does the code make it look that way? Ignore the black stuff that appears, and if you're in for a real trip, turn on wrap. :D

edit: updated preset slightly


27th November 2005 09:55 UTC

Wrap are kool for these whacky preset, JFASI.

who voting for wrap say: 'LOL' :)


27th November 2005 12:02 UTC

dASn00b is cool, i really like him.

For more dASn00b goodness, go to http://dasn00b.deviantart.com/

[edit]Oh and stevenroy, maybe the author had in mind to make the z variable, you know variable :p But thought it was a bad idea or simply forgot about it.

Just taking a wild guess.


27th November 2005 18:28 UTC

I'm still kinda stumped why sometimes the DM gives a "barber's mirrors" effect, and sometimes just zooms out a tad. This all lies in the z variable, I know, but sometimes, even if I turn off clear every frame and everything, It still doesn't give that effect. It might be somewhere outside the DM, but I still can't find it...


27th November 2005 19:36 UTC

Well the reason it does the tunnel effect is due to feedback. Basically you're doing the zoom out over and over and over again on the same image. If it's just zooming then odds are you need to turn of any sort of clearing so as not to disrupt the image from feeding back into the DM again.


27th November 2005 23:50 UTC

Hmmm....

But how does one initiate such...a...feedback...loop.....

BUFFER SAVE!!!

No? Didn't think so...


28th November 2005 03:51 UTC

Buffer Save is an idea but it is made simpler [and thus faster!] in this case.
the "main" component says: "clear screen" y or n. if disabled, avs will render the new image directly on top of the old one, thus resulting in processing the Dynamic Movement over and over and the SSC rendering a new frame on top of the resulting image each time again.
Disabling clear every frame results, of course, in a black screen each time a new frame processing is started.

GC


28th November 2005 10:23 UTC

Nonetheless, buffer save can be useful since you can change the source of the DM from current to Buffer 1 for instance, and then use the alpha blending to do some leet stuff :)


28th November 2005 22:21 UTC

Exactly. This is a start because I made a preset that would have worked in theory. It did, but also drop the FPS to about 10... Not good at all...