Question about voxels and polygons

55816dc1f0620e2f54c2e928809134b8
0
redgamerman 101 Mar 29, 2012 at 19:06

Hey there devmaster forums,

I’m really interested in voxel theory. I’ve seen a couple of topics on this forum that have talked about it some. I also know that some big engine out there (was it the one that powers Crysis?) uses them some for terrain generation or something. I looked voxels up on wikipedia as well and read something about polygons being used in conjunction sometimes with them. How are polygons and and voxels used together? And why aren’t they used more often in modern games? Thanks.

11 Replies

Please log in or register to post a reply.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Mar 29, 2012 at 19:13

I’m not aware of any of the big engines using voxels for terrain - you might be thinking of heightfields, which is a different thing?

There’s basically two ways of rendering a voxel object: either convert it into polygons (using an algorithm like marching cubes) and render the polygons, or render it directly by raytracing.

Both of these are pretty slow processes, which I think is the main reason why voxels aren’t used more in full-fledged games (vs tech demos and suchlike). The most recent generation of GPUs have some nice features that allow much faster voxel processing than before, but it’s still not fast enough for full-fledged games, except in some special cases. Some games use voxel-based fluid sims. The LittleBigPlanet games made fairly extensive use of voxels, but they’re helped out by their game world being 2.5D - very thin along the depth axis - so they can get away with something that’s only 16 voxels deep, which helps keep the costs down.

B5262118b588a5a420230bfbef4a2cdf
0
Stainless 151 Mar 30, 2012 at 08:42

There is a guy called Branislav Siles who is working on a cross platform voxel system that is more than good enough for AAA games.

I have been trying to get more details from him for ages, but the videos are awesome. Much nicer than unreal for a start.

The basic technique I have got out of him is he uses a very efficient sparse 3d array to store mipmaps of voxel objects.

So if you are a long way away from an object it is displayed as a quad, get a bit closer and it’s displayed as a few quads , ad nauseum

The voxels are displayed as billboards, so each one is very quick to render.

The clever bit, is the storage of the voxels and the way he parses it in the game. He’s not talking about that.

There are other demos of efficient sparse 3d array rendering on gpu’s which are just beautiful.

I disagree with Reedbeta on this one, voxels are the way forward, just not voxels as we used to think of them. :rolleyes:

You could also research things like “voxel polygons” which is a nice way of getting around a few of the issues with voxels.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Mar 30, 2012 at 16:59

I should clarify that when I said they’re not fast enough for games, I mean they’re not fast enough right now. They may well be the way forward, if the problems with them can be solved. :)

Stainless, I looked at some of the screens and videos on that guy’s site, and have seen various other sparse voxel demos before, and they do look really good. However: (1) most of the test worlds look very small, no more than a few meters big; (2) probably the entire capacity of the CPU/GPU is being used to render these things, leaving nothing for all the other stuff a real game has to do, and (3) there’s little or no animation of the voxel stuff. I did see some videos of a truck driving around and leaving tire tracks, but the truck is polygonal and tire tracks could very well be done with some special-case tricks; it’s a far cry from the amount of animation you would need to do a proper game with extensive breakable objects, trees swaying in the wind, etc.

I don’t know how the voxels are stored and rendered in these kinds of demos, but you can often tell more from what’s left out than what they put in.

B5262118b588a5a420230bfbef4a2cdf
0
Stainless 151 Mar 31, 2012 at 18:19

I’ve been talking to him about us porting his engine to our platform, we gave him a developer account, but our software requires a professional version of visual studio, he doesn’t have one.

From the conversations I have had with him, he’s solved all the issues you mention. Which is why I am so keen to have a proper look at it.

We will wait and see what he comes up with, I hope he’s right.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Mar 31, 2012 at 19:37

I’ll believe it when I see it. :) A few of these voxel engines have popped up over the last few years, usually with overly grandiose claims about how their engine is going to change the landscape of the games industry, but they all have the same issues (particularly the extremely limited animation capabilities), the developers are always extremely secretive about their techniques, and none of these engines have ended up going anywhere but the bit-bucket. :)

820ce9018b365a6aeba6e23847f17eda
0
geon 101 Mar 31, 2012 at 19:46

@Stainless

I have been trying to get more details from him for ages, but the videos are awesome.

I don’t suppose you have a link?

B5262118b588a5a420230bfbef4a2cdf
0
Stainless 151 Mar 31, 2012 at 19:50

he’s working on a demo he is going to release as a binary, I don’t have any links for anything he has done anymore.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Mar 31, 2012 at 20:08

I just googled his name and came up with this: http://www.atomontage.com/

2b43b428f568623be302bd98e15c3686
0
elengyel 101 Mar 31, 2012 at 20:58

The C4 Engine has been using voxels for terrain generation for a few years now, and it’s tools allow real-time modifications to a large 3D voxel field. Polygon meshes are generated with marching cubes and stored for later rendering. Level of detail is handled by generating meshes at different voxel resolutions and seamlessly connecting them with the transvoxel algorithm.

B20d81438814b6ba7da7ff8eb502d039
0
Vilem_Otte 117 Apr 02, 2012 at 00:43

Voxels are good in some ways - especially for fluids, gases, clouds, etc. - they can make it look shiny. Thought honestly I don’t think they will replace the almighty triangles ;)

Ad C4 and real-time modification of voxel terrain - just out of curiosity - any OpenCL involved in marching cubes, or are you actually doing it that fast on CPU? :)

2b43b428f568623be302bd98e15c3686
0
elengyel 101 Apr 02, 2012 at 04:49

@Vilem Otte

Ad C4 and real-time modification of voxel terrain - just out of curiosity - any OpenCL involved in marching cubes, or are you actually doing it that fast on CPU? :)

It’s all on the CPU.