pouët.net

Effects in demos that you don't know how they work

category: code [glöplog]
"Well here he is, The Pink Panther, The Pink Panther, everybody loves a panther that's pink.
He really is a groovy cat, and he's a gentleman, a scholar, he's an-acrobat.

He's in the pink, the Pink Panther, the rinky-dink Pink Panther and it's as plain as your nose.
That he's the one and only truly original, Panther pink from head to toe.
Yes he's the one and only truly original, Panther Pink Panther from head to toe!"

Yes I am



added on the 2006-02-22 13:51:53 by Navis Navis
psionice:

1) drawing a shitload of lines is slow, and the tunnel runs fine on a 486
2) unless you draw lines with variable width (wider at the bottom), it would have holes in it, so you might just as well draw polygons.
added on the 2006-02-22 14:01:17 by Preacher Preacher
preacher: my second option would remove the second issue, as the original flat texture would have no gaps. Not sure on speed though, as I'm no coder. Can't imagine it would be much slower than drawing voxels with perspective mind.
added on the 2006-02-22 14:50:07 by psonice psonice
preacher:

You can get a one-pass solution, which is sort-of a mix of the linedrawing and the lookup-table approach:

take your lookup table. Sort all the entries in the lookup table depending on the angle they belong to. Then you get, for each angle, a list of XY offsets for on-screen pixels which this "angle" covers. Store the radius along with each XY-offset, and sort each such list with increasing radius.

When rendering the voxel landscape, instead of drawing vertically in the temporary texture, paint the XY-offsets that are marked in the XY-offset-list for the current angle.

It's not necessarily faster on a 486, but it does work.

(On a related note, you can play a bit with the voxel renderer + lookup table approach to convert a voxel twister into a voxel ball in an analogous fashion.)
added on the 2006-02-22 15:31:28 by Kalms Kalms
ohmy gawd! a coder on pouet
added on the 2006-02-22 15:50:31 by the_Ye-Ti the_Ye-Ti
the_Ye-Ti: uhm... It's quite normal with coders even on google!

just so you know
added on the 2006-02-22 18:36:04 by Heulanith Heulanith
finally wamma did it too and quite nicely.
added on the 2007-01-19 14:18:17 by bdk bdk
And the synth in Justin Timberlake's "My Love" is stolen from http://www.pouet.net/prod.php?which=672!!!1
i guess it's not really that similar... ;) but when I first heard the song i thought of that intro.
added on the 2007-01-19 15:52:25 by dnes dnes
oops wrong thread, i am dumb
added on the 2007-01-19 15:52:42 by dnes dnes
hey kalms, that voxelball rules!! :) i remember it from the modest prod by mind design:

http://www.pouet.net/prod.php?which=17875

i always wondered how that worked
added on the 2007-01-19 21:24:43 by earx earx
wasnt that lump of earth in iguana-despair also a voxelball?
how they get the stoned warrior to move in Extreme Commands lost in the jungle (UZI)
added on the 2007-01-19 22:43:17 by Dubmood Dubmood
Quote:
It's quite normal with coders even on google!

Congrats, you won a free ride on the WTF tricycle.

Honestly, what do you mean?
added on the 2007-01-20 04:10:46 by Shifter Shifter
@kalms, @preacher and the voxel tunnel people..
I dunno if this is too simple as I haven't had a reeeaallhy good look at the stars voxel tunnel.

Wouldn't it suffice to make a voxel without perspective on the x-axis and map it onto a tunnel?
I did that on Photons dodraugen mix and it worked out nicely. except that the perspective wasn't all that great.
added on the 2007-01-20 05:13:11 by loaderror loaderror
I've never completely figured out the voxel ball and birds eye view voxels though.
added on the 2007-01-20 05:14:02 by loaderror loaderror
I'm also curious about voxel balls.
I made a voxel twister years ago. It's actually trivial. But voxel balls are bit more mysterious.
added on the 2008-03-31 20:14:50 by p01 p01
Maybe smash will finally tell me how the clouds in Death and Taxes work?
added on the 2008-03-31 20:21:12 by noouch noouch
Actually I am curious about how the voxel twisters works and how are they so fast? :)

And all the other neat voxel stuff. I know shit about voxel rendering atm. I am trying to do a regular heightmap landscape. I tried some months ago but I failed. Now I am trying from scratch..
added on the 2008-03-31 20:22:24 by Optimus Optimus
optimus: Think about projecting a voxel on a circle instead of a vertical line ( for a landscape ). The distance from altitude 0 to altitude n depends on the angle from which the voxle is seen on the circle/cylinder. A single COS does the trick ;) and a LUT works even better.
added on the 2008-03-31 20:26:37 by p01 p01
in the end it's like drawing 2 voxel landscape ( with a slightly funky function for the distance of the voxel to it's origin ) : one for the left hand side, one for the right hand side.

I suspect voxel balls are quite similar, only with 4 quadrants. Now I wonder if the voxels in a ball are pointing inward to avoid the gaps betweem the pixels instead of pointing outward. ... mmmmh that might work.
added on the 2008-03-31 20:30:19 by p01 p01
p01: voxel landscapes are heightmaps that reside on a plane. Voxel twisters reside on a cylinder with a very small radius. Voxel balls reside on a sphere with a very small radius. Voxel tunnels reside on a cylinder with a very large radius.

Drawing a voxel ball is done in pretty much the same way that you draw a voxel tunnel -- but you draw from inside out, and you use a different perspective function.
added on the 2008-03-31 20:53:00 by Kalms Kalms
I think I'm getting there. A moving "voxeled texture" is displayed using a constant LUT ( like for a tunnel voxel ). ... need to wrap my head around that bumpy sphere :p
added on the 2008-03-31 21:04:54 by p01 p01
"I've never completely figured out the voxel ball and birds eye view voxels though." .. HAH! IN YOUR FACE OLD VERSION OF LOADERROR!
added on the 2008-03-31 21:54:01 by loaderror loaderror
Now.. How to do that water effect in the Authentik demo by Skarla, Atome/Skarla and Heartquake / Iguana demo?

BB Image
added on the 2008-03-31 21:57:27 by loaderror loaderror
:) that water thing is basically a voxel landscape using a "water" effect as heightmap.

I think I got the voxel balls though. It seems to be very close to a voxel tunnel.
added on the 2008-03-31 22:08:57 by p01 p01

login