Coder Social home page Coder Social logo

terra's Introduction

Terra crates.io docs.rs Github CI

Terra is work in progress large scale terrain rendering library built on top of wgpu.

Overview

Terra supports rendering an entire planet with details ranging in scale from thousands of kilometers down to centimeters. In Terra, terrain is treated as a heightmap along with a collection of texture maps storing the surface normal, albedo, etc.

All of this information can take quite a bit of space, so it isn't included in this repository. Instead, the necessary files are streamed from the internet at runtime and cached locally in a subdirectory with the current user's cache directory (which for instance defaults to ~/.cache/terra on Linux).

Level of detail (LOD)

To ensure smooth frame rates and avoid noticable "LOD popping", Terra internally uses sphere mapped version of the Continuous Distance-Dependent Level of Detail algorithm.

Incremental Generation

Terra works by streaming coarse grained tiles containing terrain attributes and then adding fractal details using wgpu compute shaders.

Getting Started

Install Rust and then the other needed dependencies:

$ sudo apt-get install libegl-dev libudev-dev build-essential libssl-dev cmake

Running should be as simple as:

git clone [email protected]:fintelia/terra && cd terra
cargo run --release

The first time you run Terra, it may take a minute or two to stream the necessary files. Don't worry if you have to kill the process part way through, on subsequent runs it will resume where it left off.

Once that step is done, you should see the main Terra window. You can navigate with the arrow keeps, and increase/decrease your altitude via the Space and Z keys respectively. Joystick controls are also supported if one is detected. To exit, press Escape.

You can also pass --help to see some other command line options.

System Requirements

  • Windows or Linux operating system (Terra may work on MacOS with the 'soft-float64' feature enabled, but this hasn't been tested)
  • A fast internet connection
  • GPU with 2+ GB of VRAM

Data Sources / Credits

During operation, this library downloads and merges datasets from a variety of sources. If you integrate it into your own project, please be sure to give proper credit to all of the following as applicable.

Kind Source
Elevation ETOPO1 Global Relief Model
Elevation NASA Digital Elevation Model
Orthoimagery Blue Marble Next Generation
Stars Yale Bright Star Catalog
Treecover Global Forest Change
Trees SpeedTree
Ground Textures FreePBR

terra's People

Contributors

fintelia avatar philpax avatar

Watchers

 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.