Coder Social home page Coder Social logo

Comments (1)

Javier-Garzo avatar Javier-Garzo commented on June 18, 2024 1

Voxel shape
i know three ways to build a voxel terrain (geometry->organic order):

  1. Cube per voxel (Minecraft like): This is the most basic way and very popular thanks to the popularization of Minecraft. Where each voxel is a cube. In this solution you can't improve the shape, you can add more cubes per space, but always conserve the cube looks like.
  2. Marching Cubes: This algorithm is between the the previous and next solutions, generate more organic terrains and conserve that geometric look and need save more data to generate the terrain that the previous solutions. You can use interpolation (allow smoother shapes) and increase/decrease the voxels per space to archive more/less organic terrain and better look shape, however you will always conserve some geometric look.
  3. Dual countouring: This algorithm allow to get the smoother shapes, the trade off is we need to know even more information about the terrain than Marching Cubes algorithm. The terrain look full organic like 3D game, so you dont get that geometry results obtained in the two previous solutions.

A good geometry comparation is this image from a unity forum post (this is a simple comparison, you can archive best looking result with each solution):
image

So you can chose the options that you prefer for you game, but the smoother one is the Dual countouring.

Cave system
About the cave system in your game is a problem related with the 3D noise, i need investigate about it, because this project only use 2D perlin noise to generate the height map of the terrain. The solution for caves is use a 3D noise like a matrix or something similar how you save your terrain data for allow to generate the caves.

from marching-cubes-on-unity-3d.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.