Jump to content
  • Advertisement
Sign in to follow this  
bitshit

Volume rendering

This topic is 4309 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I know it's a technique that has been little used in games, but I was wondering how volumetric data is visualized in games (without triangulizing the data). Volume rendering has been used in the past on computers which had little processing power (Bladerunner, tiberian sun etc) and in some expiriments like metroid cubed (http://pages.infinit.net/voxel/home.htm) and ken silverman's voxlap (http://advsys.net/ken/voxlap.htm) After some reading raytracing seems to be the way to go, but doesnt that require far too much processing power? (especially since those games ran on older pentiums).

Share this post


Link to post
Share on other sites
Advertisement
It's difficult to make a 6DOF fully 3d voxel renderer, but 2.5d terrain renderer isn't so bad. The idea is this: Rather than ray-tracing each pixel, you trace each column of pixels 2 dimensionally. So for each column you step away from the view, evaluating the height of terrain at each point. You use the heights to fill the column of pixels. You do this by finding the apparent height on the screen of the terrain at each step, and if it's higher than any pixels you've filled in so far, you fill in up to that height. For a 6DOF one, your columns are not vertical, and it must be a royal pain. For full 3d, you have to store multiple heights per grid point.

When I wanted to make a volume renderer, I used a different technique. Never got very far, but it was looking promising, even if it was a memory hog. I did raytrace each pixel. But I stored, for every position in the world, the radius of empty space around that point (oops, there goes the memory). This allowed me to take much bigger steps and find the point of intersection more quickly. Then I came up with another trick. I started doing sort of progressive refinement. I did this by cutting the screen into 4 squares. I then traced each one by finding the radii at the 4 corner points and checking (very approximately) that the square fit within those radii. If it did not, I would subdivide that section of the screen and continue tracing the smaller squares from where the large one stopped. This gave a good performance improvement, especially in situation like looking at a wall from a distance. It could get fairly close to the wall with only 4 rays, then subdivide all the way down when it got close. Of course the whole thing is killer on the cache, so don't expect real-time for anything past 512x384, if that.

Share this post


Link to post
Share on other sites
Quote:

It's difficult to make a 6DOF fully 3d voxel renderer, but 2.5d terrain renderer isn't so bad. The idea is this: Rather than ray-tracing each pixel, you trace each column of pixels 2 dimensionally. So for each column you step away from the view, evaluating the height of terrain at each point. You use the heights to fill the column of pixels. You do this by finding the apparent height on the screen of the terrain at each step, and if it's higher than any pixels you've filled in so far, you fill in up to that height. For a 6DOF one, your columns are not vertical, and it must be a royal pain. For full 3d, you have to store multiple heights per grid point.


I know 4DOF is easier, it's used much in visualizing heightmaps, but Im aiming for full 3d. I read there are ways to adapt 4dof raycasting to 6dof, but couldn't find any tutorial on how...

I guess another improvement on raytracing voxels would be not to raytrace each pixel, but to partition the space in a voxel grid and trace through each voxel...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!