Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Simplifying voxel graphics

Name: Anonymous 2011-11-10 3:00

Hey /prog/

Decided to start working on a new project and I'm kind of stumped. Hoped someone might have some ideas or links to papers or something dealing with this sort of thing.

Writing a program for creating voxel graphics and I want to be able to export optimized meshes from this program. I'm having a hard time wrapping my head around how to group up voxels to eliminate redundant faces, however. Baking the texture and triangulating the results will be simple enough, but that first step of optimizing out all the redundant faces just has me stumped.

I've got an example of what I mean here:
http://i.imgur.com/O3bq4.png

Anyone have any ideas? :)

Name: Anonymous 2011-11-10 3:08

Yes.

Name: Anonymous 2011-11-10 3:13

>>2
Har har. I guess I should have anticipated that.

Name: Anonymous 2011-11-10 3:17

>>1
Sounds like you're trying to do voxel rendering by pushing them through your typical polygonal rasterization pipeline, which is what Minecraft and various clones do. Marching cubes is the algorithm Minecraft uses to convert voxel data to a triangle mesh.

It should be noted that this isn't the only way to render voxel data. Looking forward, the future of voxel rendering on GPUs is directly ray-casting sparse voxel octrees (SVOs) into a framebuffer or geometry-buffer (for deferred shading renderers) using a compute shader/kernel, such as with OpenCL or DirectCompute.

The cool thing with deferred shading approach is that you can seamlessly support both voxels and conventional triangle mesh geometry in the same pipeline, just have a geometry-buffer pass for voxels, and a second geometry-buffer pass for triangle meshes. After that, the rest of your pipeline does deferred shading and lighting composition as per usual, without having to worry about the topology of the original data.

nVidia has put together a demo with source code that does this, but it uses Cuda + Direct3D.

http://code.google.com/p/efficient-sparse-voxel-octrees/

Name: Anonymous 2011-11-10 3:29

>>4
That is some pretty cool stuff, but it's a bit far from what I'm trying to accomplish.  I've actually got no problem rendering voxels in a similar way to Minecraft. My issue is optimizing the geometry so that each individual voxel face that is rendered isn't necessarily 1 quad, but part of bigger quads. If you look at the imgur link I provided, what I'm trying to do is take the first image and run the necessary computations to get the second image, which has vastly few quads.

Name: Anonymous 2011-11-10 3:50

>>5
Yes. Marching Cubes is what you want to do then.

Name: Anonymous 2011-11-10 9:08

>export a Cube2 map to obj
>redundant triangles, redundant triangles everywhere
And no fucking 3d program has a "reduce triangles in plane" option. NOT A SINGLE ONE.

Don't change these.
Name: Email:
Entire Thread Thread List