pouët.net

Go to bottom

oldschool demoeffect

category: code [glöplog]
how is this done?

BB Image

it is taken from: you am i you am the robot / Orange (1996)
i bet it runs quite fast on a 486 or pentium 1.

i think:
sine-wave or lookup for texture - zoom twist with radial coordinates?
i would be glad to know exactly what they do.
added on the 2011-01-19 20:33:15 by rudi rudi
Exactly?

To me it looks like two tunnel lookup maps w/o depth blended together (i.e uv1+uv2 with some offsetting, use tables larger than your dest. framebuffer) with a plasmaish (perhaps animated) texture. I could be offf, it's been a while since I've seen it.
added on the 2011-01-19 20:36:39 by superplek superplek
And in 8bpp you should easily be able to do that on a 486dx2/66 :)
added on the 2011-01-19 20:37:14 by superplek superplek
superplek: yea. maybe you're probably right
it looks animated. take a look: http://www.youtube.com/watch?v=o2MUI_Ywk1A :P

added on the 2011-01-19 20:42:40 by rudi rudi
could be a single offsettunnel + animated texture, looking at movement
added on the 2011-01-19 20:50:00 by havoc havoc
Okay, what that is is about what I said it was. Two full-screen 2D tunnel offset maps without dept, scrolling on the "moves on Z"-axis (just add to the final U or V before adding them together) using a texture that is both an animated plasma and has some slight palette cycling. There you go.

But why you'd want to recreate one of the most boring effects in that production is beyond me :)

added on the 2011-01-19 20:59:30 by superplek superplek
The offsetting seems to be both on X and Y, the tunnel origins moving around one another in circular motion. I like how it both cycles color and in- and decreases the texture plasma frequency (i.e more dots / less dots) though.
added on the 2011-01-19 21:01:08 by superplek superplek
Quote:
I like how it both cycles color and in- and decreases the texture plasma frequency (i.e more dots / less dots) though.
superplek: thats why i think it is a neat looking effect. if that can be done in hiegher res and much faster on a today's CPUs.

i wasnt really going to code one, i just wanted to imagine how it was made.
and your pinpoint got me there. i wonder how that would look in a voxel-tunnel. :P i was going to code a voxel-tunnel ages ago, but i didnt got around coding it :P
added on the 2011-01-19 21:36:27 by rudi rudi
everything is possible with shaders :)
I am totally in love with the voxel tunnel (as in Stars / NooN). And so are many more with me who lived through the 90s.
added on the 2011-01-19 23:38:56 by superplek superplek
yeh, people don't do effects like that any more!! :-)
Quote:
yeh, people don't do effects like that any more!! :-)

maybe there's a reason for that
added on the 2011-01-20 09:47:30 by imbusy imbusy
i was being sarcastic. voxels are widely used still - just look at this fine example
Quote:
everything is possible with shaders :)


rasmus: everything?

i have yet to learn about shaders. but would a demo run fast if i made oldschool effect by just using pixel-shader? isnt that slower than a modern cpu?

here's what i got: http://www.home.no/rudibs/dox/cantiga.txt
added on the 2011-01-20 12:46:45 by rudi rudi
When targeting an Intel GPU, you use D3D rather than OpenGL. Intel's OpenGL drivers are utter crap, but their D3D drivers are fine.
added on the 2011-01-20 13:09:57 by kusma kusma
kusma: ok. i dont use opengl anymore.
that list is two years old or something.

dxdiag says i have Direct-X 11, but.
i think i should update my drivers..

added on the 2011-01-20 13:25:11 by rudi rudi
No, the GMA X4500 GPU in the Intel Mobile Express series 4 chipset (codenamed Cantiga) has DirectX 10, not DirectX 11.
added on the 2011-01-20 13:33:35 by kusma kusma
i'd say that everything could be done in shader (except for stuff that relies on hardware features).

fragment/pixel shaders are basicly nothing more than a function that's polled for each drawn pixel - consider this pseudo code:

Code: for (y=0;y<max_y;y++) for (x=0;x<max_x;x++) { call fragment shader at (x,y) }
btw

Quote:

GL_ARB_fragment_program
GL_ARB_fragment_shader


is enough to get started - see this
rasmus: how do you specify fragment position, hence pixel coords? or if the memory space is linear, does the pointer increment each time you call gl_FragColor?
added on the 2011-01-20 13:56:58 by rudi rudi
rudi: It's the other way around. The hardware iterates through all pixels for you, and gives you a shader thread per fragment. So if you want to draw a line from a to be, you're going to have to reformulate that into a line-test in some way. But it's still perfectly possible. However, the hardware can draw lines, so it's usually best just to use that feature.
added on the 2011-01-20 14:24:56 by kusma kusma
Image you want to do an effect like above.

You load, compile, link and use a dummy vertex shader and your effect pixel shader. Then you draw a fullscreen quad. As the quad is rasterized by the GPU the pixel shader is called for every pixel the quad covers and there you do your calculations.
Now if you want to draw a filled circle for example you test if the current pixel coordinate (the shader tells you this) is inside or outside of the circle and then either paint it or discard it.

For the above effect you might want to set up a texture before, but that's basically it.

This is also more or less how GPU raytracing and raycasting is done. For every pixel evaluate a function or do an intersection test...
added on the 2011-01-20 16:27:43 by raer raer
ok. thanks for all the info.

i pretty busy with work and some subject i take up from school, so i dont have that much time to fiddle with coding some of this stuff yet.
added on the 2011-01-20 16:53:33 by rudi rudi
Rudi: back to oldschool plane deformations, did you take a look at this and tinkered with the corresponding app?
added on the 2011-01-20 21:23:12 by ara ara
sadly, that app link doesn't work..

login

Go to top