Drawing voxel pixels?

So, I’ve looked at games like Voxatron and that weird little thing that Kevglass made, and I liked his strange 2d-3d voxel pixel things enough that I wanted to create something like it.

So far as I’ve found, I need a 3d grid of cells, and the cells can be occupied by a kind of block with a color. However, the way to “cull” the blocks (Not draw those behind others to avoid drawing pixels) escapes me.

For that matter, I’ve looked into rendering with pixels, and I’ve seen a couple methods, such as OpenGL’s glDrawPixels() method and using a BufferedImage and modifying its RGB buffer. But both were apparently not very good in the optimization department. For reference, the area that must be rendered in pixels is 640 x 480.

I can easily create a 3d grid system with chunks (also dubious, but seem necessary) but I’m not sure how to translate 3d grid into the individual pixels.

Can anyone give me any pointers to methods of rendering, and how to implement them?

Voxels are more or less an idea of how to think about the things we display on screen - not necessarily the method of implementation.

Have a look at these:


http://http.developer.nvidia.com/GPUGems/gpugems_ch39.html

For what it’s worth, I just draw rays through the 3d array - as soon as I hit a block, I drew it. With this being orthographic projection only these rays were essentially along the depth axis and then stepping down one block at a time.

Cheers,

Kev

ala wolfenstyle raycasting? ray.jin.fi

Na, ray per voxel path, 2d ray casting not 1d, but also not clever at all.

Just looking at it myself again, love to get a really nice voxel renderer going.

Kev

So I started having another go at voxels, this time with the proper 3D stuff

https://dl.dropboxusercontent.com/u/1668516/shots/voxel-new1.png

Been out of the loop recently on 3D, whats a nice way of doing full scene shadows efficiently these days?

Cheers,

Kev