b27a2e04ef
Fixing blueprint example issue #247 |
||
---|---|---|
.github/workflows | ||
crates/blenvy | ||
docs | ||
examples | ||
testing/bevy_example | ||
tools | ||
.gitignore | ||
Cargo.toml | ||
FUNDING.yml | ||
LICENSE_APACHE.md | ||
LICENSE_MIT.md | ||
LICENSE.md | ||
Migration_guide.md | ||
README-workflow-classic.md | ||
README-workflow-ui.md | ||
README.md | ||
RELEASE_NOTES.md | ||
rust-toolchain.toml | ||
TODO.md |
BLENVY: a friendly Blender <=> Bevy workflow
Crates & tools for adding components from gltf files in the Bevy game engine.
It enables a Blender (gltf) centric workflow for Bevy, ie defining entites & their components inside Blender. Aka "Blender as editor for Bevy"
It also allows you to setup 'blueprints' in Blender by using collections (the recomended way to go most of the time), or directly on single use objects .
Caution
Blenvy is currently in Alpha 1 state so there are still quite a few bugs, missing functionality, missing docs, broken examples etc Please make sure you back up your Blender files before using it !
Caution
Please make sure to use matching versions numbers for the Blender add-on & the rust crate ! This is the only way to make sure everything works as intended
Quickstart
Want to jump right in? See the quickstart guide for how to setup a basic project as fast as possible.
Features
- Useful if you want to use Blender as your Editor
- define Bevy components as custom properties in Blender with an UI tool to add & edit Bevy components, automatically export gltf blueprints & more in Blender
- blueprints & levels system : turn your Blender collections into gltf Blueprints for reuse inside levels that are just Blender scenes
- setup & tweak components in Blender Collections & override any of them in your collection instances if you want
- setup & tweak components for objects, meshes and materials as well !
- automatically load all assets for each blueprint (gltf files, manually added assets), with no setup required
- hot reload of your levels & blueprints
- minimal setup & code, you can have something basic running fast
- minimal dependencies: Bevy, Serde & RON only!
- opensource
If you were previously using the individual bevy_gltf_xxx crates & Blender add-ons please see the migration guide
Crates
One crate to rule them all !
- blenvy This crate allows you to
-
define components direclty inside gltf files and instanciate/inject the components on the Bevy side.
-
export your project's Bevy registry to json, in order to be able to generate custom component UIs on the Blender side in the Blender blenvy add-on
-
define Blueprints/Prefabs for Bevy inside gltf files and spawn them in Bevy. With the ability to override and add components when spawning, efficient "level" loading etc
-
the ability to save & load your game state in a relatively simple way, by leveraging the blueprint functionality to only save a minimal subset of dynamic data, seperating dynamic & static parts of levels etc.
OLD videos: There is a video tutorial/explanation if you want, or you can read the crate docs. There is a video tutorial/explanation for this one too, or you can read the crate docs
The examples for the crate are here
-
Tools
Blender: blenvy
- an all in one Blender addon for the Blender side of the workflow:
- allow easilly adding & editing Bevy components , using automatically generated UIs for each component
- automatically exports your level/world from Blender to gltf whenever you save your Blend file
- automatically export your Gltf blueprints & assets
Examples
you can find all examples, here
components
use ofcomponents
only, to spawn entities with components defined inside gltf filesblueprints
use ofblueprints
andlevels
to spawn a level and then populate it with entities coming from different gltf files, live (at runtime) spawning of entities etcanimation
how to use and trigger animations from gltf filessave_load
how to save & load levelsdemo
a full demo showcasing all features , including physics, animation
Workflow
The workflow goes as follows (once you got your Bevy code setup)
- create & register all your components you want to be able to set from the Blender side (this is basic Bevy, no specific work needed)
-
setup & then use the Blenvy Bevy crate
-
setup & then use the Blenvy Blender add-on
-
iterate
-
have fun !
-
then add your components to objects in Blender with a nice UI see here for more details
See the quickstart for a full step-by-step guide.
Third Party Integration
Read about the Avian Physics Integration to learn how to setup colliders in Blender that will be used by the Avian physics engine in Bevy.
Limitations / issues
- Some of
avian
orbevy_rapier
/physics code / ways to define colliders could perhaps be done better/visually within Blender
Contributors
Thanks to all the contributors helping out with this project ! Big kudos to you, contributions are always appreciated ! :)
License
This repo, all its code, contents & assets is Dual-licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)