Jump to content

  • Log In with Google      Sign In   
  • Create Account


What Branches Of Mathematics Does A Voxel Engine Require?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Toothpix   Crossbones+   -  Reputation: 810

Like
1Likes
Like

Posted 15 April 2012 - 11:24 AM

What kinds of mathematics does a fully complete game engine require (voxels for graphics, comparable to the video below)? I realize there is calculus and advanced algebra, but any specific branches to completely brush up on and remember, or any other branches?



Please, excuse me if this question has been asked before, I just couldn't find something on the world wide web that would explain the mathematics behind voxels and voxel subdivision and also a complete engine.

C dominates the world of linear procedural computing, which won't advance. The future lies in MASSIVE parallelism.


Sponsor:

#2 Antheus   Members   -  Reputation: 2397

Like
2Likes
Like

Posted 15 April 2012 - 11:56 AM

If you look at your screen with a magnifying glass, you'll notice it's composed of small squares or dots.

These are called pixels.

A pixel is single element of (usually) rectangular grid:
+-+-+-
| | |
+-+-+-
| | |

A voxel is 3D equivalent. Instead of small squares, you have boxes.

There is no real mathematics behind it, no more than it takes to draw a cross word puzzle or tic-tac-toe board.

Voxels are problematic due to storage. To represent complex object at sufficient resolution, one needs vastly more storage than is available today. A petabyte (1 million gigabytes) would be quite a good start.

So voxel handling techniques deal mostly with solving this problem. While storage is cheap, we cannot access it fast enough.

Simple voxel manipulation doesn't complicate, it simply splits world into equal rectangular chunks and only draws those that are visible. Stuff presented in video comes closer to cutting edge, so there's a combination of techniques.


Background needed to implement such engines is covered by standard low-end CS curriculum which covers computer graphics, linear algebra and computer architectures.

Some other applicable semi-mathematical fields would be information theory (encoding, entropy) and compression.

Voxels are, at least today, an engineering problem, since the hardware we have isn't capable of working with them directly. As far as their structure goes, they are absurdly simple - just a bunch of boxes.

#3 SuperVGA   Members   -  Reputation: 1118

Like
2Likes
Like

Posted 16 April 2012 - 10:46 AM

As Antheus said, voxels tend to take up a lot of space. Butif you want to draw every voxel alone, it's also very tough on visualization time. (Lots of polygons)

Usually, voxels are raycast or have an isosurface created for each cell in a scalar field.

Minecraft is an example of a recent game that pulls off drawing every visible cell edge of every visible voxel in real time.

Voxels are basically very simple stuff that, when you want to optimize it, can become indefinitely complex.

Common optimizations include culling, surface approximations, octree or kd trees, polygon-aided raycasting and obviously compression.

#4 ajm113   Members   -  Reputation: 268

Like
1Likes
Like

Posted 16 April 2012 - 12:30 PM

A also good and well known technique I've used is callLists. I used them for particles, but it would do the job. FYI, call lists are bascily precompiled polygon/object information into the graphics card to speed up your program, and if all your doing is drawing tiny cubes. This will help speed up the process for the graphics card, so it wont try to kill it's self. ;)

Also one more thing to add is draw with triangles!
Check out my open source code projects/libraries! My Homepage You may learn something.

#5 Ryan_001   Prime Members   -  Reputation: 1315

Like
2Likes
Like

Posted 16 April 2012 - 05:05 PM

I did a voxel engine a while back for a TIGSource competition:

The entire thing is done using ray casting/tracing in a pixel shader, and ran fine on my 9800 gtx. Unless your voxels are large, translating them into polygons can be memory intensive. Also voxels are only memory intensive if you plan on working with them in an uncompressed form. I went with a tile system reminiscent of old-school 2d games (which is pretty much just artist directed VQ compression), and stored both the map and tiles in about 64 megs (4k 16x16x16 tiles, and a 256x256x256 map). I could've squeezed it into much less but I didn't feel the need.

The real drawback IMO of voxels is animation. Much like old school 2d sprites, you need to hand animate every frame. Where-as a polygonal models can have a near infinite frames of animation, and even have dynamically generated animation, voxels are much more restrictive in this area.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS