I'm asking this question because for my next project I need to implement a voxel terrain engine similar to that used in CryEngine 2. Because I need to make caves, no I have a mental system for how this could possibly work but if it does not could you suggest a work around?
My system is where the editor has an editing tool where I can instantiate low poly balls on top of each other without depleting to much memory. The way I found around that would be to use some sort of occlusion where it destroys certain balls on the inside
For example if I had three balls but you could not see the third then destroy the third ball since it is not needed.
Sorry, I read this post and all I could see was "I need to write CryEngine 2"...
Answer by Statement
Nov 30, 2011 at 01:27 PM
If you want to do it yourself, look for Marching Cubes algorithm. It may take a day or two to wrap your head around, depending on your skill level. I managed to get this going the first day, and this going the second day. Third day I got bored and discontinued development of it.
Your idea of balls should be pretty simple to implement with marching cubes. Imagine each vertex has to sample a value (usually between 0 and 1) and that value is used to extend/retract the vertex for that point in space. Your balls would then interpolate from 1 to 0 where value 1 is in the center, and 0 is in the ball crust. Basically, you just have to check the magnitude.
I solved texturing by using a triplanar shader, requiring no UV coordinates. It just take the world position and project 3 textures on it, and interpolate between the textures depending on the normal.
Would you consider posting the code? That might help those who still strive :)
Statement. That Clayful thing you made is fantastic Honestly! You must create a tutorial On how to do it! Ive been looking for Unity voxel tutorials that arent like Minecraft blocks.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
9 People are following this question.
How to save voxel (Minecraft) terrain?
Ingame voxel terrain manipulation(sorry for last post)
Lights attached to objects turning off over terrain
How can I create voxel based terrain ?