Fast voxel info and theory  

This is a bit of an openended question, but I’m trying to stimulate some discussion.

The following applet - [link=http://javaboutique.internet.com/Voxel/]Voxel Applet[/link] runs very well, even at large sizes. Given that java2d can be very slow, especially if the coding isn’t done well, this applet really suprises me. My CPU barely moves when this is running.

I’m familiar with using a greyscale image for a height field, but I don’t think thats whats going on here.

Can someone post some theories or experience as to how this applet works? ???

hopefully, this is something that run pretty well even on slowest atari and amiga.
You should look at demomaker sites, where this thing should be beaten to death since years.
Googling for ‘voxel demo effect’ returned lots of interesting results, even one on ti89. :slight_smile:

I found this one to be very informative.

Great link nonnus29! I need to study it a bit to absorb everything thats being said, but I caught the gist of it the first read through.

Regards,
Dr. A>

He’s basically copying code that ran at the same speed on my 33Mhz 486 back in 1992. It was a tiny application (16kb I think) for DOS called something like “mars.exe” that did exactly what this one does, even down to the same colour scheme.

The speed of voxels basically comes from simulating 3D without doing any matrix maths - you just do a plain simple arithmetic options and produce “fake” 3D which is a lot less generic than e.g. OpenGL. There is a good reason why you can’t look up or down - part of the optimization relies upon this! Although you can modify it to make view tilting possible, this burns some of the performance.

PS: IIRC; it’s been a long time since I used voxels!

I plan on implementing a voxel terrain system at some point; to me voxels fall into the roadmap about here:

  1. 2d blitting (rotation, blending, scaling)
  2. Mode7 rendering (floor mapping - snes)
  3. raycasting (castle wolfenstein, doom)
    4) voxels
  4. software 3d
  5. You are a software rendering guru!

edit;

  1. raytracing
  2. You are a GOD!!

Thought I should add raytracing in there…

Nah, raytracing is easy ;D. It’s actually easier than polygon rendering in many ways - and it certainly produces much much much better quality images. Just a real pity I never managed to persuade the dolts who owned the main hardware raytracing chips to enter the 3D games card business, really… (back when 3DFX was still alive, way before GF was invented).

non - Whats the mode7 (snes) type you mentioned? I’ve heard about all the others.

blah3 - Thanks for the input!

I remember on the Amiga demos from way back people used to have vectorball demos. Where would you put this in the hierarchy non? My guess is below 3 on your list.

Regards,
Dr. A>

I’ve heard people lament the fact that polygon rendering rose to fore in 3d hardware as opposed to voxels. Hardware optimized for voxels could really pump out some cubes.

Whats mode7? Funny you should ask… This was the effect used in f-zero and other games.

I’m not familiar with vector balls - is that like rotating spheres inside a deformable mesh?

Here’s a link or so to what a vector ball image looks like -

[link=http://www.doctort.org/adam/Demos/VectorBalls/]An applet demo[/link]

[link=http://equinox.planet-d.net/java/vectorball/]Excellent Demo plus more[/link]

Looking at the demos, my guess is that there is no z correction taking place. I primarilly saw this type of effect on the amige, awhile back, though I’m sure it exists lots of places. You might be able to generate terrain or something with it, but it primarilly only works for modeling objects. The ‘resolution’ is determined by the size of the ball/sprite used.

Is there another name for this?

Regards,
Dr. A>

PS - Came across this demo, which shows a lighting effect as well.

[link=http://zac-interactive.com/demos/vectorized.zip]Vector Demo (windows)[/link]

I think there is a way to extend the Voxel algo to enable looking up/down…

[googling…]

Yep! Here it is:
http://jcosmos.free.fr/galerie/olivevoxel/olivevoxel.htm

Too bad the keys are too fast…

/Micke

[quote]I think there is a way to extend the Voxel algo to enable looking up/down…
/Micke
[/quote]
Google a little more and look for Comanche from Novalogic. They used voxels for that helicopter game, and you could do whatever you want.