Coder Social home page Coder Social logo

terraxel-unity's Introduction

Terraxel

Terraxel is an infinite procedurally generated terrain generator for Unity.

It generates meshes near the player using marching cubes and transvoxel algorithms, and chunks that are further away are simple 2d chunks.

It is NOT in any way feature complete, and is meant to demonstrate the possibilities of such algorithms in Unity.

If you are looking for the transvoxel implementation it can be found in Jobs.cs, method TransitionMeshJob.

Demo video Textures and 3D models shown on the video are not included.

Features

  • Burst compiled Transvoxel implementation using Unity Jobs
  • Chunk and LOD management using an octree
  • Collider baking in Jobs
  • Simple graph editor for terrain shape that compiles into a compute shader
  • GPU noise generation
  • Very simple instanced renderer to demonstrate grass rendering

Used in the project

Installation

The version of Unity I used with the project is 2022.3, but earlier versions should work fine too.

  1. Download the source, open it in Unity and open the sample scene.
  2. Enable unsafe code in Player settings. There will be compile errors otherwise.
  3. Create a layer called "Terrain" and assign it to the chunk prefab in Assets/Resources/Prefabs/Chunk.

Other features are shown on the video, that should be enough to get started. You can cut the terrain with C and fill it with F.

Acknowledgements

License

MIT

terraxel-unity's People

Contributors

fobri avatar juuusoo avatar

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.