The art of programming Voxels
#1
Posted 08 January 2012 - 11:43 PM
Terrain voxels to be precise, or symmetric 3d dataclouds rendered with polygons. More minecraft than 3d-scanner surface dataclouds or super-realistic rendering(not this but its very nice for some troubling puzzles I'm trying to wrestle under control), or whatever else voxels have stood for before.
Right now I'm just spending a lot of time looking into the different things I need to know about these things. Right now an octree data-tree to store relevant voxels in is pretty mandatory. Symmetric voxels every 25cm is my current guess, Having a octree storage system on the saved files is also a nice compression right off the bat(if everything in a block is of the same type, stop splitting and define that block as "all X").
But my main problem right now is how to take these clouds of data and apply "filters" to them. If you got an 3d array of booleans in the shape of terrain, and you want to add a displacement to it or smooth it down in x/y/z or drag it around.
I guess one might even say what I'm grumbling about is less about the voxels and more about the random terrain generation. Is it easier to write your own algorithms or is it better and easier find finished ones?
Other things I wonder about are noise-generators. Since repetitiveness is important seeds will be vital. Most noise generators support them anyway, but I'll probably have a look around for something else than perlin noise, or at least a possibility to tweak it.
Anyway, if you have some generic tips for me about the topic feel free to post about it. I'm looking for books and articles about map generation and voxel manipulation, but anything halfway relevant worth a read is welcome.
"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange
#2
Posted 09 January 2012 - 12:20 AM
#3
Posted 09 January 2012 - 08:06 AM
Also, I bought Maya last year, not cheap and the release was crap, but at least I've paid for it(got student discount of 50% too). But its not the engine of choice for something like this.
A game engine that does occlusion culling and camera cutout culling should be able to handle many polygons. Also, different mesh-generation algorithms for different LODs should reduce the troubles of mountains and high-up camera angles. Besides, you only generate mesh for the elements that have air/transparent materials around them.
Alas, its still quite a bit of information to chug through. notch's chunks of 16x16x256 contain 65536 points, if I wanted a chunk the same size with 25cm bits, it would be 1.04mill datapoints per 16m^2. of course you only need to go through that once and filter out the stuff that doesn't show, but its still going to take a bit of energy. I had a theory that you could store these datapoints in vertical columns instead of numbers though. so instead of [1,2,3,4,5,6...,256] you go [rock:128, dirt:132, air:256]... but I fear its redundant with an octree and the need for going through the data anyway to find surfaces.
Edited by duke_Qa, 09 January 2012 - 08:07 AM.
"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange
#5
Posted 09 January 2012 - 07:01 PM
With a good parser of data in a octree system, it shouldn't be hard, just create different tags with different info about the items. { blockXYZ: [terrain:air;][items:torch(rgb:FBFBBA; decay:1;strength:1; rot:0,90,20;scale:2,2,2)],table,painting } might be one coord.
The big questions are the map generators. I suspect it involves tons of calculus. Here we have another link, and I suspect the examples it brings up are assignments made by crazy people doing crazy maths for titles.
"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange
#6
Posted 10 January 2012 - 05:22 AM
#7
Posted 10 January 2012 - 02:45 PM
This vid seems to explain calculus in 20 minutes, its mentioned in some articles that a few drops of calculus might be needed at times, but hopefully you can get away from it .
Right now I like the theory of using some sort of liquid simulation to erode and smooth terrain. Combining it with tectonic movements to create mountains where those are supposed to be and so forth.
"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange
#8
Posted 10 January 2012 - 06:19 PM
#9
Posted 11 January 2012 - 03:41 PM
I guess Notch doesn't use anything but 3d-noise effects with tweaked input settings. and still its a bit delayed at times, so adding 20-50 000 years of simulation for every block you need to create isn't going to be entertaining.
"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange
#10
Posted 11 January 2012 - 04:49 PM
#11
Posted 12 January 2012 - 02:42 PM
The problem with these systems is that I rather would have liked to have finished methods/classes that contain the building blocks/simulation codes. Also, with the wrong API/script language, you are looking at a 20x for simple loops run internally compared to dedicated code. I liked that first article I linked because it seemed to have ready-made functions that would instantly manipulate the arrays using the GPU.
I am still a bit of a sucker for unity3d, but I dunno how effective it would be at that. I've seen examples for it so it should be possible, but more research is required.
"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange
#12
Posted 12 January 2012 - 03:07 PM
Unity 3D? Didn't the good people of Unreal design that, or am I thinking of another design program?
#13
Posted 12 January 2012 - 10:45 PM
Unity3d Is mainly Danish I believe, even got mahself a subforum for it here, but its been somewhat dead since nobody really uses it(me included right now, but I'm spending free time reading up on tuts and doing some small scripts).
A shame though, since I honestly believe unity3d is one of the better 3d engines for indies out there.
Edited by duke_Qa, 12 January 2012 - 10:46 PM.
"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange
#14
Posted 12 January 2012 - 11:03 PM
#15
Posted 13 January 2012 - 12:12 PM
List of the more famous games made in it. Battlestar galactica online is probably the one I've heard most of in mainstream media, and Zombieville.
The good part about it is that its a bit more intuitive than the udk, and has good document references, question-site, forums and so forth.
Edited by duke_Qa, 14 January 2012 - 02:59 PM.
"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange
#16
Posted 13 January 2012 - 05:17 PM
#17
Posted 15 January 2012 - 08:04 PM
http://www.youtube.com/watch?v=Xt75w7cwKXo
Here's one a bit more organic. It is also available so I could buy the source-code and modify it to fit my needs. Which is something I could have done, but I want something less organic and more optimized.
Edited by duke_Qa, 15 January 2012 - 08:05 PM.
"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange
#18
Posted 15 January 2012 - 08:58 PM
Here's a recent Voxel game:
It was featured on the Yogscast in that video... it's quite a horrible looking game, but it is indeed Voxel.
#19
Posted 23 January 2012 - 08:45 PM
This just doesn't apply to Minecraft... you can make anything voxel and make 3D prints of them. You gotta' be pretty money funny to afford such a thing, but I found the technology very cool.
#20
Posted 23 January 2012 - 11:07 PM
"I give you private information on corporations for free and I'm a villain. Mark Zuckerberg gives your private information to corporations for money and he's 'Man of the Year.'" - Assange
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users