Voxel engine question (vs normal 3d Game engine)

Started by
8 comments, last by Gnollrunner 5 years, 2 months ago

Hi,

Ive been writing games and game engine for both 2D and 3D games (thanks to gamedev.net!) for long but i havent been exposed to voxel based games and voxel engines,

what is the main difference between an ordinary/normal 3D game engine compare to voxel engine? are the processing different specially rendering at the fundamental level?

i can imagine some games just pretend to be voxel by having a voxel like 3D model and terrain but rendered in normal fashion like its just an ordinary 3d Mesh, etc. or are there special 

ways of rendering them, like block by block, isnt it like a little non optimize specially for common blocks, etc.

Shot me your 2 cents before I accept my next project which is potential to be voxel and before i dig deep into research.

 

Thanks in advance!

Advertisement

At first you likely want to differentiate what 'Voxel Engine' could mean:

Low res, e.g. Minecraft?

Mid res, e.g. Voxel Farm or Dual Universe?

High res, e.g. Atomontage or Unlimited Detail?

 

And we need to ask for the advantage of voxels in general, likely procedural or user generated content, ease of destruction, or just art style?

 

So for a fruitful discussion you might want to tell more about your next project, otherwise we may talk based on widely differing assumptions...

 

The questions raised above are all good and important, but this also feels like a great excuse to point to stb_voxel as an example of how a voxel engine can be set up

 

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

There's not really too much voxel rendering going on in games (at least not rendering literally the voxels), there are a couple of algorithms such as Cone Tracing that voxelize your geometry, but I'd claim that's nothing that you really have to design your engine around...

Typically, when talking about voxel engines in games, people are really talking about their terrain system. In this case you might have some volume data or even normal mesh data which you then voxelize and run one of the common meshing algorithms on it such as marching cubes, which is going to output a normal polygon mesh (again).

It's pretty much the same idea as integrals in calculus. There's also people who've rendered the voxels themselve, in which case you either get minecraft, or you just go small enough with your volume elements that a smooth surface is approximated.

On 1/15/2019 at 12:24 AM, JoeJ said:

At first you likely want to differentiate what 'Voxel Engine' could mean:

Low res, e.g. Minecraft?

Mid res, e.g. Voxel Farm or Dual Universe?

High res, e.g. Atomontage or Unlimited Detail?

 

And we need to ask for the advantage of voxels in general, likely procedural or user generated content, ease of destruction, or just art style?

 

So for a fruitful discussion you might want to tell more about your next project, otherwise we may talk based on widely differing assumptions...

 

Hi yeah, the next possible project is a voxel based RTS game, im just wondering if i can use my 'traditional' engine and just draw the arts in voxel form or like there is a need for it to be pure 'voxel' engine but i dont know what it actually means.

 

11 minutes ago, cebugdev said:

voxel based RTS game

reading this i think of that:

... but just for inspiration.

As long as you are not sure about anything, i would try to work with you current engine and wait for problems come up or not. (With current GPU power i would not expect so many problems.)

There are really many options... It's mainly about the size of voxels, if they are mostly static or constructable / destructable. Likely you want to clarify this early to prevent heavy changes later. (I think the video above uses CPU for rendering, but i do not remember how i should know this. The game is pretty good btw.)

 

You should differentiate between voxel *visuals* (i.e. blocky looks) and voxel *gameplay features* (i.e. block-based editable terrain and such). While they often come together, neither necessarily implies/forces the other.

If you want to create an RTS that just looks blocky, but has totally classic RTS mechanics, you don't need a voxel engine, and if you had one, it would only make a lot of things a lot harder. Just create your 3D models in voxel style and load/render them like any other with a "normal" 3D engine. 

However, if you do want things like de- or con-struction of terrain, buildings or units based on voxels, you'll need a real voxel engine. In this case, you couldn't work with simple one-piece 3D meshes manually created with e.g. Blender. You'd need an underlying voxel data structure from which you'd have to dynamically generate your 3D models at runtime. This requires much more effort.

From a pure rendering point of view, voxel engines are still based on 3D triangle meshes just like "normal" 3D engines, since this is simply how (almost) all graphics APIs and GPUs work. The difference is the run-time creation of the meshes based on the underlying voxel structure. 3D models in "traditional" game engines are "hollow", "empty shells", so to say. There is no logic behind them which makes them look the way they do, other then the artist's creativity. The shapes of 3D models in voxel engines, on the other hand, are backed by the voxel system, which itself is "invisible", but defines spatial structure in the background.

I hope this helps :)

3 minutes ago, wurstbrot said:

you couldn't work with simple one-piece 3D meshes manually created with e.g. Blender

In case not known yet, this tool allows to model and output both triangles or voxels IIRC:

http://www.voxelmade.com/magicavoxel/

Could be helpful in case a transition to real voxel engine becomes necessary unexpected.

23 hours ago, cebugdev said:

Hi yeah, the next possible project is a voxel based RTS game, im just wondering if i can use my 'traditional' engine and just draw the arts in voxel form or like there is a need for it to be pure 'voxel' engine but i dont know what it actually means.

 

I think that in your case you really don't need to go as far as a voxel engine.  Voxel engines excel in a couple places. First there is something like Minecraft where you want players to be able to build and destroy terrain. Note this doesn't have to necessarily be blocky terrain.  There are many algorithms for making smooth terrain with voxels, although some of them generate meshes which are not so even as traditional methods. To name a few there are algorithms like marching cubes, extended marching cubes, native surface nets, dual contouring etc...... There are also various octree versions of each of these (dual contouring is naturally so). Also voxels don't even need to be cubes. I use prisms for various reasons.

Another major reason to use a voxel engine is to build large worlds at run time from functions where stored mesh sizes would be prohibitive. For your goals it might be a waste of effort.

This topic is closed to new replies.

Advertisement