Skip to content

A terrain rendering plugin for the bevy game engine.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

kurtkuehnert/bevy_terrain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bevy Terrain

GitHub Crates.io docs.rs Discord

Bevy Terrain is a plugin for rendering terrains with the Bevy game engine.

(Data Source: Federal Office of Topography, ©swisstopo)

Warning: This plugin is still in early development, so expect the API to change and possibly break you existing code.

Bevy terrain was developed as part of my bachelor thesis on the topic of large-scale terrain rendering. Now that this project is finished I am planning on adding more features related to game development and rendering virtual worlds. If you would like to help me build an extensive open-source terrain rendering library for the Bevy game engine, feel free to contribute to the project. Also, join the Bevy Terrain Discord server for help, feedback, or to discuss feature ideas.

Examples

Currently, there are two examples.

The basic one showcases the different debug views of the terrain. See controls down below.

The advanced one showcases how to use the Bevy material system for texturing, as well as how to add additional terrain attachments. Use the A Key to toggle between the custom material and the albedo attachment.

Before running the examples you have to preprocess the terrain data this may take a while. Once the data is preprocessed you can disable it by commenting out the preprocess line.

Documentation

The docs folder contains a high-level implementation overview, as well as, the development status, enumerating the features that I am planning on implementing next, of the project. If you would like to contribute to the project this is a good place to start. Simply pick an issue/feature and discuss the details with me on Discord or GitHub. I would also recommend you to take a look at my thesis. There I present the basics of terrain rendering (chapter 2), common approaches (chapter 3) and a detailed explanation of method used by bevy_terrain (chapter 4).

Debug Controls

These are the debug controls of the plugin. Use them to fly over the terrain, experiment with the quality settings and enter the different debug views.

  • T - toggle camera movement

  • move the mouse to look around

  • press the arrow keys to move the camera horizontally

  • use PageUp and PageDown to move the camera vertically

  • use Home and End to increase/decrease the camera's movement speed

  • W - toggle wireframe view

  • P - toggle tile view

  • L - toggle lod view

  • U - toggle uv view

  • C - toggle tile view

  • D - toggle mesh morph

  • A - toggle albedo

  • B - toggle base color black / white

  • S - toggle lighting

  • G - toggle filtering bilinear / trilinear + anisotropic

  • F - freeze frustum culling

  • H - decrease tile scale

  • J - increase tile scale

  • N - decrease grid size

  • E - increase grid size

  • I - decrease view distance

  • O - increase view distance

Attribution

The planar terrain dataset is generated using the free version of the Gaia Terrain Generator. The spherical terrain example dataset is a reprojected version of the GEBCO_2023 Grid dataset.

GEBCO Compilation Group (2023) GEBCO 2023 Grid (doi:10.5285/f98b053b-0cbc-6c23-e053-6c86abc0af7b)

License

Bevy Terrain source code (this excludes the datasets in the assets directory) is dual-licensed under either

at your option.

About

A terrain rendering plugin for the bevy game engine.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks