Skip to main content
GameDev.net gamedev.net
🔒 Locked

Thoughts on voxels?

Started by Butabee May 24, 2010 at 4:03 PM 16 replies 5.2k views
Original Post
Butabee
Butabee
I've been interested in voxels ever since I was introduced to them. I think it would be amazing to have every inch of everything in a game be deformable/destructable. It's a shame more developers aren't interested in advancing voxel tech. What are your thoughts on voxels?
Decrius
Decrius
Too heavy.

Modern computers are, if you think about it, DARN SLOW. The current computing speed can be much much much faster in the future, but at the moment we have to do with x86 mainly. Which means we have to apply a lot of optimizations in favour of realism. This includes make set animations for buildings to collapse (BFBC2). BFBC2 does allow to shoot off walls off buildings, but if you look well this is all at a set amount of positions where walls can blow off.

This means it is undo-able, especially in a multi-player environment where each action / state of a collapse will have to be transmitted to other peers (else different users see a different map!).

Your idea is nice, but not feasible in games. I know some maths research teams at my university do use something you suggest. For instance simulating fluids (this is very complex, I'm not talking about lame Call of Duty water effects).

But if you mean on a smaller scale, it might be a nice game concept :)
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
Ibasa
Ibasa
www.thermite3d.org

Something else to look at if you like voxels.
SuperVGA
SuperVGA
Really, voxels aren't slow. they're just harder to deal with because the graphics hardware grew up with polygons.
it's strill possible to do some pretty fast voxel rendering off the cpu, though.
check ken silverman's voxlap engine and his cave demo.

voxelstein 3d was based on this too.

i'm building a voxel raycaster in a glsl fragment shader. it' pretty easy
and not at all slow.

the main drawback of voxels, tough is its memory ccnsumption.
even small sets take up a decent amount of ram.
Ibasa
Ibasa
Quote:
Original post by Decrius
Too heavy.

Modern computers are, if you think about it, DARN SLOW.


It's more that memory and IO are DARN SLOW. CPUs are fairly fast and could probably churn through voxels fairly well but you'd hit the memory wall pretty fast and trying to sync over the internet would just be crazy.
ApochPiQ
ApochPiQ
This talk of CPUs being too slow is nonsense. I remember the early Delta Force games using voxel terrain way back in the 90s. In fact with careful memory alignment management you could do realtime voxel deformation without too much issue, at least at moderate video resolutions.

Granted if you want to churn enough voxels to provide full-resolution graphics on a modern display, you're talking about a substantial hike in speed requirements; but memory buses have increased dramatically in speed since the Olden Days, and the actual amount of CPU power needed to do voxel rendering is pretty minimal. As another poster has already noted, the memory bandwidth and processing arrangements of modern GPUs is actually extremely well suited to rendering with voxels.

Things can get expensive if you want extremely realistic deformation support, but you can do pretty damned good approximations cheaply.
Krohm
Krohm
I've never been a fan of voxels. What they do is some sort of quantization after all, and I'm still not sure why should I want to do that.
Irregular/nested voxel grids are better to a certain degree, I can see the advantage of running density computation on a volume and then shooting rays thuru it... but I'm relatively sure polys could do it too given proper management. I realize this management is definetly non-trivial, but I'd still put my bets on polys for at least another few generations...
Previously "Krohm"
Decrius
Decrius
Using polygons instead of voxels is one of the biggest simplifications done in 3D. In reality, each molecule or atom (or even smaller) can be considered a voxel. A small particle bound to simple rules. One simplification could be to take bigger voxels (which is what we currently do with voxels) and one way is to only define outer layers as a flat surface. The border regions. This is THE optimization done in almost every 3D application, and works very well.

Now, if we want to take the next step, which is going for a more realistic representation, this is indeed voxels (or particles). Of course, the hardware is not (yet) optimized for this, and the technique itself is much more defining, much more realistic...much more heavy.

@ApochPiQ
Sure, for our current use CPU's are doing well. But really, you really find the computers being fast? As mentioned IO etc is mostly the limiting factor, but still...current CPU's and GPU's are still DARN SLOW.

Rendering complex 3D scene's take minutes up to hours. Simulations often need a few BIG simplifications. Why? Our computers are sooo slow. If you think about future developments, computer chips will be a zillion times faster. Then more complex techniques are much more do-able.

Voxels are very do-able, but the current hardware isn't helping you much with it.
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
Antheus
Antheus
Content creation is the problem. Imagine if every building had to be made out of bricks and mortar, where each of those is set of voxels.

Suff that adds most to visuals (grass, leaves) isn't doable with voxels.

Terrain of adequate granularity would need to be sampled at sub-pixel resolution and shaded dynamically to look and feel better than current bump-mapped, shader processed textures do.

Collision detection...

Physics simulation - voxels could make stuff fall apart in realistic manner, but to look realistic, the amount of voxels would need to be prohibitive.

Voxel rendering is a dead end. They might be used somewhere for certain aspects, but to render or process them directly is just a waste.


Rendering is a solved problem - as soon as unbiased rendering goes real-time, the distinction between real world photographs and CGI will be only limited by content creation. And for that, voxels are primary means of modeling is unsuitable.

Even other applications (medical and similar) process voxels into polygons for rendering, since it's so much easier to manipulate.
rmed002
rmed002
Quote:
Original post by Antheus
Content creation is the problem. Imagine if every building had to be made out of bricks and mortar, where each of those is set of voxels.

Suff that adds most to visuals (grass, leaves) isn't doable with voxels.

Why not just define world as polygons and use surface-materials to give cues to the "world compiler" that could generate voxels within constraints of the convex shapes given to it.

