Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411504 Posts in 69373 Topics- by 58429 Members - Latest Member: Alternalo

April 25, 2024, 03:54:24 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Voxel engines (not minecraft-like blocks)
Pages: [1]
Print
Author Topic: Voxel engines (not minecraft-like blocks)  (Read 3317 times)
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« on: July 08, 2017, 01:50:02 PM »

Hey all

I started working on a toy 'voxel engine' using unity with no real ambition, just to scout what it takes and what the obvious obstacles are etc. The problem is that I'm starting to really like the idea of making games in a voxel engine but making this from scratch is not that appealing.

I couldn't find online anything like that though, which is strange. You'd think there would be enough to choose from but nope! It's important to specify what I want though. I want a voxel engine that treats its voxels like pixels, with solid colors and whatnot, and make games with true voxel art on it. What I did find was a bajillion minecraft/infiniminer clones and several random enticing screenshots with no clear source.

My own implementation is bare bones but not that bad. Surprisingly short code too. It uses GPU instancing, so I can get half a million voxels on the scene with no problem. So I guess I could do without a decent engine made by someone more competent if I could at least add support to some of these fancy voxel editors out there, like Magica Voxel. However, ideally someone would point me to a real engine :D
Logged

surt
Level 7
**


Meat by-product.


View Profile
« Reply #1 on: July 08, 2017, 05:06:34 PM »

gavanw's Voxel Quest is pretty awesome and was open sourced, though no idea how usable it is.
Logged

Real life would be so much better with permadeath.
PJ Gallery - OGA Gallery - CC0 Scraps
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #2 on: July 08, 2017, 05:22:20 PM »

I had no idea this was open sourced! This is awesome.

It looks orders of magnitude more complex than what I was looking for though. The resolution he achieved with this is amazing. Normally more features is a good thing but the added complexity replaces my current problem with one even harder.
Logged

Raptor85
Level 5
*****



View Profile WWW
« Reply #3 on: July 08, 2017, 06:48:27 PM »

voxlap from the man himself, been open sourced for ages (and the interesting thing about voxel engines, being not gpu bound they just look better and better as computers get faster Tongue)

http://advsys.net/ken/voxlap/voxlap05.htm
Logged

-Fuzzy Spider
surt
Level 7
**


Meat by-product.


View Profile
« Reply #4 on: July 08, 2017, 07:01:37 PM »

Voxlap has a non-commercial license so not open source per OSI definition.
Logged

Real life would be so much better with permadeath.
PJ Gallery - OGA Gallery - CC0 Scraps
Artsicle
Guest
« Reply #5 on: July 09, 2017, 02:21:02 AM »

Minecraft ISN'T voxel based btw.
It uses polygons for rendering, not voxels.
Logged
ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #6 on: July 09, 2017, 04:16:28 AM »

But minecraft's worlds are saved as voxels still.
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #7 on: July 09, 2017, 07:56:05 AM »

Quote
Minecraft ISN'T voxel based btw
Well I did specifically asked for 'not minecraft-like blocks'. Even if from a data structure point of view it can be considered partially voxel. But I find it a bit of a stretch, that's why it bothers me that minecraft and similar games hijacked the term voxel engine.

Anyway, something tells me the simplest alternative so far is to continue developing my simple unity solution. I don't need all that resolution and complexity.
Logged

Crimsontide
Level 5
*****


View Profile
« Reply #8 on: August 04, 2017, 11:16:17 PM »

I made a voxel engine for a game competition by TigSource a while ago:



Its a true 'voxel' engine, run entirely on the GPU, and was running on a GTX9800 (ya, very old card).  If you have any questions on how it worked, or how to go about programming one I can help.  That said, the big question is, what does the engine need to be able to do?  Because that will dictate the sort of approach you take...
Logged
Artsicle
Guest
« Reply #9 on: August 05, 2017, 08:54:34 AM »

I made a voxel engine for a game competition by TigSource a while ago:



