How is this oldschool fractal-zoom effect made?
category: code [glöplog]
Yo.
Just got curious. I had never actually attempted to code this. Any ideas what happens to the framebuffer. On amiga ofc its copper and such stuff i dont really know anything about. https://www.youtube.com/watch?v=gKBo-pbU6AM
My first guess its that its just stretching a backbuffer and overlaying that on the framebuffer while plotting random pixels in the middle? but on the other hand it might be easier than that, just by transforming the framebuffer directly, but how?
if someone could explain how this works in a linear framebuffer that would be fun.
it should be an easy effect to code, but just want to see how coders actually did it back in the day.
Just got curious. I had never actually attempted to code this. Any ideas what happens to the framebuffer. On amiga ofc its copper and such stuff i dont really know anything about. https://www.youtube.com/watch?v=gKBo-pbU6AM
My first guess its that its just stretching a backbuffer and overlaying that on the framebuffer while plotting random pixels in the middle? but on the other hand it might be easier than that, just by transforming the framebuffer directly, but how?
if someone could explain how this works in a linear framebuffer that would be fun.
it should be an easy effect to code, but just want to see how coders actually did it back in the day.
Gargaj: yes thats the one. thx.
the comment from psonice sounds clear:
the comment from psonice sounds clear:
Quote:
no, there's no zooming or rotation at all. Each block is just shifted a few pixels, the direction and distance depending on the position of the block. In other words, all it really does is scrolling :D The shift direction and amount for each block is set so they shift the pixels around the screen in a spiral pattern.
The complex pattern it generates is caused by the different shift amounts in each block, if you have a block shifting left by 2 pixels and the one to the right of it shifts left by 1 pixel, it has the effect of stretching the original image by 2x. When it's happening on x + y, in a complex way (because of the spiral pattern) you get cool patterns forming.
For historical reasons, here's how Tsunami/VD tried to explain it in a readme attached to the Chaosland sources he sold (which then got leaked into BBS:es).. Looks like he wasn't so clear on what's happening either as he copied it from Dweezil ;)
Quote:
The fractal zoomer is really a simple routine, but even though it is only about 220 lines long source, it is very hard to get working! I have tried to explain it to about 10 guys, but only a few have understood it anyway;() But you already have the source if I recall it correctly? So here is a short explanation about the theory of fractal(???) zooming:
The picture is divided into 32*32 puzzles (in theory..). Then I go to the first puzzle and take values from 2 tables containing the x-difference and y-dif., add these together and get a value that tells: FROM WHERE should I copy a block TO here! Then I do the copying action and go to the next puzzle. and so on. There is also additional x & y "shaking" routines that try to obtain a better result in rotation. Not so static you know... I have 2 buffers. I copy from the one I show to the other one hiding somewhere. Hmm... that's the method, but it is quite hard to explain. Hopefully you understand it, when looking both this short guide and the source?
nobody has actually explained it properly :P
haha, yes.. also how the hell does this dithering remain. It is not "aliasing" as it zooms, but zooms as if it is a vector graphic. Still no idea how..
according to quote from break, a 220 lines long sourcecode would probably mean it is alot of predefined tables where the blocks are in the code. it should be logical however.
Of course, those who can read Amiga asm code can download the Chaosland source and try to dechiper it themselves :) Not sure if it's available in any convenient location, but you can at least grab it from my archives (under V for Virtual Dreams): http://minie0.pp.fi/amiga/
this thread explained it well enough for me, there's a basic source implementation as well.
Nice one 4mat, never noticed that thread before (and now I see it's even referenced to in the original pouet thread, duh)
take a look at kumpa.c
got something working atleast
xscreensaver has a version written in C too
I've done a low-rez version of this effect recently; Tsunami's comment about "shaking" is extremely important if you want to slow the motion down to get a more impressive motion and also to distribute the discretization errors across the screen more evenly.
I finally realize how this is done. Just need some testing to get it right.
again: https://bel.fi/alankila/rotzoomer.html
That thing is really nice t fool around with. :D
again: runs like crap in FF. jsyk.
Runs smooth in Leopard Webkit on OS X/PowerPC, G4/550 Mhz.
Ran smooth on A500, no OS, MC68000/7Mhz.
I can confirm that the rotzoomer webpage is extremely slow in FF for some reason. I suspect it's doing something really inefficient.
Can some one code pc dx api version of this legendary effect so we can move on? :D
I think Dweezil will be happy, where ever he is nowadays...
I think Dweezil will be happy, where ever he is nowadays...
This reminds me, I wonder why I never saw anyone trying to copy the awesome "smoke" effect Dweezil presented in Darkroom (the 2nd effect after the blurred chaoszoomer).. I recall him saying it was based on some kind of cellular automaton.
Quote:
Can some one code pc dx api version of this legendary effect so we can move on? :D
I think Dweezil will be happy, where ever he is nowadays...
I did the same.
Gobby, strastuit.
Care the Share the link?
Care the Share the link?