Marching Cubes/Voxel World

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Post Reply
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Marching Cubes/Voxel World

Post by sudi »

Some time ago i created a simple Marching Cube/Voxel world creator with irrlicht. I actually wanted to turn it into a game but didnt have the time anymore. So i am releasing the source code.
Unfortunatly the code is based on a framework written by me and I am not sure if it still compiles with the newest irrlicht version. Thats why I am not releasing it at this point because I dont have time to answer questions that might come up.

The Marching Cubes code is independet from the demo application and can be plugged into a simple project.

Bitbucket: MagicWorld
Videos: Youtube Playlist
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Marching Cubes/Voxel World

Post by Mel »

Those vids look awesome! :D

Definitely, Irrlicht could use some voxel primitive creation :)
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Vectrotek
Competition winner
Posts: 1087
Joined: Sat May 02, 2015 5:05 pm

Re: Marching Cubes/Voxel World

Post by Vectrotek »

Beautiful! Did you use "PolyVox"?
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Re: Marching Cubes/Voxel World

Post by sudi »

No, my own creation.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Re: Marching Cubes/Voxel World

Post by christianclavet »

Since Irrlicht doesnt use instancing, this should get slow very fast?
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: Marching Cubes/Voxel World

Post by Cube_ »

instancing voxels actually gets really slow really fast - presumably it pages chunks of voxel data in/out and runs mesh optimization algorithms on the resulting output so as to reduce memory and rendering overhead.
"this is not the bottleneck you are looking for"
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Re: Marching Cubes/Voxel World

Post by christianclavet »

Wow! I just missed something incredible in your video! At the end the geometry is being smoothed. Are the vertices are welded? (voxel to voxel) when you smooth it? Really impressive! That's something I've not even seen in BAW! :)
Post Reply