Dynamic Voxel System For 3D maps, Does It Exist?
-
- 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
Dynamic Voxel System For 3D maps, Does It Exist?
So basically, I am intending to implement randomly generated maps for my game, but I can't find a single terrain generator that can do this, nor have I found info on how to make one...
So basically What I need is:
A dynamic terrain generator that utilizes a voxel system.
It has to generate terrain in Real time, probably by using a seed and some kind of algorithm
It has to work with Irrlicht, and preferably bullet.
It has to create fairly detailed terrain.
It has to allow users (the player/players) to deform the terrain. (thus allowing tunneling for example)
It has to be in C++
Think minecraft and you are going in the right direction...
An already made (open source) or enough information for making one is what I need
Either will work!
thanks in advance! //aaammmsterdddam
So basically What I need is:
A dynamic terrain generator that utilizes a voxel system.
It has to generate terrain in Real time, probably by using a seed and some kind of algorithm
It has to work with Irrlicht, and preferably bullet.
It has to create fairly detailed terrain.
It has to allow users (the player/players) to deform the terrain. (thus allowing tunneling for example)
It has to be in C++
Think minecraft and you are going in the right direction...
An already made (open source) or enough information for making one is what I need
Either will work!
thanks in advance! //aaammmsterdddam
"this is not the bottleneck you are looking for"
Re: Dynamic Voxel System For 3D maps, Does It Exist?
You sure want alot for your first post.
If you check past posts, you will find a palifera of such requests and some good answers. Start your search there.
Grumpy.
If you check past posts, you will find a palifera of such requests and some good answers. Start your search there.
Grumpy.
code happens
-
- Posts: 288
- Joined: Wed Oct 29, 2008 12:07 pm
Re: Dynamic Voxel System For 3D maps, Does It Exist?
Well I have a good idea to store the information in data format. You can use a 2D array to hold the bits each bit is a relative distance from the previous point. You will need to twine two bit streams into one stream. Now, generating good looking terrain from a stream of bits is only as good as the algorithm to generate the bits. Lets say you figure out how to generate the bits. Now to build the mesh, each 2 bits is a point on the mesh, you just have to connect the points to get the mesh back. Start from a corner in the grid. I will choose the top left corner to start. The data in binary would look like this, 0 means the value has not changed, 00 means it goes negative, and 1 means it is one value higher or lower than the previous value. You will need to count the negatives since it is only written once. You will also need to start at zero, or some other value that you will always start at. The bit stream...
Which looks like...
Now, you should notice that this will only produce a linear surface, if you need sharp contours you will need to add extra bits. Use 000 as a scaling bit. Its up to you to decide whats best for your scaling parameters and how the bit stream evolves into incorporating things like that. However the idea is shown. You can implement it.
Code: Select all
X: axis
011001111
Y:axis
011001111
2D Array:
001111000011111111
Broken down:
00,11,11,00,00,11,11,11,11
Table Format:
0,1,2,2,1,0,-1,-2
1,2,3,3,2,1,0,-1
2,3,4,4,3,2,1,0
2,3,4,4,3,2,1,0
1,2,3,3,2,1,0,-1
0,1,2,2,1,0,-1,-2
-1,0,1,1,0,-1,-2,-3
-2,-1,0,0,-1,-2,-3,-4
Now, you should notice that this will only produce a linear surface, if you need sharp contours you will need to add extra bits. Use 000 as a scaling bit. Its up to you to decide whats best for your scaling parameters and how the bit stream evolves into incorporating things like that. However the idea is shown. You can implement it.
-
- 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: Dynamic Voxel System For 3D maps, Does It Exist?
now there we have some info!
Now all I need is the algorithm.. oh well I can do some fiddling around with that.... I think I know(-ish) someone that could help me on that...
Now all I need is the algorithm.. oh well I can do some fiddling around with that.... I think I know(-ish) someone that could help me on that...
"this is not the bottleneck you are looking for"
Re: Dynamic Voxel System For 3D maps, Does It Exist?
You should check out the PolyVox open source voxel terrain system. It's in the process of transitioning between websites, but you can find some information on the new website here. You can also red a bit about Irrlicht integration on the old website here and here.
I should point out that it doesn't actually generate the terrain though - it's just for managing the voxels and creating the mesh.
I'm not a regular on these Irrlicht forums, so post on my forums if I forget to check these ones for any responses.
I should point out that it doesn't actually generate the terrain though - it's just for managing the voxels and creating the mesh.
I'm not a regular on these Irrlicht forums, so post on my forums if I forget to check these ones for any responses.
Re: Dynamic Voxel System For 3D maps, Does It Exist?
Ohh, that terrain system looks very interesting : )
Need to check it out
Need to check it out
-
- 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: Dynamic Voxel System For 3D maps, Does It Exist?
this is indeed very interesting...
I might find this extremely usefull!
Thanks Polyvox!
I might find this extremely usefull!
Thanks Polyvox!
"this is not the bottleneck you are looking for"
Re: Dynamic Voxel System For 3D maps, Does It Exist?
I'm glad you like it It's been around for about five years, but I'll start promoting it more heavily once the new website is finished.
Re: Dynamic Voxel System For 3D maps, Does It Exist?
Very good articles! I have played around with noise generated terrain my self a bit for my game generating hightmaps. But using PolyVox gives a lot more possibilities : D
-
- 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: Dynamic Voxel System For 3D maps, Does It Exist?
very interesting indeed.....
@PolyVox, a quick question, how detailed terrain could one make using Polyvox?
@JTippetts those are some interesting articles.... will look into them later (Buried 10 feet deep in code at the moment )
@PolyVox, a quick question, how detailed terrain could one make using Polyvox?
@JTippetts those are some interesting articles.... will look into them later (Buried 10 feet deep in code at the moment )
"this is not the bottleneck you are looking for"
Re: Dynamic Voxel System For 3D maps, Does It Exist?
The terrain detail is all up yo you i guess. The large volume supports nearly endless size, so if you have some good render techniques you could probably go very detailed.
Working on a test terrain based on PolyVox but have some issues with picking the correct voxels from the mesh-selection and also i know nothing of shaders so texturing is a problem ; )
But have kind of destroyable terrain ingame working now.
Working on a test terrain based on PolyVox but have some issues with picking the correct voxels from the mesh-selection and also i know nothing of shaders so texturing is a problem ; )
But have kind of destroyable terrain ingame working now.
-
- 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: Dynamic Voxel System For 3D maps, Does It Exist?
nice
I will keep messing with polyvox, since I can't do anything else at the moment, tho a voxel system is not at the very top of my todo list....
I will keep messing with polyvox, since I can't do anything else at the moment, tho a voxel system is not at the very top of my todo list....
"this is not the bottleneck you are looking for"