#blender #assets #bevy #gamedev #add-on

bevy_blender_utils

Bevy companion plugin for bevy_blender_utils Blender addon

2 unstable releases

0.2.0 Jul 28, 2023
0.1.0 Mar 16, 2023

#1912 in Game dev

MIT/Apache

32KB
198 lines

bevy_blender_utils

images/showcase.png

This is influenced by both bevy-scene-hook and blender_bevy_toolkit.

This is a proof-of-concept at this point. I need to dogfood this, but my project is still on 0.9.

What this is and what this isn't?

BBU (Blender Bevy Utils) consist of two parts;

  • BBU Addon: A Blender addon that allows extra data to be set on objects.
  • BBU Companion Crate: An opinionated way of using data generated by the addon.

This repo includes both source codes.

The Aim of BBU is to allow prefab-like workflow while still maintaining the code-first approach of editor-less Bevy. BBU only provides simple primitives like f32, Vec3 or Cuboid; while instantiating components with it is done through code. While this still requires some work to be done manually using code, it provides visual feedback using Blender as an editor and a clear asset workflow to follow. I prefer this because (my opinionated thoughts);

  • Parsing components from GLTF is too much work.
  • Blender as a base isn't enough for a game engine-like experience; making it using limited addon functionality is too much work.

So, this is more like bevy-scene-hook's approach; and can be used with it without this companion crate. I don't know if it is possible to do the hot-reload with my approach.

Installation of addon

You can clone the repository, zip bevy_blender_utils and import it as a Blender addon.

Usage

Usage is user-dependent, but the workflow I prefer can be found on examples. In short, it is like this:

  • Add plugin.
  • Have an id field for all scene-objects that needs care.
  • Create an enum and add a snake_case deserializer with id being the tag.
  • Profit.

Addon can be used with library override, which is awesome. Please open an issue if you need documentation on it!

Bevy Compatibility

Bevy Version Crate Version Plugin Version
0.11 0.2 0.1
0.10 0.1 0.1

Blender Compatibility

Minimum Blender version: 3.4.0

Todo

  • Tidy up python code and document it (there are lots of edge cases handled).
  • Maybe improve documentation, if possible.
  • Hide Id for basic usage.
  • Multi-color support.
  • Explore hot-reload possibility.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~18–28MB
~425K SLoC