|0.3.4||Sep 19, 2023|
|0.3.0||Sep 18, 2023|
|0.2.4||Sep 18, 2023|
|0.2.1||Sep 18, 2023|
#517 in Game dev
31 downloads per month
Bevy Mesh Terrain
cargo add bevy_mesh_terrain
NOTE: Make SURE you copy the terrain.wsgl shader into your assets directory properly! Otherwise your terrain will not render.
A very bevy-centric terrain plugin that takes advantage of entities, components and systems as much as possible to be as easy to understand and interact with as possible.
You spawn an entity and give it the 'TerrainConfig' and 'TerrainData' components, and then the plugin systems will spawn child entities which are each of the rendered chunks. In this way, it works similarly to a voxel chunking system ( a la minecraft) except using heightfields (2d) instead of voxels (3d).
How it works
( See examples folder )
You load a heightfield image into bevy asset server (R16 format - single color channel of 16 bits per pixel)
Pass this handle into this terrain plugin so that it will generate the heightfield data (Note: you could also set the heightfield data yourself manually)
The plugin systems automatically spawn 'chunk' entities by sampling the heightfield data. Chunks are only built and spawned when they are near the TerrainViewer component so attach that to your main camera.
Currently supports bevy 0.11