sdfgeoff / blender_bevy_toolkit Goto Github PK
View Code? Open in Web Editor NEWA blender addon and bevy plugin to use Blender as an editor for Bevy
License: Other
A blender addon and bevy plugin to use Blender as an editor for Bevy
License: Other
Bevy supports importing via GLTF - which includes animations, textures, materials and a zillion other thing. To implement support for these through the RON scene format would be a significant amount of work - and because the RON scene format is tightly coupled to Bevy's internal representations (eg of things like transforms), breakage between bevy versions is extremely likely.
The main advantage of this repo is the ability to define custom properties and use blender's UI to configure them. This is extremely useful, and the current GLTF pipeline doesn't support costom ECS-like properties in either application. However, support for reading the extra properties from GLTF was implemented in May last year, and by enabling this checkbox in blender's GLTF exporter, you can export custom properties from blender:
Because we store the exporter data in custom properties, enabling this checkbox .... just works!
So, what would we need to do:
Implement a function on the bevy side that can hook into GLTF import and convert JSON into components. https://bevy-cheatbook.github.io/3d/gltf.html#gltf-master-asset Shows how you can 'tag' a GLTF on import so it may be possible to create a similar function that is generic and mutates the scene_bundle that comes from the GLTF import. Chances are we can "just use" serde to handle the deserialization. We may have to put all the components into a single "bevy_ecs" property and do some type wrangling/macro stuff.
Delete all the RON stuff and encode/decode logic from the exporter (yay! less code)
??? Profit?
If I use your addon, would it become part of the gpl license?
Hey there - as my game is using v0.11 of rapier, I'm trying to create my own component_definitions
. As of 0.11, many of the larger structures have been broken down for easier usage within bevy's ECS. That includes components such as RigidBodyType
that are a numbered enum.
In the custom components file, I see a struct must be provided with fields. Is there any way currently to define enum components? Perhaps through a py file? (I'm thinking that it might be best to add all components needed for a rigidbody/collider at once, so maybe a py file can define that)
As the title says i am wondering if this project is dead. we're at bevy 0.8 now and the docs still say it only supports bevy 0.6.
i like the idea of this project since it allows you to use a suite of open source tools for game development.
Currently the makefile and tests are set up for linux, but we want to be able to export scenes from a windows computer as well. Adding windows export as a unit test will ensure that future change do not break windows compatibility
Hello, I'm not sure if you want this issue here or in https://github.com/sdfgeoff/blender_bevy_top_down_space_shooter , but I can load Level1.blend in Blender, and I can also load Level1.scn in the game, but when I run the export (make assets
) all of the material files are deleted, and Level1.scn is overwritten with a file that has exactly 131 entites, but each of them has an empty component array. I load the game, and, as expected, it's just a black window. I can restore the material .pngs and .scn files from git, but I can't generate assets from even the unmodified .blend files. I'm not sure how to debug Blender scripts, or I'd give more information. I can say that I've tried with both Blender 3.0 and Blender 3.1.
will this toolkit ever be updated to the latest bevy release? just wondering
Not all games use the rapier physics engine. It should be possible to build a game that doesn't compile-in rapier support.
See https://doc.rust-lang.org/cargo/reference/features.html#dependency-features
@sdfgeoff Hey man.
So I uninstalled the all addon and I installed the new addon.
What you put inside the JSON files depends on what components you have in your game.
Eg from the example above:
So I added this exact same script:
{
"name": "Engine",
"description": "Used to apply thrust to an object",
"id": "space_ship_engine",
"struct": "game::ship_parts::engine::Engine",
"fields": [
{
"field": "max_thrust_newtons",
"type": "f64",
"default": 10.0,
"description": "The max amount of force the engine can apply, measured in Newtons"
}
]
}
into a file called windmill.json
inside the folder component_definitions
. In the outside directory of component_definitions
I have a file called Demo.blend
. And I still can't see any components to add.
not too sure why this is happening?
Hey everyone,
Bevy got updated from 0.6.0 to 0.7.0 sometime a while ago. Bevy Rapier also got updated from 0.12.1 to 0.13.2
I tried migrating this project myself. The most notable changes are in rapier_physics.rs and some in blender_mesh.rs. Unfortunately, I couldn't make my project run afterward.
We should migrate the project so that at least it runs new versions of Bevy and Rapier.
This decision to export collections was originally made so that collections could be shared/linked across blend files and not have duplicate object trees exported. However, I think I'd rather the "least surprise" of exporting scenes.
Meshes are shared between blends anyway as the filename is saved as the mesh hash....
Because there are a non-trivial number of functions, and it is nominally "user facing" in as much as a developer adding classes may need to define their component using python.
This is on MacOS.
Very briefly I see the scene but after that the window turns black again.
Selecting something else then Materials.scn and then Materials.scn again does work. So maybe the Materials are not deleted probably or something like that?
BLENDER = /Applications/Blender.app/Contents/MacOS/Blender
Hey man.
So I am on Windows 10, I ONLY copied the blender_bevy_toolkit
(from your entire git project folder) inside C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons
In regards to Blender, it doesn't seem to quite pick up this extension. So I suppose I have to manually install it? If I go to addons and click on the Install
button, then if I navigate inside the extension's folder:
Which file am I installing this from?
In regards to cargo.toml
file when I added this:
[dependencies]
blender_bevy_toolkit = {path="C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\addons\blender_bevy_toolkit"}
it fails to pick it up. Now I know that it contains a bunch of py
scripts, however according to your instrunctions I am supposed to do this:
[dependencies]
blender_bevy_toolkit = {path="../blender_bevy_toolkit"}
I change the path
to match where the current path of blender_bevy_toolkit
exists.
Do you know how would I fix this mate?
For those cases where you are using custom shaders or a mesh should be used for collision geometry
for instance: When selecting ./scenes/Materials.scn the plane, number and cubes textures are only visible after a part of a second.
This would make a great DX especially in combination with Bevy's asset hot reloading!
Hey mate, this project seems pretty interesting, but I am curious to know is your project similar to the Armory3D game engine?
Hey there - because Bevy is a Y-up world, the export is 90 deg off. I was wondering if there was an option to choose Y as up in the export, or if the solution is to modify the game to just treat Z as up.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.