Jump to content


crazy voxel idea, do you think its worth doing


4 replies to this topic

#1 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2758 posts

Posted 23 June 2012 - 12:19 AM

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.
you used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#2 geon

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 23 June 2012 - 08:44 AM

I can't really follow you. Could you draw something to illustrate your idea?

#3 Stainless

    Member

  • Members
  • PipPipPipPip
  • 610 posts
  • LocationSouthampton

Posted 23 June 2012 - 10:18 AM

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 construct.

#4 rouncer

    Senior Member

  • Members
  • PipPipPipPip
  • 2758 posts

Posted 23 June 2012 - 09:21 PM

Posted Image

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 used to be able to fit a game on a disk, then you used to be able to fit a game on a cd, then you used to be able to fit a game on a dvd, now you can barely fit one on your harddrive.

#5 Stainless

    Member

  • Members
  • PipPipPipPip
  • 610 posts
  • LocationSouthampton

Posted 24 June 2012 - 10:19 AM

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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users