I was just thinking about unique voxel environments again, and I got
this idea based apon raytraced displacement mapping.
Say you have a 1024x1024 chunk of terrain (in a small *detailed*
space, to fit say 4x4 men), and you render an inverse cube at its
location and draw worldspace coordinates.
If you start from the eye position and trace a ray to the back of the
cubes worldspace coordinates you make a ray which can intersect a
heightmap, and give you a voxel output.
So, then add 5 more layers of heightmaps (a bottom a top a bottom a top
a bottom and a top) and you can have overhangs, with 6 layered
displacement maps which are raytraced.
What you have now is a model which has no side information, so detect
when you hit a side (a position thats between a bottom and a top) and
access one of 4 normal maps for what side it is, and draw the side
detail for that chunk.
So, then just add more than one chunk, maybe even stream unique chunks
for a large map, and you have another system for a voxel environment, do
you think this is a good idea?
Youd make the map by placing transformed hipoly kit models, I imagine,
with additions and subtractions.
Please log in or register to post a reply.
I can’t really follow you. Could you draw something to illustrate your
I use a similar scheme, but what I do is save some storage by packing
the data into a vector4.
X is start of base layer, Y is end of base layer, Z is start of second
layer, W is end of second layer.
Does limit you to two layers but makes the shaders easier to
whats not on this is if it hits a vertical wall, it accesses a side
normal map, and theres many chunks and they stream in as you get to
them, so the map is entirely unique.
You can do exactly the same thing with sparse arrays.
Your objects should be mapped as a tree of voxel cells.
You then have built in level of detail
The top cell is the complete bounding volume of the object. You then
split that into 4 smaller cells, and so on and so on till you have the
required level of detail. Empty cells are terminated at the highest
available detail level.
Then the same code can do terrain, objects, anything.