Skip to content
프로젝트

소개

3D Geospatial engine for Bevy

과학 및 공학

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original
logo
3D geospatial engine for Bevy

GitHub Release GitHub License

Linux Build macOS Build Windows Build

Bevytiles is a 3D geospatial engine 🌎 for Bevy. Designed to stream and render the real world in real time. It lets you visualize any location on Earth directly inside your Bevy games and applications.

Built for indie developers and professionals alike, Bevytiles is a perfect fit for UAV simulations, flight-planning software, lightweight GIS analysis, presentations, digital sand tables, and any other geospatial visualization.

It provides precise, ground-truth altitude data, essential for accurate collision detection and spawning mechanics in games, as well as for topographical analysis in GIS workflows.

Originally developed to power a flight simulator, Bevytiles was extracted into a lightweight, standalone library so it can be embedded seamlessly into any Bevy project.

Demo

https://github.com/user-attachments/assets/c17c0c8b-c578-4573-8d11-23050c7aa4ba

Run the demo

cargo run --example demo

Flies over the Grand Canyon. A/D roll, Q/E yaw, W/S pitch, +/- throttle, R reset after crashing into the terrain. Tiles cache under .cache/; the first run downloads them (Esri imagery serves JPEG despite the endpoint name — decoding handles both).

In the browser

rustup target add wasm32-unknown-unknown
cargo install wasm-server-runner
cargo run --example demo --target wasm32-unknown-unknown   # dev loop, opens on :1334
./web/build.sh                                             # static bundle → web/dist

On wasm32 the tile source uses browser fetch on Bevy's task pool instead of threads, and keeps native-zoom heightmaps in memory instead of a disk cache. Details and caveats in web/README.md.

Use as a library

use bevy::prelude::*;
use bevytiles::prelude::*;

App::new()
.add_plugins(DefaultPlugins)
.insert_resource(WorldConfig::from_lat_lon(46.206889, 9.497194)) // the Dolomites
.add_plugins(TerrainPlugin)
.add_systems(Startup, | mut c: Commands, w: Res<WorldConfig>| {
c.spawn((Camera3d::default(), TerrainCamera,
Transform::from_translation(w.initial_position(5000.0))));
})
.run();

Configuration mirrors raytiles: WorldConfig, StreamingConfig, RenderingConfig (runtime mutable — the plugin syncs materials), NetworkConfig. world.max_zoom defaults to 15; raising it (≤ 22) opts into heightmaps synthesized from the native-zoom ancestors and flat default normals. Large worlds use the raytiles rebase convention via the TerrainAnchor resource (absolute = user − world_offset); see the demo's rebase_large_world.

Layout

module role
lod pure desired-set policy (snapshot-tested — values match the C++ engine exactly)
source tile fetching: native = worker threads + HTTP + disk cache; wasm = fetch futures + memory cache; decode + synthesis, whole-tile payload channel
store ECS systems: reconcile / promote / update_desired / status; one entity per tile
material + assets/shaders/terrain.wesl displacement, lighting, fog
synth Terrarium float decode / quadrant upsample / carry-safe encode
height uint16 height grids + bilinear ground_height

Bevy compatibility

bevytiles bevy
0.1 0.19
0.2 0.20

Notes

  • Data: imagery © Esri; elevation/normals from the Mapzen/AWS terrain tiles. Mind their terms.
  • cargo test runs the full suite (lod snapshots, synthesis math, source integration against seeded caches — all offline).

License

관련 프로젝트 살펴보기

불러오는 중…