Its a true 'voxel' engine, run entirely on the GPU, and was running on a GTX9800 (ya, very old card).  If you have any questions on how it worked, or how to go about programming one I can help.  That said, the big question is, what does the engine need to be able to do?  Because that will dictate the sort of approach you take...
What did you make it in? C++, Java, etc
Logged
Crimsontide
Level 5
*****


View Profile
« Reply #10 on: August 05, 2017, 10:48:24 AM »

C++, but the majority of the 'engine' was in HLSL.  Like I said, it was run almost entirely on the GPU.  Basically one large pixel shader applied to two triangles that covered the entire screen.

The 'level' consisted of a map and tiles.  Each 'tile' was a 16x16x16 block of voxels.  The map consisted of 256x128x64 tiles, though the size of the map really was only restricted by memory size.  Each block in the map would index into the tile set, so it worked like a 2D tiling engine, but in 3D.  This kept memory down.  It was done completely with raytracing, and while there was no dynamic lighting, with modern hardware it'd be easy to add.
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #11 on: August 15, 2017, 02:52:15 PM »

My gmail went nuts and decided everything TIG related is spam. So I missed these last replies.

I made a voxel engine for a game competition by TigSource a while ago:



Its a true 'voxel' engine, run entirely on the GPU, and was running on a GTX9800 (ya, very old card).  If you have any questions on how it worked, or how to go about programming one I can help.  That said, the big question is, what does the engine need to be able to do?  Because that will dictate the sort of approach you take...

This is amazing! It's exactly what I was thinking about. A voxel engine that focuses pixel art-style of presentation. No fancy shading, no 'infinite resolution' gimmick etc.

I stopped working on my thing but I made some progress using the GPU as well, using Unity. GPU instancing with material block to get different colors.

Right now I'm not sure I'll ever get back to it. This is one of those projects I'm not really directly interested in it and just started because it doesn't exist, and it really should exist! it seems like a great way of making games. Voxatron comes close but I don't like how it renders the world because it comes with its own shading system.
Logged

Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #12 on: August 16, 2017, 03:21:24 AM »

I'm on and off working on a voxel engine, which looks like this:




Plain color blobs, rendered via non-instanced quads which fetch all their properties from textures in the vertex shader. Because it turns out that instancing really small batches results in a massive overhead. In my profilings on a Geforce GTX 770 it spent >70% of GPU time in the Input Assembler stage. Therefore non-instancing, but because of the vertex fetch trick it doesn't matter. The source textures are updated via small blits from temporary textures so they doesn't stall the pipeline. Lighting, shading and stuff happens on these textures, too, so it's sort of a Voxel Space renderer - neither Forward nor Deferred. I can spend >50 samples of Shadow Mapping per voxel and still get >100fps on a mid range GPU.

Unfortunately it's dead at the moment, thanks to fulltime employment and a child. And the code is definitly not OpenSource-able. So technically this is just a self plug. Sorry. But I can probably get cracking again with beginning of next year, so maybe it's not dead code after all.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Crimsontide
Level 5
*****


View Profile
« Reply #13 on: August 16, 2017, 05:11:33 AM »

Nice stuff Schrompf Smiley  It may be 'self promotion' but its nice to see what others are working on.

Personally, I find that trying to render voxels as triangles, just works against you.  Voxels are easy and very fast to ray-trace.  The problem with voxels IMHO is storage and dynamic creation of the acceleration/tracing structures.  If you can fit it in memory, and it doesn't change frame to frame, modern hardware can ray trace a nearly infinite amount of scene complexity with voxels.

I'd be open to revisiting the project, I had fun writing the engine.  I just don't want to write all the associated tools (voxel editor, level designer, animation, etc...).  All the tools already exist for polygon engines, almost none of them for voxel engines.  That said, a 'hand drawn', top down, voxel, diablo-esque, game would look amazing.
Logged
Bauxite
Level 0
**



View Profile WWW
« Reply #14 on: August 19, 2017, 01:08:43 AM »

There's also RPG In A Box, although it's still in early access and it might not be exactly what you're looking for (e.g. it seems to be lacking per-voxel destruction and such, it just uses voxels as an art style).
Logged

▶  Current project: The Zipper (Devblog)  ◀
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic