PDA

View Full Version : Voxels


pat777
06-24-04, 07:10 AM
Are voxels worth to use in an entire game? By entire game I mean for rendering the entire volume of every object.

Mullins1060
06-24-04, 07:19 AM
voxels were used in the early delta force games but they werent very good performance wise and were scraped.

NightFire
06-24-04, 09:14 AM
They were also used in Tiberian Sun and Red Alert 2. If you don't need a lot of detail, their fine for RTS's.

Edit: Of course, they aren't good for an entire game, to my knowledge.

Edge
06-24-04, 10:17 AM
Wow, voxels, there's an old method that hasn't been used in forever. And no, I don't think ANY game used ONLY voxels, characters and objects still have to be constructed from polygons. However I think Outcast was the closest "true voxel" game, all the terrain and backgrounds were constructed from voxels. Didn't look too bad, but it definatly had problems. But characters still needed to be made from polygons, no way they'd be able to get decent looking models out of voxels back then.

mrrolf
06-24-04, 10:55 AM
Voxels are not a good data structure to use for a decent 3d game. They are quite slow and take up alot of space. Many games use Octrees in there games. Octrees are like voxels but with different levels of detail. If you don't have a simple LOD structure in place, then a simple level of DOOMI represented in voxels could bring a fast system to it's knees.

I'm sure there are some cool demos out there with Voxels (like this one: http://www.advsys.net/ken/voxlap/voxlap03.htm ) But for a full scale game, voxels are a no go.

CaptNKILL
06-24-04, 11:07 AM
Wow, voxels, there's an old method that hasn't been used in forever. And no, I don't think ANY game used ONLY voxels, characters and objects still have to be constructed from polygons. However I think Outcast was the closest "true voxel" game, all the terrain and backgrounds were constructed from voxels. Didn't look too bad, but it definatly had problems. But characters still needed to be made from polygons, no way they'd be able to get decent looking models out of voxels back then.
Ahh Outcast. Best action adventure ever created.

And the Voxel terrain worked out great. It looked kind of odd at some angles (the rows of voxels can be seen at some angles), but it really had beautiful graphics. Its a shame they didnt support higher graphic details and resolutions. The game runs too fast on my system and I get some animation glitches (running through muck\water makes you run real slow when the frame rate is too high). Id love to push the view distance waaay back and run it at 1024x768. Best looking game ive ever seen that doesnt have hardware 3d support. BTW, its a shame the sequel was canned, could have been amazing.

As long as we are on the subject, does anyone know of any tweaks for graphics for this game? I know the .ini files are all wide open and ready to be edited, but there are so many things in them i could never find anything that would make it look better. Id love to make a tweak guide for it if there were enough options that could be edited :D

Edge
06-24-04, 01:28 PM
I agree with you about Outcast, I thought that was a cool game and was very disapointed when the sequel was canned. For non-3d acceleration it looked spectacular, the water was simply amazing and probably wasn't matched until Morrowind came out 4 years later. Some things did look kinda odd though, for example that stack of wood that's by a house in the first level looks totally different depending on what angle you view it at, it's like the jaggies rearrange themselves as the camera circles around it. Unfortunatly the engine was fairly limited in options, the highest resolution it had was 512x386, but even on fast machines it runs slow at that setting. But it was cool that it actually supported things like Anti-aliasing, made the game look MUCH better. Unfortunatly I couldn't find any decent tweaks in the ini files, most of the stuff in there is set with the graphic options menu and there aren't any "hidden" settings as far as I could tell. I did change a few things in the INI file to enable the prettier water but keep the FOV disabled (in the options menu the two settings can only be adjusted togeather) because it caused a big framedip on my 200mhz computer, but nothing really to get *better* graphics out of the game.

However, voxels do have 1 apperent advantage over traditional polygons, and that is that voxel geometry takes up a VERY minimal amount of memory. The levels in Outcast probably took as long to load as a Half-life level, but were at least 10 times the size. I wonder what loading times would be in a modern game if they used voxels or voxel-like features for the terrain...imagine Farcry with levels 10 times larger than what they already are.

mrrolf
06-24-04, 01:42 PM
From what I know about voxels, they take up a huge amount of memory.

For example, if you have a level that is 500m x 500m x 500m.
If the map resolution was 1m (which is horrible), then you'll need 500^3 voxels to represent the level. That's 125,000,000 voxels. If you are clever and represent one voxel per bit (8 voxels per byte), you'd need 15MB.

That's alot of memory for what it represents, just in or out. To compare, then entire game DOOM was about 15MB. And that included ~27 levels, textures, sounds, etc...

Maybe I'm just confused about what you're trying to represent with voxels.

Edge
06-24-04, 01:50 PM
Well, I'm just going by experience. Unless they used some kind of streaming format in Outcast, it only used around 30 megabytes of memory for each full level, and only took about 10 seconds to load on a 200mhz computer. The same amount of data in other games that used polygons were far, far smaller than the ones used in Outcast.

However, wouldn't you only need to represent the ground with voxels? So really wouldn't it be 500x500x1 when calculating voxel space? Far less data than your example takes into account, that would only be around 300k of information (is my math wrong? that seems kinda off...).

mrrolf
06-24-04, 02:25 PM
yeah, you could only represent the ground with voxels. If you used 500x500x1, then you would just have flat ground with holes in it. If you wanted any variation in the ground, you'd have to add more voxels, which becomes expensive very quickly. Using voxels for ground would be a wate though. Usually you only care about one part of the ground.... the ground. You dont' care about anything above or below it. Voxels would tell you about what's below and above it. You dont' care about that part, so it's wasted memory.

I think voxels might be useful when they are used for collision dection or something on a simple model. But representing a large and simple (most game levels are simple) environments with voxels is a wastes. Maybe a game like Decent could use them... Something that has alot of tunnels and 6dof. I'm not familar with the game that was mentioned, but it probably doesn't use 100% voxel representation. There are proabaly just a few things that are efficently represented with voxels, but not everything.

haha.. I just noticed that I'm throwing out all old game names.

Edge
06-24-04, 02:36 PM
Actually in Outcast all the ground was represented by voxels. Polygons were used for character models and precise geometry (such as buildings), otherwise the terrain (and certain objects that sat on the terrain, for example piles of wood and rocks) was completely voxel-generated. I'm not so sure that your example would be totally acurate though, in Outcast the voxel size was fairly small but the game did have very high mountains and varying depths to it's terrain; since some of the levels were probably a mile or so wide in each direction it theoretically would've used up hundreds of megs of ram, but it appears this wasn't the case. I wonder how voxels are actually handled in these games, you'd think that if they were as inefficient as they sound that they would've never worked in the first place. Especially in the old Delta Force games which had a minimum requirement of around 8 or 16 megs of ram.

mrrolf
06-24-04, 02:51 PM
Maybe they used hierarchical voxels or something. That would technically be a octree, but if they only used it to say 'in' and 'out', I can see how you can call it voxels. I'm not sure how they did it... they haven't released source code have they?

3madcows
06-24-04, 03:02 PM
Even though the engine was slow and graphics weren't too pretty, I think voxels worked out alright for the old Delta Forces. The one thing that actually made it better was that they rendered each blade of grass, and you were actually able to hide in it when prone. I can't think of any other game that let you hide in the grass practically anywhere.

CaptNKILL
06-24-04, 03:44 PM
Actually in Outcast all the ground was represented by voxels. Polygons were used for character models and precise geometry (such as buildings), otherwise the terrain (and certain objects that sat on the terrain, for example piles of wood and rocks) was completely voxel-generated. I'm not so sure that your example would be totally acurate though, in Outcast the voxel size was fairly small but the game did have very high mountains and varying depths to it's terrain; since some of the levels were probably a mile or so wide in each direction it theoretically would've used up hundreds of megs of ram, but it appears this wasn't the case. I wonder how voxels are actually handled in these games, you'd think that if they were as inefficient as they sound that they would've never worked in the first place. Especially in the old Delta Force games which had a minimum requirement of around 8 or 16 megs of ram.
Actually, all of the buildings were voxels too. Im pretty sure everything that didnt move was voxel based besides the scenery items (fruit laying around, pots and pans etc.). And I dont really know how voxels work exactly, but im assuming the ones in this game, for the terrain at least, were done with a hieght map. For example, the level is simply a gray scale image with lighter colors being higher and darker ones being lower and when the game loads a level, it generates a voxel map. Then the buildings are voxel based models laying on top of that hieght map. This would explain why the levels load so quickly, because they are only 2d images with objects layed on top.

Sound possible?

mrrolf
06-24-04, 04:13 PM
Possible, but it would be kind of silly. Here's what that idea would look like if you can visualize heightmaps and voxels:

Hight map:
0 1 2 3 4 4 2 4 2 1

Voxel map:
0 0 0 0 1 1 0 1 0 0
0 0 0 1 1 1 0 1 0 0
0 0 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1

They represent the same data.. but voxel map takes up more space.

CaptNKILL
06-24-04, 07:40 PM
Possible, but it would be kind of silly. Here's what that idea would look like if you can visualize heightmaps and voxels:

Hight map:
0 1 2 3 4 4 2 4 2 1

Voxel map:
0 0 0 0 1 1 0 1 0 0
0 0 0 1 1 1 0 1 0 0
0 0 1 1 1 1 1 1 1 0
0 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1

They represent the same data.. but voxel map takes up more space.

Maybe it has some sort of constant thing that says that the layers are only 1 voxel thick.

I dont really know how it all works though because the game had low memory requirements(by todays standards of course), fast load times and didnt use a huge amount of hard drive space (couple hundred Mbs).

The max settings in the config program (tried to set the game up to match your specs) were (I think) AMD K6-2 500Mhz and 64Mbs ram with no hardware acceleration. Whatever technique they used for the voxels must have been more efficient than most people think. Its not very scalable at all for faster systems but for the shear amount of "stuff" in this game, its surprising it ran at a playable frame rate on some pretty damn slow hardware, yet still looked very pleasing. By todays standers people would say it looked like crap, because the textures were very blurry and lacked detail, but the characters look great and have full bump mapping (yes bump mapping) and everything down to the eyes and lips move pretty realistically.

Ive only played a few games that came close (yet couldnt surpass) Outcast for atmosphere (Deus Ex and Blade Runner are some examples).

I cant believe i picked this game up shortly after it was released for a mere $10(down from $50). Its amazing how little people care about gameplay when they cant use their new 3d accelerator. :retard: