1
C / C++ /C# / Re: jelly vector / dragon ball
« on: May 05, 2012 »
I was trawling through an old directory full of Amiga source code someone sent me through the post over a decade ago, and found one called jellycube.s. For some reason I went through and commented it and fixed a few bugs while watching television. It was resourced from some production, I have no idea what - any code unrelated to this effect was already stripped.
Here's a youtube video of the effect:
http://youtu.be/DDmLIdbQqVw
The commented source code is attached for what its worth. I didn't bother spending too much time on the Amiga blitter code, but I think that there isn't much to learn from this. All transformations are done from custom tables. The "cube" looks to be a sham and is perhaps the three sides that face the camera given it's angle of rotation. The y stretch is quite straightforward, and the x squish seems to be done in two ways - one a distortion of the 3D vertices, another some distortion of the screen projected 2D line/fill vertices.
Here's a youtube video of the effect:
http://youtu.be/DDmLIdbQqVw
The commented source code is attached for what its worth. I didn't bother spending too much time on the Amiga blitter code, but I think that there isn't much to learn from this. All transformations are done from custom tables. The "cube" looks to be a sham and is perhaps the three sides that face the camera given it's angle of rotation. The y stretch is quite straightforward, and the x squish seems to be done in two ways - one a distortion of the 3D vertices, another some distortion of the screen projected 2D line/fill vertices.