After all, most materials are rather homogenous inside. Its the surface that requires "unique" details. ( Try tearing open a pillow for example. It could have a canvas surface followed by a heap of fluff. )

At least this is the only way I could imagine generating voxel-worlds.
Warvstar
Warvstar
I use voxels on both the CPU and GPU in many different ways and they all perform well.

Check out these sites / papers

Volume Rendering Tutorial
http://www.vis.uni-stuttgart.de/vis03_tutorial/

Real-Time Programmable Volume Rendering

Beyond triangles: gigavoxels effects in video games

Efficient sparse voxel octrees


also Marching Cubes
High-speed Marching Cubes using Histogram Pyramids

Tons of research still been done in this area.
ApochPiQ
ApochPiQ
Quote:
Original post by Decrius
@ApochPiQ
Sure, for our current use CPU's are doing well. But really, you really find the computers being fast? As mentioned IO etc is mostly the limiting factor, but still...current CPU's and GPU's are still DARN SLOW.


I'm guessing you're pretty young [smile]
Antheus
Antheus
Quote:
Original post by rmed002

Why not just define world as polygons and use surface-materials to give cues to the "world compiler" that could generate voxels within constraints of the convex shapes given to it.


Entropy.

If a line is defined by (x1,y1)(x2,y2), then rasterizing that line doesn't add any information. It merely gets coarser as if filtered by scanline rasterization.

Quote:
After all, most materials are rather homogenous inside. Its the surface that requires "unique" details. ( Try tearing open a pillow for example. It could have a canvas surface followed by a heap of fluff. )
But this type of content generation is boring. Might as well not bother with voxels, and just procedural content, perhaps using shaders. Instead of gigabytes of static pixels, there is a 500 byte shader.


Think of voxels as raster image vs. vector image. Vector image scales to any resolution, raster suffers from aliasing (issue with LOD and distance to scene when rendering) as well as excessive data requirements or lossy compression.

If in control of content creation, then vector image is a better choice, unless deliberately going for style provided by raster.
Decrius
Decrius
Quote:
Original post by ApochPiQ
Quote:
Original post by Decrius
@ApochPiQ
Sure, for our current use CPU's are doing well. But really, you really find the computers being fast? As mentioned IO etc is mostly the limiting factor, but still...current CPU's and GPU's are still DARN SLOW.


I'm guessing you're pretty young [smile]


Hehe yes. 19y/o. I know what you mean though, my father often tells me stories about his old programming jobs, big machines written with COBOL, taking hours to compile...

You are right in how the current computers are way beyond the past computers. They couldn't even dream of this speed back then. It's pretty much quick enough for daily use where you are hardly annoyed by the speed. But if you look at super computers, at large server farms, networks to perform simulations or complex calculations...such as can be the case with voxels...then I think computers have a long way to go to become lightning-fast.

It of course all depends on the perspective you look upon it...I'm sure my future kids will laugh about my current computer's speed. :D
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
Antheus
Antheus
Quote:
Original post by Decrius

It of course all depends on the perspective you look upon it...I'm sure my future kids will laugh about my current computer's speed. :D


They'll probably wonder why we had such powerhouses on our desks, burning hundreds of watts.

The computers are likely to get relatively weaker (netbooks, smartphones, ...), a trend that has been going on for a while. But they are enabler for getting more done. Each time someone runs a query on Google they get the result of over one million CPUs.

Quote:
written with COBOL, taking hours to compile...
Hmm... You know, there's this language that is still in widespread active use today. It's called C++. It too can be trivially made to compile for hours.

Quote:
They couldn't even dream of this speed back then.
DOS applications were faster than anything today. Loading an application took a fraction of a second, Turbo Pascal 5.0 started in a fraction of a second and could build thousand files in under a second. Firefox, text editors, IDEs - they take several seconds to tens of seconds to start.

Video players under Windows 95 would start playing immediately. If I rename .mp4 encoded .avi ti have a .mpg extension, Windows Media Player takes 15 seconds to start start streaming (no joke). Youtube takes around 5 seconds to start playing a video. ATI control panel takes 75 seconds to start - it shows around 10 graphics card options which can be toggled. DOS took less time to start than Windows 3.1 and that took less time than Windows 7 - each measured on hardware relevant to their time.

Games 15 years ago would respond with one frame delay - click, next frame rendered would show the result of action - even if running at 200+FPS (CRTs had no delay, so <5ms response rate). Today's games have 4-7 frame delay (rendering + LCD delay), which means around 60-130 millisecond delay.


If we extrapolation, the future doesn't look so cool anymore.
EJH
EJH
Not sure if 3D Dot Heroes uses actual voxels, but it looks pretty cool. =)



You can make your character out of voxels, or "3D Dots" as they call them. Check the trailer.

http://www.3ddotgameheroes.com/media.html

Anyone read anything on the tech they used? Is it just a bunch a bunch of polygon cubes and grid textures? I'm sure theres a ton of optimizations you can do if everything is guaranteed to be a cube.
PolyVox
PolyVox
Quote:
Original post by EJH
Not sure if 3D Dot Heroes uses actual voxels, but it looks pretty cool. =)


Agreed :-) I haven't played it but I'm almost certain they don't use voxels. I love the 'voxel-style' look though, and will have to try reproducing it in my own voxel engine.



Quote:
Original post by EJHAnyone read anything on the tech they used? Is it just a bunch a bunch of polygon cubes and grid textures? I'm sure theres a ton of optimizations you can do if everything is guaranteed to be a cube.


I doubt if there are even polygon cubes. Large flat surfaces will be a single polygon, with normal mapping applied to make it look as though there are boundaries between the individual tiles. This means they can't do any effects like destoying individual voxels, but the retro-style look is still awesome :-)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.