Questions on volume rendering

Started by
9 comments, last by Pottuvoi 11 years, 8 months ago
I've become extremely interested in the notion of volume rendering, using each voxel as if it were a pixel (IE, creating and rendering 3D pixel art) to create an isometric game.

However, it seems that nearly everything I can find online in regards to volume rendering are focused on creating 3-dimensional games (and most of them, minecraft clones) or working with medical technology, and very rarely do these articles provide much information in simple terms. Though, admittedly, I will probably find the articles on volumetric terrains quite useful.

Does anyone have any pointers on rastering larger volumes directly to a pixmap, in real-time, without converting to a mesh? It seems as though the simplest method would be similar to rotating a 2D image in software, but does anyone know a better way?
Advertisement
The common way would be to either do raycasting (shoot a ray from each pixel of the pixmap into the voxel grid and see what they hit first) or do have a whole bunch of billboards that sample a 3D texture of the voxel grid
Raycasting was recommended for rendering volume landscapes, in which a tile is a voxel, and is generally going to be much larger than a single pixel. But how well would it work for a 720p pixmap? That's like a million raycasts each frame. I could do a lower resolution, but I'm thinking that might make things look really blocky.

a whole bunch of billboards to sample a 3D texture? I'm not sure I follow.
Not sure how fast raycasting could be on GPU. I wrote a single threaded one on CPU that ran at ~5fps @ 720p for a pretty naive algorithm showing a 256x256x256 volume rotating on the screen. I'd say doing it in real time on GPU is definitely a possibility

Billboarded thing: You draw a whole bunch of parallel quads facing the screen that each take a subsection of the voxel grid at different depths. Since you're looking directly at the polygons you can't see that there's actually space between them. No experience with this method however
Yeah, I was hoping to avoid using the GPU, since I'm not familiar with GPGPUs. 5fps is pretty bad, but that gives me hope for a smaller resolution, like maybe 800x600 or even 640x480.

So basically, treat the volume as an array of bitmaps, and render back-to-front? That was my first idea, but it seems like that'd get undersirable performance as well, even if I eradicate the unseen layers.

Sounds like I may need to compromise on some things just to stay within the realm of the possible. Or get a little more than friendly with the GPU.
Dropping the resolution didn't really help much. You don't need to use OpenCL or anything like that, you could do it in GLSL easier. Treating the volume as bitmaps means you won't be able to rotate it in 3D
I'm primarily looking for rotations of 90 degrees, simpler lighting/shadows, and the ability to 'deform' volumes for character animations and such.
Basically, looking to minimize the graphics work and make certain programming tasks easier. Seems like this might not be worth the work It would save.
Isometric means you're going to be looking at 45 degree angles anyway, so you're still going to need to do rotation somewhat. The deforming for animation is even more complex, and will definitely require arbitrary rotation. By graphics work do you mean programming graphics or the graphics creation?

Isometric means you're going to be looking at 45 degree angles anyway, so you're still going to need to do rotation somewhat. The deforming for animation is even more complex, and will definitely require arbitrary rotation. By graphics work do you mean programming graphics or the graphics creation?


both, but primarily the first. I'm a shoddy artist, and don't know any who would be willing to work for free on a proof-of-concept.
Deforming volumes is very simple compared to deforming 2D sprites or 3D models, at least in my head, but maybe my idea there doesn't play out too well in practice.
Toolkits like VSG VolumeViz support volume rendering. Voxels require gargantuan amounts of space. We're working on converting voxel-based models to parametric surfaces to reduce storage requirements but that's no easy task. Curious if anyone has looked into that (VSG hasn't!)

This topic is closed to new replies.

Advertisement