Code Monkey home page Code Monkey logo

timber's Introduction

Dynamic Terrain using Marching Cubes

This was done as a project for the course TSKB07 at Linköping University. The project is an implementation of dynamic terrain using marching cubes.

Dependencies

To run the project a OpenGL shader version of 4.5 is required. If this version is not met, nothing will be shown on screen and error messages will be printed.

Ubuntu

Not entirely sure if these work anymore, was a long time since I used Ubuntu. But it atleast gives some hint of what is required.

  sudo add-apt-repository ppa:glasen/freetype2
  sudo apt update
  sudo apt install freetype2-demos libfreeimage3 libfreeimage-dev xorg-dev libglew-dev libglfw3-dev

Manjaro

  pamac install freeimage freetype2 glew glfw-x11

Running

To compile and run the application you need to also download my engine (verified to work on engine commit 9f8de935de83f998befbb06b9ff9e5c93bd8f232) and place it in the same directory as this project (ie ~/Documents/TIMber and ~/Documents/Greet-Engine-Port) then if you use MakeGen simply run

makegen run

in the TIMber directory to run the program.

Otherwise, you first need to build the engine inside Greet-Engine-Port/Greet-core by running

make

then compiling and running the project with

make run

in the TIMber directory.

Using the raytracer

The controls for the game is pretty straight forward. Move player with WASD, move up and down with space and shift. Move the camera with the mouse. To change which material you are placing down scroll the mouse wheel. To place out voxels in the terrain hold down the right mouse button when aiming on the terrain (this will only work within 20 units or when a striped sphere appears on the terrain). To remove voxels hold down the left mouse button.

In order to toggle the grabbing of the mouse simply press escape.

Screenshots

Sculpting

Reflection

Caves

Cave

timber's People

Contributors

thraix avatar

Stargazers

Samuel Hulme avatar

Watchers

James Cloos 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.