#Blenvy

1 messages · Page 2 of 1

sly fulcrum
#

In the case of the first one, if you’re talking about the registry file, I personally think it makes more sense to have a separate ron file. But that could just be my desire for easily debuggable things.

#

As for the second, I feel I’m not familiar enough with how the new system will work to make a judgement here

dawn shell
#

I don’t understand the second point. Could you explain what the options are? Is the issue how you store it on disk? Or in terms of how you organize the Rust structs?

#

For your first issue: what kind of shortcoming do you want to address by moving some data into external files?

ebon zealot
dawn shell
ebon zealot
dawn shell
#

Whatever the answer, if you use external files, please pretty-format them so that git can do nice diffs with them

ebon zealot
ebon zealot
#

Ok so hopefully the image can make things a bit clearer

ebon zealot
# ebon zealot Ok so hopefully the image can make things a bit clearer
  • Blueprints can be be made of multiple instances of other blueprints
  • Blueprints themselves are exported as gltf/glb files
  • These files are assets (You need to load them inside Bevy) that are automatically added to the assets list .
  • You can also "add" any other asset you want to your blueprints (I call them user asset), what you are adding is actually just paths to assets, and telling Blenvy "please load these assets together with my blueprint"
dawn shell
#

Ah, got it! So, what's the rationale behind moving these into own files instead of leaving them on the GLTF?

sly fulcrum
#

I think it will be easier on the end user to store data in the gltf, and have one file to load.

ebon zealot
dawn shell
#

Oooooh, the pre-loading is a good point, I see

#

That chart has very much convinced me that an external file is the way to go

ebon zealot
#

The issue can be summarised as such : there is currently (as far as I know), NO way to read just the gltf extras (for assets in this case) of a gltf file in Bevy so you need absurd pre-spawn, load, spawn complexity

dawn shell
#

Also nicer for refactoring. It's currently a pain to change stuff on Bevy's side and then not really being able to do a big CTRL-F on Blender's side

#

So I wouldn't consider it an additional dependency, really

ebon zealot
ebon zealot
ebon zealot
dawn shell
ebon zealot
#

Btw , waaay back I also thought about storing the actual components in an external text file beside the .blend file , as a single source of (text-based) truth...

dawn shell
ebon zealot
#

But before that, I need to make a decision on the internal vs external assets file

dawn shell
#

My vote goes to external 🙂

low glade
#

not sure how much my vote counts since I'm very much inexperienced, but to me an external human readable format is preferred, because it's much easier to debug issues than having to look inside the gltf. I think I would even prefer the component info being stored externally somehow.

ebon zealot
sly fulcrum
#

My thoughts on the issue:
to me the problem seems to be between complexity on the dev side, and complexity on the user side.

separate files means slightly more complexity on the users end, requiring the managing of multiple files per asset. this isnt exactly new though as we often have to manage models, textures, sounds ... adding another file onto that doesn't seem like too much of an ask but it is more likely in the code that you forget to load something.

combined gltf while it guarantees dependencies will be loaded correctly without the need for an extra dependency defining the dependencies ... It does present a problem for debugging. if you want human readable/editable you are forced into gltf, and there is no way to switch to glb with out changing every file reference.

loading While the gltf solution totally works, it feels just a little bit hacky to me, thats entirely subjective and not necessarily a bad thing, just my perspective. Do the assets need to be spawned or just loaded?

general thoughts i think the external file approach is the better options, primarily for the reasons listed in your chart. but also an external file allows us to more easily parse it, allowing others to create their own load order/pipeline in a way that gltf would make difficult.

ebon zealot
sly fulcrum
#

which ever option you go with, im super excited for the next update. you're bringing some seriously big things to the table

ebon zealot
#

A few things I had not considered hit me while trying to implement the external file option

  • having a file both be editable manually and auto generated by blender is ...meh and a shotgun:
    • what if the information is contradictory ?
    • also this means I have to parse ron files in Blender , which is not supported natively, so either having to add a ron parser, write my own, or switch to json, (meh)
    • what is the source of truth? what you do in the Blender ui or whatever you edit in text format outside of it ?
  • also purely subjectively, I am not a fan of all the additional files (could be my lack of sleep bringing out my grumpy side 😄 )
ebon zealot
dawn shell
dawn shell
dawn shell
ebon zealot
# dawn shell Can we place the files in an own folder? `assets/models/meta`?

yes I could, however in the next release each Blender project can specify its blueprints/levels paths already to avoid naming clashes (for example blueprintsLib1/Chair.glb, blueprintsLib2/Chair.glb), which is also the reason Blueprints now also use a path, and not just a name
The thing is, the Bevy side would need to get the information on where the metadata is stored, so I wanted to keep things simple and always store it next to the gltf file for simplicity

ebon zealot
dawn shell
ebon zealot
dawn shell
#

@ebon zealot I just gave a talk about Bevy at RustFest 2024 and highlighted the Blender workflow. Some people came to me specifically to tell me that they love the Blender workflow, so I wanted to pass that on 🙂

#

Some people said they couldn't figure out how to set it up properly because the examples were confusing

#

But those who managed to use it really love it 🙂

#

Some asked me if I knew about if there's plans for hot reloading and I passed on what you've been sharing here

ebon zealot
#

Btw I realised something : I can actually parse the gltf extras without spawning by using the gltf crate (& since it is already a dependency of Bevy's gltf crate, should be not too hard)

#

btw @dawn shell , as far as hot reloading goes, off the top of my head, since I now track the loading state of assets per blueprints/level , I normally just need to check for 'AssetEvent::Modified` & re-run the spawning process right ? (this is a simplified view , off the top of my tired head 😄 )

dawn shell
dawn shell
ebon zealot
dawn shell
#

In my case, I also needed to be a bit careful because the hot reloading should be triggered when the files we started the game with changed, but the user could in theory also add their own in-memory assets at runtime, which would also trigger AssetEvent::Modified

#

So I need to check whether this asset that just changed is actually one that we started the game with, otherwise my state gets a bit weird

#

dunno if that's relevant for the Blender workflow, but I thought you should be aware of that

#

BTW, I want to test out the newest Blender workflow today. Which branch should I look at? main? Is there anything special I need to keep in mind when setting up a new project?

ebon zealot
dawn shell
#

Hehe, alright 😄

#

Just ping me when it's ready for testing 🙂

ebon zealot
ebon zealot
#

While cleaning up & upgrading the scene components, I added support to get the ToneMapping, exposure & gamma from Blender to Bevy, not perfect but getting there !

#

(don't mind the debug overlay in Bevy)

dawn shell
ebon zealot
#

A bit of a status update:

  • managed to get pre-loading of assets working using the gltf crate, was rather simple to do
  • it makes for a more coherent and less brain-breaking logical flow
  • you can track the loading progress of a level (or any blueprint instance really)
  • still unsure about this solution ( I am trying out both this and the external asset files one, but that one requires more significant changes)
#

The flow goes like this: (simplified obviously !!)

  • spawn your level
        BlueprintName("World".into()),
        BlueprintPath("levels/World.glb".into()), // etc
))```
- bevy picks up the added "BlueprintPath" component 
   * read the list of assets in the gltf file
  * add both the file of `BlueprintPath` (in this case *levels/World.glb*) and the list of all its assets & sub assets to the list of assets to load for the entity (untyped handles at this point)
- a system checks for the **loading state** of all assets 
   *  updates the progress & "loaded" flag
  * when all assets of a given entity/blueprint instance are done, it adds a `BlueprintAssetsLoaded` component
- another system checks for that entities that have `Added<BlueprintAssetsLoaded>` (might switch to events, but system piping might also be a solution, although not sure about the coupling)
  * this means all the assets are ready, so we inject all data from the blueprint , do some post processing, and its done
- IF the world/ blueprint contains entities that are themselves BlueprintInstances (so have `BlueprintPath` components), the process starts again for those child entities, & so and so on until everything has been spawned
#

Honestly it works but every step raises more questions

  • what if you want to override what assets to load for a given Blueprint instance ? (not really supported right now, and it makes things even more complicated)
  • when do you consider a Blueprint instance to be "ready" ? when all its children & their children have loaded their assets, and have spawned ? (this would require way for an entity to know of all its hierarchy in advance), does this even make sense ? (I can think of a few use cases at the very least)
sly fulcrum
#

this is a response to a conversation we had last week re instancing in gltf files:

sorry it took me a hot minute to check, but blenders standard gltf exporter does do proper instancing of objects. I think the issue is caused by the same mechanism that creates the strange naming changes (ie cube.001 gets exported as cube.00x when using the workflow plugin). I'm not certain but it seems like part of how you manage the export involves creating a duplicate of the scene, exporting that, and deleting the duplicate. I'm pretty sure this duplicating is whats causing the meshes to become "de-instanced"

ebon zealot
# sly fulcrum this is a response to a conversation we had last week re instancing in gltf file...

Thanks for checking that out !
Is that enabled by default in V4.0 ? Because if it is not , the current version of Blenvy is not using it.
Could very well be that the duplicating process is causing an issue, no idea at this stage to be honest 😄 The duplication process is much more streamlined in the next release, but still works on the same principle (no way around it sadly, because of blender's limitations), but will keep this on my radar 🙂

sly fulcrum
ebon zealot
# sly fulcrum Yes that’s the 4.0 exporter with default settings

Ok, thanks ! I'll be honest, I'll likely fix this (if possible) either after the next release, or before it, if I still have the energy, I am really getting exhausted by my endless TODO list for the release 😄
In part because I feel like some of the stuff I am implementing for assets is overlapping some of the work done on bevy scenes/ the bsn format , but I am lacking clarity on what is already possible or not 😦

sly fulcrum
ebon zealot
# sly fulcrum I get waiting a release or two on this (I had no idea about the bsn format, I ca...

Yes, you are spot on, it is starting to look a lot like feature creep (and burn out :D) and I just need to release things (mostly as 99% of things have been working well for a while now), the last additional thing I want to look into (and not a single additional feature more) is hot reloading (since I am already dealing with this mess of assets , might as well use it for hot reload too )

sly fulcrum
#

Hot reloading would be absolutely crazy!

dawn shell
#

In case you don't get through that gigantic feature list: is it possible to do a release that is just the Bevy 0.13 version of the plugins updated to 0.14? This would be nice in general for being able to upgrade my projects bit-by-bit

dawn shell
#

Uff, I think I just hit a weird edge case. I'm using commands.entity(foo).set_parent_in_place(bar); to make foo a child of bar. Both foo and bar are blueprints that have been placed side-by-side in the same world. I'm getting this crash because of that.

#

(Don't think it's relevant, but foo is using the <name>_components feature as well)

dawn shell
ebon zealot
dawn shell
ebon zealot
dawn shell
#

I just removed SpawnHere to avoid being picked up by the spawned_blueprint_post_process system

#

Because that one is indirectly causing the crash

dawn shell
dawn shell
#

Let me try to do the opposite of removing SpawnHere from the hierarchy and instead wait with my system until SpawnHere gets removed by the blueprint systems

#

Update: yeah, that works. Transform is also correct now

#

I'm now doing the following:

for entity in [foo, bar]
    .into_iter()
    .chain(q_children.iter_descendants(foo))
    .chain(q_children.iter_descendants(bar))
{
    if q_spawn_here.contains(entity) {
        return;
    }
}
commands.entity(foo).set_parent_in_place(bar);
#

Is there a nicer way to wait for this? I thought .after(GltfBlueprintsSet::AfterSpawn) would be enough, but apparently not

dawn shell
dawn shell
dawn shell
#

@ebon zealot it seems weird to me that I need to do this after GltfBlueprintsSet::AfterSpawn, but I'm working around my actual issue anyways. I've got the following setup right now:

#

This is in my main world scene. Cat and Cat Quest Tree are both scene instances / blueprints of Cat and Palm Tree, respectively

#

Is there a way to make Cat a child of Cat Quest Tree? I tried doing it how I would normally in Blender, like this:

#

but the resulting objects in Bevy end up being siblings:

#

I know that I could make them both children of an empty, but:

  • Doing so is broken on the current release. I think I remember you fixed this on main
  • That is not quite the right hierarchy I need anyway
ebon zealot
#

Hi @dawn shell ! Thanks for the investigation I'll try to reproduce on my end & add tests either later tonight or tomorrow 🙂
Really weird , but hey, good find !!

dawn shell
ebon zealot
dawn shell
ebon zealot
ebon zealot
sly fulcrum
#

THAT IS AMAZING!!!!

ebon zealot
dawn shell
#

I assume adding a bevy component also hot-reloads?

low glade
#

that's amazing

#

and for how it's implemented, I would have no idea how to do it any other way without introducing way too much complexity, so I'd say that's fine?

ebon zealot
ebon zealot
# dawn shell Do you mean the one about `SpawnHere`, or the one about the parenting in Blender...

Btw Jan, I looked a bit closer at the issues, and I think I have an idea where it comes from (also fundamentally, I think sets such as GltfBlueprintsSet::AfterSpawn are not enough, since we are operating across multiple entities).
I still would love to avoid the two tiered spawn + post process , though I am not sure how. (If you have ideas, I am all ears).
In the meantime I will set up some additional tests for the "Blueprint Instance as a child of another blueprint instance" to fix this.

dawn shell
ebon zealot
# dawn shell Have you looked into 0.14 component lifecycle hooks? Thanks for looking into th...

I had a superficial look at lifecycle hooks & observers , but nothing in depth. Not sure yet how/when to use them :mostly in this specific case of "post processing", as it boils down to being able to change hierarchy & components only once a blueprint has been completely spawned

  • For the blueprint-blupeint child issue, still investigating , I do not think the use of _components hase any impact on it.
  • I am "ripping" apart the spawning process anyway to have a clearer vision on the various aspects so your bug fits right in 😄
gusty fiber
gusty fiber
#

Any hope for this weekend when we can “help” to find some bugs?

dawn shell
#

I mean, you can always just checkout the working branch

sly fulcrum
#

is that the bevy_main branch?

ebon zealot
# gusty fiber Can we test? This is becoming excruciating to wait 😅

Sorry to keep you waiting 😄 I am making steady progress but It still not quite ready for testing: I will be honest, I tend to be overwhelmed easilly , so I am being a bit selfish and wait to give the green light for testing because right now I am still changing a ton of things, breaking things, and feedback at this stage would be too much and not really help. I hope you understand, and I do not mean to be a mean tease

ebon zealot
# sly fulcrum is that the bevy_main branch?

Normally yes, but in this specific case, as the re-structure was born out of another set of fixes it is the animation-fixes-and-improvements branch (very ironically, the changes with the animation graph in Bevy 0.14 broke all the animation logic)

gusty fiber
dawn shell
dawn shell
#

Little edge-case I found: Vec3 expects to be deserialized from (f32, f32, f32), but Blenvy doesn't know about this quirk and tries to deserialize it from a regular struct, resulting in a panic.
This means that a component like struct Foo { dir: Vec3 } can currently not be used from the Blender plugin

#

Don't know if you want to hard-code this case, since Vec3 is a very common type. Should I open an issue?

ebon zealot
ebon zealot
#

Very short status update: completely swamped with IRL things this week, but still managed to make some progress on the complete restructuring of the Blueprint spawning, which makes things WAY more reliable (a blueprint instance is only ready when all of its sub blueprints are also ready ie, assets loaded, AND blueprint scenes spawned) .

  • Even if it adds a bit of internal complexity, it makes the Blueprints process more deterministic. (ie you will always know when you can actually use a Blueprint instance withouth worrying that some things are not done processing)
  • It also fixes issues with blueprint instances as children of blueprint instances as in your case @dawn shell
  • Still have some issues with it that I need to sort out with deeper nesting levels , but the logic is sound, and the code is getting cleaner.
#

The logic now boils down to this:

BlueprintSpawning
    - Blueprint Load Assets
    - Blueprint Assets Ready: spawn Blueprint's scene
    - Blueprint Scene Ready (SceneInstance component is present):
        - get list of sub Blueprints if any, inject sub blueprints spawn tracker
    - Blueprint copy components to original entity, remove useless nodes
    - Blueprint post process
        - generate aabb (need full hierarchy in its final form)
        - inject materials from library if needed
    - Blueprint Ready 
        - bubble information up to parent blueprint instance
        - if all sub_blueprints are ready => Parent blueprint Instance is ready ```
dawn shell
dawn shell
dawn shell
ebon zealot
ebon zealot
dawn shell
dawn shell
#

Changed it to this for now:

#[derive(Debug, Clone, Copy, PartialEq, Reflect, Component, Serialize, Deserialize)]
#[reflect(Component, Serialize, Deserialize)]
/// Uses (x, y, z) instead of `Vec3` because `Vec3` expects to be deserialized as (x, y, z)
enum RedirectPropHitImpulse {
    Local((f32, f32, f32)),
}
ebon zealot
ebon zealot
#

I sadly also found a Blender (or at least Blender's gltf exporter) bug: I was having weird issues with blueprint instances inside blueprint instances (the issue you reported @dawn shell ), with levels of nesting > 2..
I ripped everything apart on the Bevy side, and the issue did not stem from there, so I tried exporting gltf files without the workflow (standard export) and those nested cases are not even exported correctly at all , and when toggling the gltf exporter's "export full collection hierarchy" that is buggy as well :

  • first screenshot is the blender scene that I exported with that option
  • second screenshot (blueish tint) is the exported gltf imported back into Blender: the "Cone" object is not correct exported as a child of the "Test_Collection" collection instance
#

Sigh ... it REALLY does not help to diagnose & fix issues with the workflow when hitting issues with Blender

dawn shell
dawn shell
dawn shell
dawn shell
pulsar whale
#

is there a branch for the blueprints lib pointing to 0.14?

ebon zealot
ebon zealot
ebon zealot
pulsar whale
#

Now that i think of it, the whole workflow, since as I understand it the bevy_gltf_components` is wrapped by blueprints

ebon zealot
#

What could cause transforms to be correct , hierarchy to be correct but entities to still be in the wrong place ?

compact wing
#

I'd like to add support for bevy_gltf_blueprints to an editor prototype, so I am also interested in a 0.14 branch

ebon zealot
ebon zealot
#

So , good news everyone ! I managed to get the basics of animation support working today (amongst MANY other things).
This was one of the last major blockers for the upcoming release ! So it is really getting ever closer to release (or to be ready for testing at least 😄 )

  • support for animations using Bevy's new animation graph & AnimationTransitions api : in practice it all happens under the hood, so the user facing api when using it for blueprints is barely different from the previous version, but it gets out of your way if you want to use more complex features
  • built in support for level/ scene animations ! Ie if for example, animating a group of spaceships (all blueprint instances , with animated reactors: aka Blueprintanimations) , flying in your level (aka the flying animation of the group is a SceneAnimation)
  • I managed to track down and fix the nasty positioning/ transforms issue that impacted nested blueprints & empties (thanks Blender for some weird as hell internals once again)
  • You now have the option to hide Blueprints during their spawn process until they are ready, this is very practical for blueprints which contain lights for example (you might have noticed an unpleasant "flashing" effect in previous versions)
  • Fixed up & improved the spawning logic some more
  • Blueprint Instances' & their children now have a BlueprintDisabled component during the spawn process until they are ready, so you can easily filter them out from your queries (highly advisable !)
  • a ton more minor improvements

Edit : the first video showcases SceneAnimations and the second one a mix of blueprint level & instance level animations by using tag components,
And yes, you can mix & match per blueprint & per level/scene animations ! (thanks to Bevy 0.14's support for multiple AnimationPlayers)
@queen trellis this took ages sorry , but it is around the corner 😉

#

What is next:

  • fixing of a critical bug dealing with how instance components override blueprint components
  • fixing some issues with how hot reload is handled both on the Blender & Bevy side
  • double checking some potential non obvious issues in the Blender side
  • cleanup & more cleanup and some simplification for the Bevy side ! (although I already started on this)
  • documentation
  • examples overhaul (wip)
  • minor QOL improvements
  • release preparation (The dual release ie basic update to the existing crates + rebranding to Bevy is giving me headaches)
fallow yacht
#

Huge 🤯 Thanks for all the hard work!

compact wing
#

there is currently a client and a server. the server would be the game being developed + remote plugin. I want to be able to load blueprints using the client UI and have them appear in the server window and be able to be arranged and saved as scenes

glass abyss
ebon zealot
#

Another status update !

  • fixed the a critical bug dealing with how instance components override blueprint components
  • significantly improved how hot reload is works both on the Blender & Bevy side:
    • tracks which blueprint instances are using which asset, to avoid useless & costly loops
    • detects & does not attempt to respawn entities whose parents / ascendants also need respawning
    • batches / regroups changes to assets (happens if you change gltf settings & blender re-exports all blueprints) to avoid chaotic re-spawning all over the place
    • better tracking of parent / child blueprints, so if you change a blueprint in Blender it only impacts the direct instances & their parents
  • a whole lotta minor bugifxes !
  • Also , bonus video showcasing a nested blueprint instance being hot-reloaded: as you can see the only thing that "flashes" (de/respawn) is the instance & its parent, if the whole level was hot reloaded you would see a short "black" screen as the camera would also get respawned
sly fulcrum
#

Holy cow!!! That’s amazing, I’m so excited to work with it! Hot reload is going to completely change my workflow, being able to model things and have an immediate perspective of what that looks like in game is very cool and I can’t wait to see what processes that gives rise to/what things it makes possible

#

The first thing I’m doing is getting that working with physics, I want to be able to run around my levels in first person

round cove
#

@ebon zealot do you think blenvy will see a release before the game jam?

ebon zealot
round cove
#

Awesome, looking forward to getting my hands on it 🎉

ebon zealot
glass abyss
glass abyss
#

i updated my game to use the new blenvy crate but how can i use the new single blender addon? in the tools/blenvy/add_ons directory theres still the two addons

#

okay i figured it out, i just had to clone the repo and execute the internal_generate_example_gltf_files.py file with python

dawn shell
glass abyss
ebon zealot
#

Heeey, it is not ready yet 😄
Jokes aside, cleaner (albeit alpha) release for testing is out today, as well as a "barebones" bump of the old crates to v0.14 so that people who do not want/ cannot update to Blenvy , have the option

glass abyss
#

i'm getting a panic from this

let scene_extras = scene.extras().clone().unwrap();
``` in blenvy\src\blueprints\spawn_from_blueprints.rs:159:55
#

oh i know why

#

nevermind i dont know why

#
2024-07-18T10:57:59.563348Z  INFO blenvy::blueprints::spawn_from_blueprints: BLUEPRINT: to spawn detected: "ak47" path:"blueprints/ak47.glb"
thread 'Compute Task Pool (2)' panicked at C:\Users\bugoLMAO\.cargo\git\checkouts\blender_bevy_components_workflow-51132dc31e81c4ca\3a8844b\crates\blenvy\src\blueprints\spawn_from_blueprints.rs:159:55:     
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `blenvy::blueprints::spawn_from_blueprints::blueprints_prepare_spawn`!
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
error: process didn't exit successfully: `target\debug\cs_went.exe` (exit code: 101)

this iss the full error

#

here's how i spawn the ak47, seems like thats where the error is from

.with_children(|p| {
                    p.spawn((
                        BlueprintInfo::from_path("blueprints/ak47.glb"),
                        SpawnBlueprint,
                        TransformBundle::from_transform(Transform::from_xyz(0.5, -0.3, -1.0)),
                        AK47,
                    ));
                });
#

and its not just the ak's fault, once i removed it now it causes the error on "character.glb"

ebon zealot
#

@glass abyss & @dawn shell I do mean this part though, please just a tiny bit more patience, it will be in an alpha state first, so you will have plenty of time to find bugs 😄

glass abyss
#

ok i finally loaded the character and ak but now the world isnt loading, i'm pretty sure its my fault and not blenvy's though, since i dont have time right now i will do this later and well if there's a bug in blenvy, i'll let you know

ebon zealot
#

I'll add a note in the README somewhere , that you must re-export /save your blend files otherwise the metadata that gets insert in Blenvy will not be present, and break things

glass abyss
#

Maybe it's that I use BlueprintInfo

#

Instead of the old way

ebon zealot
#

Ok, this is very odd, I am trying to update the old crates to v0.14 and running into an issue (not aware of any changes in this area in v0.14)

.add_systems(
                Update,
                (
                    camera_replace_proxies.after(GltfBlueprintsSet::AfterSpawn),
                    camera_track,
                ),
            )
sly fulcrum
#

Can you implement that trait for GltfBlueprintsSet?

ebon zealot
reef quiver
#

I seem to be getting linking errors whenever I include the latest GitHub release into my project. But the error messages say it has something to do with wgpu, and the dep tree doesn't show wgpu as coming from here.

#

Any ideas?

sly fulcrum
#

Can you show want the basic error looks like and not the full trace? Full trace is good to have but I just want to know the basics of what we’re looking at

reef quiver
#

That's just it. I'm not using a full trace.

sly fulcrum
#

😬

#

Dang ok

reef quiver
#

Want my Cargo.toml?

sly fulcrum
#

Yeah, also Are you trying to build to wgpu?

reef quiver
#

no

#

Note, it only seems to happen when I uncomment bevy_gltf_components

round cove
#

you're mixing bevy versions, and all of those * versions are suspect tbh.

sly fulcrum
#

What makes you think this problem is coming from the components workflow

#

^^^ actually what they said is best place to start

round cove
reef quiver
#

I have bevy version 0.14 specified, and the "*" have been mostly recently added as I try and debug the issue. I've been ensuring each crate that I don't uncomment is 0.14. Also the latest commit on the github does say it's using bevy 0.14.

round cove
#

the latest commit on github does, but you said you were using the latest github release, which doesn't

reef quiver
#

does the "git" option only use the latest release, and not the latest commit?

round cove
reef quiver
#

Huh, I might be getting it confused. I thought the 0.14 version got pushed to the main branch already.

#

gimmie a sec to test something

round cove
reef quiver
#

Yeah, it was the branch. I must have got mixed up somewhere about the status.

#

thanks

ebon zealot
#

Soooo, it is all much more annoying than I thought:

  • "old" individual crates etc are ready for V0.14 (not yet on main or on crates.io , see why below)
  • the assets however are not which causes some of the examples to crash
  • Would anybody be mad at me if I do not update all assets as this is only a stop gap until Blenvy alpha is released ? It is tedious (god I love the relative simplicity of Blenvy for pretty much everything)
sly fulcrum
#

I think if you’re doing a major architectural change there’s no point in updating the examples for an architecture that won’t be used

ebon zealot
#
  • rotten cherry on top: Blender 4.2 completely breaks how add-on installation works, so while I was able to test Blenvy on it thanks to dev tools, I would need to overhaul some parts of the old add-ons to work on Blender 4.2 😢
round cove
ebon zealot
#

I would honestly rather spend the time & energy on Blenvy, as this is yet another thing I have to juggle with

round cove
#

solo maintenance is no joke, and I'm definitely not about to tell you you have to do extra work 😆

ebon zealot
#

put it simply, rather spend the time having one working new add-on /extension rather than juggling with multiple versions of multiple tools in multiple languages with incompatibilities 😄

sly fulcrum
#

Way I see it is the old workflow is becoming legacy. You’re making major changes to the work flow that just aren’t compatible with the old way. I think that’s ultimately going to be a good thing. And I don’t think it makes sense to maintain an old version when you aren’t supporting like 100,000 devs who have projects they’ve been working on for years.

ebon zealot
ebon zealot
#

Btw, for anybody trying out Blenvy in Blender 4.2 in the next few days (NO , the alpha is not out yet :D), so you do not get as confused as I did : you can just drag & drop the add-on zip file onto blender to install it

round cove
#

oh that's not so bad at all

sly fulcrum
#

That’s wild, I like it

ebon zealot
#

As always with Blender, was well hidden 3 levels down in the documentation 😄

ebon zealot
#

Would somebody kindly be willing to take a quick look at the PR for last release of the "old" crates (https://github.com/kaosat-dev/Blender_bevy_components_workflow/pull/195) to see If I haven't forgotten something / made a major mistake somewhere (Mostly the README / cargo files) befor I publish to crates.io ? exhausted , can't think straight, so mistakes sneak in 😉

GitHub

Just a compatibility update for v0.14 , with no new features, before switching to Blenvy

round cove
#

I saw one commented out piece of code that looked like it could go either way as I was scanning down

#

readme links to blenvy are dead, but I assume you know that and its because the repo is private

ebon zealot
ebon zealot
ebon zealot
#

So some good news !

  • the Bevy 0.14 versions of all legacy crates have been released as well as a patch for the legacy Blender add-ons !
  • repo has been renamed to Blenvy
  • release of Blenvy alpha is tomorrow, after some docs & cleanup work 🙂
sly fulcrum
#

HYPE HYPE HYPE!!! I know what I’m doing tomorrow after work XD

ebon zealot
#

This part in particular might be divisive, as Blenvy is more opionated than the previous tooling : the various folders !
By default, it expects you to separate your art/sources (blendfiles), from your assets (what you actually deliver with Bevy)

sly fulcrum
# ebon zealot I honestly hope it will be more of a pleasant experience than a bug ridden night...

I was really happy with the 0.13 workflow, and I’m really excited to see what the new alpha has in store. Despite the likely bugs I’m still really hyped to get running with the new workflow. I think you need to give yourself credit for all this amazing work so far. I am more interested in this project than any other bevy project, and im sure im not the only one. You deserve a little celebration after the release!

dawn shell
round cove
#

so no problem here 😆

glass abyss
glass abyss
#

btw i figured out my issue from yesterday, the scene wasn't spawning because i didn't use SpawnBlueprint component 🤦‍♂️

glass abyss
ebon zealot
# glass abyss xD

@glass abyss , honestly, sorry to be a bit harsh, but I already said a few times that Blenvy is NOT released ! This is honnestly not helping

glass abyss
#

and i don't mind if there's any bugs either, i prefer to have the new blenvy with bugs than not have it at all

dawn shell
dawn shell
#

(Although mine probably contain more swear words 😄)

ebon zealot
# glass abyss exactly

Sorry if I overreacted , I usually like to release things in a clean state, and not have this mess of debug messages in there

ebon zealot
glass abyss
#

its alright :D

ebon zealot
#

I am doing my best to get the alpha out before the Jam, and I am stressed out like mad (I am stressed out like mad for IRL stuff too, so I just add to the pile :D)

ebon zealot
dawn shell
# ebon zealot I am doing my best to get the alpha out before the Jam, and I am stressed out li...

I have already found my peace with the fact that I won’t be able to use Blenvy for the jam. It’s probably not worth it to try to get an alpha out in time since a jam is so time constrained that the tools involved should be familiar to you and reliable. Since the rework, by definition no one is familiar with it yet and an alpha is probably not bug-free enough to not cause significant time loss.
My advice to you is to ignore the jam timeline for now

simple arrow
#

Blenvy

ebon zealot
#

Since I need to work on the docs & disliked scrolling to find the settings for common/components/export, they are now tabbed as well !

simple arrow
#

Very pleased about the new name: much more memorable 🙂

ebon zealot
ebon zealot
round cove
pulsar whale
#

Tossing my encouragement onto the pile, you're project is great and offers a wonderful pipeline to bevy devs, def get some rest and people will test/use the crate when it's ready!

dawn shell
#

@ebon zealot would GLTF / Blender allow you to place a component on a bone?

ebon zealot
dawn shell
#

I think the spec just targets generic nodes as bones, and these can have extras, so that should be okay from that side

#

The reason I ask is that often you'll want to designate special attachment bones in your armature, e.g. an attachment bone for the camera, another for where a weapon goes, etc.

#

Currently, I just give these a special name and then search them on spawn in the hierarchy to add my tag component, but it would of course be nicer to have the component directly there

#

Not a blocker or anything 🙂

ebon zealot
dawn shell
#

I honestly didn't expect Blender to support that 😅

ebon zealot
#

I noticed after doing the PR for the additional Gltf***Extras that I was not complete in my additions, so this might need another PR at the Bevy level

dawn shell
#

Should I open an issue for that?

#

Or no need?

ebon zealot
ebon zealot
# dawn shell Should I open an issue for that?

I think we should test it first: I don't have time right now, but a very basic Bevy project loading a gltf with custom properties on a bone should tell us if we indeed need yet another specific gltf extra

#

(ie , they might already be exported as the basic / node level gltf extras if we are lucky)

dawn shell
#

I can check it next week when I'm testing Blenvy anyways 👍

compact wing
#

is there an official Blenvy team for the jam?

dawn shell
compact wing
#

I... volunteer as tribute?

#

(all my game jam participation thus far has been 100% experimental)

ebon zealot
#

Sooo, still working on docs, cleanups & co, and while trying out some "from scratch" projects using Blenvy, I think I might have under-evaluated the state of the project.
Yes, there are some bugs for some rare cases, and there are a few missing features, things are working much better than I feared

#

Also: would anybody have an issue if automatic aabb calculation for blueprint instances would always be turned on ?
Aabbs have always been cached anyway, and worse case, I could always pre-compute it on the Blender side.
Because if I remove that setting, there would be no settings left to set 😄

#

Which would mean:

  • on the Blender side : you would only need to tell Blenvy what your level & library scenes are (everything else has defaults that are good enough that I do not touch them most of the time)
  • on the Bevy side no settings at all , just add the plugin, spawn your levels & done !
sly fulcrum
#

Unfortunately the only input I can give is that I haven’t needed to work with aabb’s before. Sorry that’s not helpful

ebon zealot
dawn shell
dawn shell
ebon zealot
dawn shell
ebon zealot
dawn shell
ebon zealot
sly fulcrum
#

What’s avian ?

dawn shell
dawn shell
#

@ebon zealot mind uploading a zip of the current Blenvy addon?

#

Otherwise I can build it myself, no problem

#

And yes, I know there may be bugs, I'm prepared 😉

ebon zealot
dawn shell
ebon zealot
dawn shell
#

Is there any issue I'm likely to encounter that I should not report because it's already known?

#

Or something like "don't report anything related to hierarchies, I'm fixing that code right now"

ebon zealot
ebon zealot
dawn shell
dawn shell
ebon zealot
#

Oh and do not use it on an existing / important blend file yet

ebon zealot
dawn shell
round cove
#

fresh blends only ™️

ebon zealot
#

ahh forgot two :

  • since I cannot disable physics on currently spawning blueprint instances, there might be some weirdness
  • hot reloading assets other than gltf is not yet done
dawn shell
dawn shell
#

Oh, I remember

#

No RigidbodyDisabled exists

ebon zealot
ebon zealot
dawn shell
#

I'm doing the jam with him, so if he runs into enough problems with it, he will have an incentive to just implement it right away, hehe

#

@ebon zealot do you want feedback on the docs already or would that just stress you out?

ebon zealot
dawn shell
#

But yeah, I'll wait then 👍

ebon zealot
#

I'll ping you once I pushed & put the zip up

dawn shell
#

Preparing my new Blender file in the meantime. Naming things _components is no longer needed, right?

ebon zealot
#

changes pushed, zip uploaded, if you run into issues with even a basic setup, please let me know

round cove
#

perfect opportunity to stop trying to figure out tnua animations and try something else 😆

dawn shell
#

Can't activate the addon unfortunately :/

ebon zealot
dawn shell
#

Do I need to use 4.1?

round cove
#

seems to be working for me in 4.0

ebon zealot
round cove
dawn shell
dawn shell
ebon zealot
ebon zealot
# dawn shell I have time 🙂

ok , I think I know a workaround: can you try deleting the blender_manifest.toml file from your zip file & try to install it again ?

dawn shell
#

seems to work!

#

Now I've got two different blenvies 😄

#

but yay, the UI is there!

ebon zealot
#

I updated the zip file in the pre-release to remove the manifest, but oh boy, that means some of the weird (and unclear) requirements for the new extensions (specifically "only relative imports", I suspect), might be breaking things

ebon zealot
dawn shell
round cove
#

some ui missing in 4.0 I think. gonna upgrade to 4.2

#

unless I've done something wrong which is very possible

ebon zealot
dawn shell
#
thread 'main' panicked at C:\Users\conta\.cargo\git\checkouts\blenvy-b36e3bfafcd31d12\09d1218\crates\blenvy\src\components\ronstring_to_reflect_component.rs:76:17:
failed to deserialize component BlueprintInfo with value: String("(name: \"ColliderCube\", path: \"blueprints\\ColliderCube.glb\")")
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/5affbb17153bc69a9d5d8d2faa4e399a014a211e/library\std\src\panicking.rs:665
   1: core::panicking::panic_fmt
             at /rustc/5affbb17153bc69a9d5d8d2faa4e399a014a211e/library\core\src\panicking.rs:74
   2: blenvy::components::ronstring_to_reflect_component::ronstring_to_reflect_component
             at C:\Users\conta\.cargo\git\checkouts\blenvy-b36e3bfafcd31d12\09d1218\crates\blenvy\src\components\ronstring_to_reflect_component.rs:26
   3: blenvy::components::process_gltfs::add_components_from_gltf_extras
             at C:\Users\conta\.cargo\git\checkouts\blenvy-b36e3bfafcd31d12\09d1218\crates\blenvy\src\components\process_gltfs.rs:78
   4: core::ops::function::FnMut::call_mut
             at /rustc/5affbb17153bc69a9d5d8d2faa4e399a014a211e\library\core\src\ops\function.rs:166
   5: core::ops::function::impls::impl$3::call_mut
             at /rustc/5affbb17153bc69a9d5d8d2faa4e399a014a211e\library\core\src\ops\function.rs:294
   6: bevy_ecs::system::exclusive_function_system::impl$2::run::call_inner
             at C:\Users\conta\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.14.0\src\system\exclusive_function_system.rs:218
   7: bevy_ecs::system::exclusive_function_system::impl$2::run
             at C:\Users\conta\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.14.0\src\system\exclusive_function_system.rs:221
   8: bevy_ecs::system::exclusive_function_system::impl$1::run::closure$0
             at C:\Users\conta\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.14.0\src\system\exclusive_function_system.rs:111
   9: bevy_ecs::world::World::last_change_tick_scope
             at C:\Users\conta\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.14.0\src\world\mod.rs:2215
  10: bevy_ecs::system::exclusive_function_system::impl$1::run<void (*)(),void (*)(ref_mut$<bevy_ecs::world::World>)>
             at C:\Users\conta\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.14.0\src\system\exclusive_function_system.rs:103
  11: core::hint::black_box
             at /rustc/5affbb17153bc69a9d5d8d2faa4e399a014a211e\library\core\src\hint.rs:389
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Encountered a panic in system `blenvy::components::process_gltfs::add_components_from_gltf_extras`!
2024-07-21T00:23:05.235592Z  INFO blenvy::blueprints::spawn_from_blueprints: Done spawning blueprint scene for entity named Some("World") (track root: None)
2024-07-21T00:23:05.236528Z  INFO blenvy::blueprints::spawn_from_blueprints: Cleaning up spawned scene Some("World")
2024-07-21T00:23:05.237802Z  INFO blenvy::blueprints::aabb: generating aabb for "World"
2024-07-21T00:23:05.238021Z  INFO blenvy::blueprints::spawn_from_blueprints: Finalizing blueprint instance Some("World")
Encountered a panic in system `bevy_app::main_schedule::Main::run_main`!
error: process didn't exit successfully: `target\debug\bike-game.exe` (exit code: 101)
#

Is that something known?

#

ColliderCube is just an empty

dawn shell
ebon zealot
#

Just tried the same case with a blueprint that only contains an empty, but did not get any issues

#

oooooh dang

#

I see you are using windows

#

could it be a path issue ?

dawn shell
ebon zealot
dawn shell
#

I'll try again when I'm done compiling. Added avian3d to my dependencies and now I get to recompile a bunch.

ebon zealot
#

Ok i'm off for tonight but just to be sure:

  • how do you spawn your blueprint instance ? Dynamic or part of of a world ?
  • does spawning your level without that specifc blueprint instance work ?
dawn shell
#

good night, I'll report what I find later 👍

round cove
#

have a good night! thanks for the prelease 🙂

dawn shell
ebon zealot
ebon zealot
dawn shell
round cove
dawn shell
dawn shell
#
2024-07-21T01:28:55.532374Z ERROR bevy_asset::server: Failed to load asset 'materials\bike_game_materials.glb' with asset loader 'bevy_gltf::loader::GltfLoader': invalid glTF file: missing field `nodes` at line 1 column 122
round cove
#

gltf looks like this

{
  "asset": {
    "generator": "Khronos glTF Blender I/O v4.2.57",
    "version": "2.0"
  },
  "scene": 0,
  "scenes": [
    {
      "name": "__materials_scene"
    }
  ]
}
sly fulcrum
round cove
sly fulcrum
round cove
#

I don't believe it is supposed to have nodes, because its only for material references or something like that

#

the python script looks like it might generate fake cubes that should live in that file

sly fulcrum
#

If you’re expecting an empty file this is the gltf you’re expecting. If you’re expecting material data you expect to see at least a material key. Not sure on the spec but gltf might also require a mesh key and node key which would be the reason for the “fake cubes”

round cove
#

I think you think that I have an empty scene I'm trying to export. I do not

#

this is a fake glb file created by blenvy to house material data

sly fulcrum
#

That’s was my question

ebon zealot
#

That is a bug 🙂 When there are no materials it should not export the materials file . (For coherence I hoped empty gltf files are valid but that is not the case)

round cove
#

🙂

#

I have the log file from the save if it helps

round cove
#

there's an error at the end but I'm not sure its relevant yet

#

oh I think that's just swapping the names for the export, not relevant

ebon zealot
round cove
#

oh that's interesting historical info

ebon zealot
round cove
#

oh it happens with materials too

ebon zealot
round cove
#

I originally had a checkerboard texture on a material for a plane in the level and was seeing the issue

#

I'll reconfirm

#

yeah plane still has a material actually

ebon zealot
round cove
#

I think that shows all the info. Scene is a level, there's a material on the Plane. This is Scene in the tree

round cove
#

I think the cube never gets added for some reason in the python make_cube. I tried using the function by itself in the scripting tab. I got as far as finding this function which successfully made a cube, but I don't know how to recover the reference to it that make_cube returns.

bpy.ops.mesh.primitive_cube_add(location=([0,0,0]))
#

heading to bed for the night though. 👋

ebon zealot
ebon zealot
dawn shell
ebon zealot
#

Also I wonder if switching the path field in the blueprintInfo to a pathbuf might allow to solve this on the Bevy side (my brain Is mush, so I might be off)

ebon zealot
#

@dawn shell I am able to reproduce the issue if I force the paths to be windows-like , so it is a problem with windows paths + double backslashes

dawn shell
#

Or how the Bevy side tries to read them?

#

Asking because I can try patching it myself and then submit a PR

dawn shell
#

Update: yeah, running this from Linux reveals that the GLBs contain a mix of / and \

ebon zealot
#

No access to the PC right now , will try to solve this evening. But if you have time to take a stab at it @dawn shell please do 👍

sly fulcrum
#

Is it possible to check if it’s running on Linux or windows, and then format the bath based on that?

dawn shell
#

Pretty sure the glb should have only / always

ebon zealot
ebon zealot
dawn shell
ebon zealot
#

Then again, if slashes work on windows as well...

dawn shell
#

Ah, got you. GLB is a data interchange format, so it would be very strange imo if the OS I ran Blender on had an influence. If I share my GLB with a user running Linux, it’s weird that they have backslashes.
For cases like these, usually all frontslashes are used and the application can still use backslashes for looking up the files later

ebon zealot
dawn shell
ebon zealot
#

In the end, Bevy ends up doing the lookup for the correct path

dawn shell
dawn shell
ebon zealot
#

Sorry I am kind of laughing internally, this is one of the first times using slashes manually is the right choice 😁

dawn shell
#

Hehehe

ebon zealot
#

I will patch this later tonight

dawn shell
#

It makes sense for the asset server. Imagine if I had a string literal that said "foo\bar" and gave you the code to compile it on Linux.

dawn shell
#

Do I just execute that magic python file that’s laying around?

dawn shell
#

Update: I'm really struggling to find the right place in the Python code :/

#

Update 2: Alright, I've added a really ugly hack to my fork and now I can run the scene in Bevy! Hurray!

#

However, adding ColliderConstructor from avian to a mesh in Blenvy results in this. Any clue?

#

Update: I've reloaded the registry and it works fine now 🙂

#

Such a joy to see all the colliders!

ebon zealot
dawn shell
#

Avian colliders are working perfectly!

#

@hollow dove this explanation is relevant for you as well

ebon zealot
dawn shell
#

I'm using an empty ColliderCube with a ColliderConstructor and display it as a cube

#

Then, I use a collection instance of that empty as a child of an object that needs a collider. The parent in this case is holding a RigidBody.

#

Since the ColliderCube is setup as a 1x1x1 collider, I can scale and rotate it however I want and I get this nice visualization:

#

When running this on the Bevy side, avian correctly applies all transforms and the effective collider looks the same as my Blender preview 🙂

round cove
#

re: my own materials issue from yesterday. I had a level and a blueprint in separate scenes. It seems that my blueprint needed a material, but only once I introduced a level. The blueprints alone worked by themselves before the level was introduced

ebon zealot
dawn shell
ebon zealot
dawn shell
round cove
dawn shell
dawn shell
round cove
#

I'm still seeing the nodes field missing, but the new .blend's levels load now. As long as I don't use built-in textures or whatnot the shading seems to work

ebon zealot
round cove
ebon zealot
round cove
# ebon zealot What do you mean by nodes field ?
2024-07-21T20:26:58.717998Z ERROR bevy_asset::server: Failed to load asset 'materials/test_scenes_materials.glb' with asset loader 'bevy_gltf::loader::GltfLoader': invalid glTF file: missing field `nodes` at line 1 column 122
ebon zealot
ebon zealot
round cove
#

doesn't seem to make a difference in the error showing up

#

I wiped out all the produced assets and re-generated them too

ebon zealot
dawn shell
#

@ebon zealot you probably want to hide "bevy/file_watcher" behind a feature flag called "file_watcher", as it breaks on Wasm builds

#

(no rush, I'm patching that on my fork so I can continue working)

ebon zealot
#

Unrelated: looking for naming advice for the following:

  • each level and blueprint has a BlueprintAssets component that stores the direct assets (any manually added assets + its children blueprints ) NOT any deeply nested assets
    • this is needed for example for hot reload etc as you only care about asset changes that affect the immediate parent
  • I need a good name for this: I need to also store (separately as otherwise, the day Blueprint assets can be defined manually by users in git-able files, it would be a mess), the whole tree of assets & sub assets: you need this for example to preload ALL the assets of levels , dynamic blueprints etc : I
ebon zealot
dawn shell
#

Just activating the feature causes a compile error

#

Instead, I leave it up to the user to activate it

ebon zealot
dawn shell
#

sec

ebon zealot
dawn shell
#

Simply remove file_watcher from there and you're good 😉

ebon zealot
#

forgot to remove it after testing 😄

dawn shell
ebon zealot
#

Btw, I know it is still fresh but how does (bugs aside) Blenvy "feel" so far @dawn shell & @round cove ? (subjective, I know)

round cove
dawn shell
#

It's lovely

round cove
#

ColliderConstructor has been great too

dawn shell
#

I like that it's just one crate and addon

#

Plus, you were right: everything has very nice defaults out of the box

round cove
#

yeah single vs the old multiple makes it much less confusing, especially with the "Blueprint", etc terminology

dawn shell
#

@ebon zealot exporting types will also not work on Wasm. Is there already an option to disable this or should I patch it for now?

ebon zealot
#

run it in non wasm mode first ?

dawn shell
#

At least, that's how it worked with the old workflow

ebon zealot
#

wasm is a target, so we should be able to detect it right ?

ebon zealot
#

was tempted to say it should only be dependent on the target, but for release build you would want to disable it as well

dawn shell
#

I think for an initial release it's fine to just expose the setting to the user imo

#

Sure, you can be smart about it and do it automatically, but that's easy to implement at a later stage

#

BTW, I know android is rather restrictive in what it allows on the file system, so maybe you'd need to deactivate it there as well.

dawn shell
dawn shell
#

So, for the record, my fork contains hacks for the following things currently:

  • Windows pathing landing up in GLTFs. Ideally GLTFs should be completely OS agnostic.
  • Remove feature bevy/file_watcher
  • Disable app.add_systems(Startup, export_types); conditionally.
#

But I'm supremely happy with how well Blenvy is working in general 🎉

ebon zealot
#

ok folks, so I just did an update: (the Blenvy add-on zip has also been regenerated)
Bevy crate:

  • removed file_watcher feature, should be user settable
  • added root blueprintInfo path to the list of assets to watch for hot reload (fixes issues of scene level changes not being seen )
  • removed settable aabb calculation: they will now always be done
  • added "export_registry" setting to be able to disable registry export for wasm & co (automate later)
  • cleanups

Blender add-on:

  • changed the paths generation for BlueprintInfos (amongst other things), it should hopefully fix the spawning issues on windows @dawn shell
  • restructured & improved materials export: now uses same logic as blueprints, with separate determining of
    what materials changed & the export itself, I do not think it will solve all issues but at least some of them
ebon zealot
dawn shell
ebon zealot
dawn shell
#

can't drag-and-drop the addon into Blender

ebon zealot
# dawn shell

try removing & re-installing, it did that once for me too

ebon zealot
dawn shell
#

uninstalled it, now back to this 😄

#

removing the toml now

#

Aaand the addon works now 🎉

ebon zealot
#

I'll rename it, commit it so It does not skip my brain again

dawn shell
#

But I get this on save

ebon zealot
dawn shell
#

Wait a sec

#

Maybe it's easier if you take a look at our simple setup yourself

#

Let me know if there's anything I can do to help testing

ebon zealot
dawn shell
#

everything is at default

ebon zealot
#

strange

dawn shell
ebon zealot
#

ok, one last attempt to fix, then I am off, will take a look at your project tomorrow

dawn shell
#

yep, there it is

dawn shell
ebon zealot
#

Fix is out, zip is updated, and if still fails, will have to take a look tomorrow 🙂

dawn shell
#

on it

#

saving works!!

#

now compiling my game

round cove
#

newest zip is working just as well for me

dawn shell
dawn shell
#

@ebon zealot next Wasm error

#

It's here:

let gltf = RawGltf::open(format!("assets/{}", blueprint_info.path)).unwrap();
#

Yep, that looks like it's doing a regular filesystem access.

#

Dunno if you can instead leverage the asset server to read it with the gltf crate?

#

Otherwise, here is how the Bevy Wasm IO is implemented. If nothing else works, we could just replicate that method in Blenvy.

round cove
#

its interesting to see the hash in the ui for Name

#

I get that objects in a scene are getting names from their in-blender names (which is great). but I'm using a pattern a bit like this for CollisionLayer definitions too.

pub struct BlenvyHelpersPlugin;

impl Plugin for BlenvyHelpersPlugin {
    fn build(&self, app: &mut bevy::prelude::App) {
        app.register_type::<NameFromBlender>();
    }
}

#[derive(Reflect, Debug, Clone)]
#[reflect(Debug, Component)]
pub struct NameFromBlender {
    name: String,
}

impl Component for NameFromBlender {
    const STORAGE_TYPE: StorageType = StorageType::Table;
    fn register_component_hooks(
        hooks: &mut ComponentHooks,
    ) {
        hooks.on_add(
            |mut world: DeferredWorld,
             entity: Entity,
             _id: ComponentId| {
                let NameFromBlender { name } = world
                    .get::<NameFromBlender>(entity)
                    .unwrap()
                    .clone();
                world
                    .commands()
                    .entity(entity)
                    .insert(Name::new(name))
                    .remove::<NameFromBlender>();
            },
        );
    }
}
#

Its kind of a hack for component blender-ui customization

#

avian CollisionLayers vs custom CollisionGrouping example

ebon zealot
# dawn shell Dunno if you can instead leverage the asset server to read it with the gltf crat...

Unfortunately not as far as I could tell as:

  • we want to avoid using the standard gltf loader as we want to preload data in this specific case, before we use Bevy's standard gltf loader
  • not sure if it is even possible to create & register a second gltf loader for preloading ?
  • alternatively (we discussed it a bit here while back) storing assets outside of gltf files : likely option for long term, but it does not solve all issues, and opens a lot of other cans of worms.
  • so short term stop gap seems to be to replicate how Bevy does it, which ...also feels meh
ebon zealot
round cove
#
use avian3d::prelude::*;
use bevy::{
    app::Plugin,
    ecs::{
        component::{
            ComponentHooks, ComponentId, StorageType,
        },
        world::DeferredWorld,
    },
    prelude::{Component, Entity, ReflectComponent},
    reflect::Reflect,
};

pub struct CollisionLayersPlugin;

impl Plugin for CollisionLayersPlugin {
    fn build(&self, app: &mut bevy::prelude::App) {
        app.register_type::<CollisionGrouping>();
    }
}

#[derive(PhysicsLayer)]
pub enum GameLayer {
    Player, // Layer 0
    Enemy,  // Layer 1
    Ground, // Layer 2
}

#[derive(Reflect, Debug)]
#[reflect(Debug, Component)]
pub enum CollisionGrouping {
    Environment,
    Player,
}

impl Component for CollisionGrouping {
    const STORAGE_TYPE: StorageType = StorageType::Table;
    fn register_component_hooks(
        hooks: &mut ComponentHooks,
    ) {
        hooks.on_add(
            |mut world: DeferredWorld,
             entity: Entity,
             _id: ComponentId| {
                let value = world
                    .get::<CollisionGrouping>(entity)
                    .unwrap();
                match value {
                    CollisionGrouping::Environment => {
                        world
                            .commands()
                            .entity(entity)
                            .insert(CollisionLayers::new(
                                GameLayer::Ground,
                                [
                                    GameLayer::Enemy,
                                    GameLayer::Player,
                                ],
                            ))
                            .remove::<CollisionGrouping>();
                    }
                    CollisionGrouping::Player => {
                        world
                            .commands()
                            .entity(entity)
                            .insert(CollisionLayers::new(
                                GameLayer::Player,
                                [
                                    GameLayer::Enemy,
                                    GameLayer::Ground,
                                ],
                            ))
                            .remove::<CollisionGrouping>();
                    }
                }
            },
        );
    }
}
#

jeez only 4 edits to get that paste to work lmao

glass abyss
#

@ebon zealot can you help me out on this? i selected the registry.json and clicked reload registry and that popped up

#

i'm pretty sure its because of the double slashes but how can i fix it? in the blender file view its single slashes

#

it worked fine the last time i used it though

ebon zealot
glass abyss
#

that was b4 u renamed the repo btw

#

oh wait im dumb

#

thats the rust crate

#

hold on

#

the blender plugin is 0.1.0

#

i built it on my own with python

#

it worked before though

glass abyss
#

after reinstalling it when i try to enable it this happens

ebon zealot
glass abyss
#

okay i think my blender 4.1 install is broken

#

and it isn't blenvys fault

#

i tried to install my zip again in blender 4.0 and it worked

#

i might aswell install the newest 4.2

dawn shell
dawn shell
#

@round cove did you get textures working in the end?

hollow dove
#

I'm having an issue where my materials are broken if they are defined for objects in a "Library" scene and used as collection instances in the actual game world's scene. Is that expected and would someone happen to know a way to fix that?

round cove
#

I forget the wording they used exactly but it seemed like "materials needed a rework. it'll happen soonish"

ebon zealot
#

@round cove is the issue still present after yesterday's release btw ?

hollow dove
#

Like, if I copy the actual collection into the world scene, the material works, but if I create an instance of that collection from the library scene, it renders a white default material on the Bevy side

#

works (just copying the actual Player object)

#

doesn't work (using a collection instance from "Library")

sly fulcrum
#

Can I ask how you’re spawning the scene, are you using “path/scene.gltf#Scene0”

hollow dove
#

spawning an entity with BlueprintInfo::from_path("levels/World.glb"),

#

which is the same as the examples in the repo

sly fulcrum
#

Unfortunately I don’t have a solution

ebon zealot
hollow dove
#

not that I can see

ebon zealot
ebon zealot
# hollow dove not that I can see

ok, that is weirder, are the material files generated correctly ?
You can drag & drop a material gltf file into any gltf viewer and you should have all your materials/colors visible as little cubes

sly fulcrum
hollow dove
#

I can have both versions at the same time, the one that works and the one that doesn't work, both using the same material. Only one of them gets the material on the Bevy side

#

just some cuboids here, the left one is the object manually copied into "World", and the other one is using a collection instance

#

both have the same material on the Blender side

sly fulcrum
#

Work around (ugly work around) if you know the name of the material you can rip it directly from the file and apply it manually (again very ugly)

ebon zealot
ebon zealot
hollow dove
#

It has two materials, but not the ones that show up in Bevy 🤔

sly fulcrum
ebon zealot
# hollow dove It has two materials, but not the ones that show up in Bevy 🤔

o_O that is even weirder, the process to export the materials is really just iterating over the list of materials in use and exporting them.
Sorry, two more questions:

  • if you delete the material files & let Blenvy regenerate them, are the materials still wrong ?
  • are you using the latest version of the blender add-on (I uploaded it last night) ?
ebon zealot
sly fulcrum
round cove
round cove
#

should your "level" scene also be a "library" scene?

hollow dove
dawn shell
dawn shell
#

Getting this when copy-pasting a ColliderConstructor component FYI. The component got pasted, just with all values set to 0.0

glass abyss
#

i get this when i try to run my bevy app outside of the root dir, or without cargo, how can i fix it?

round cove
glass abyss
round cove
#

oh you mean if you do a release build. Then you should disable the registry writeout option in the plugin for your release build

glass abyss
#

how?

round cove
#

I forget what the option is but you should be able to autocomplete the BlenvyPlugin fields to see it

#

for a first try just turn the option to false and let the others be default, then see if that fixes your release build issue

glass abyss
#

it worked, thanks

dawn shell
glass abyss
#

yeah, i did that but i added cfg not debug_assertions above export_registry line

dawn shell
#

alternative:

BlenvyPlugin {
    export_registry: cfg!(debug_assertions),
    ..default()
}
sly fulcrum
#

finally home. i havent actually gotten a chance to look at the update yet. am i pulling from the main branch or the blenvy brancy?

round cove
#

and the zip from the pre/alpha github release

sly fulcrum
ebon zealot
round cove
ebon zealot
ebon zealot
ebon zealot
dawn shell
#

yep

#

this is the copied component

#

And this is the pasted component

dawn shell
#

Just checked the custom properties and they're off

#
{"avian3d::dynamics::rigid_body::RigidBody": "Static", "avian3d::collision::collider::constructor::ColliderConstructor": "Sphere(radius: 0.0)"}
ebon zealot
dawn shell
#

Although when I copy-paste RigidBody::Static onto an object with RigidBody::Dynamic, it does not seem to overwrite the component with the new Static

ebon zealot
ebon zealot
ebon zealot
#

Btw for all the bugs for the alpha, I will add a specific tag on github, so that the issues can be reported there too 😉

dawn shell
#

Can't reproduce it 😄

dawn shell
#

All of these colors show up as white on the Bevy side

#

Let me know if there's anything I can test to help out

ebon zealot
dawn shell
dawn shell
dawn shell
ebon zealot
ebon zealot
round cove
ebon zealot
dawn shell
#

@ebon zealot why are you using RawGltf over Bevy's Gltf in the first place? Do you need access to some internals that are not exposed?

ebon zealot
ebon zealot
dawn shell
#

I think this PR should enable us to use our own AssetLoader for Gltf, which would do stuff with the gltf crate

ebon zealot
ebon zealot
ebon zealot
#

A part of me thinks that even this is not the perfect solution :
I still think a user editable text format for assets might be better. Unfortunately, all the possible solutions I came up with have one major flaw: there should be a clear distinction between

  • what assets a user defines (text format: good)
  • "generated" assets: the list of blueprints to pre-load, any deeply nested assets etc (user editable text format: not so great)
    Then again... perhaps with the "extras parser" the problem could be partially resolved by having both embedded asset lists (the generated ones) and user defined ones
    But is that not too complicated ?
dawn shell
#

While I'm editing away, I just noticed this. You might want to slap a #[non_exhaustive] on these kinds of structs 😉

dawn shell
ebon zealot
dawn shell
#

Oh, I remember now!

#

I think I have very few thoughts on that. I'd probably have to see it in action. I can imagine that a handwritten text (or BSN) file would be a really good match and I can imagine that would be very confusing. Hard to tell.

ebon zealot
dawn shell
#

Alright, I think I have a custom asset loader going!

#

Dunno if it works with Wasm yet, but this is at least a good step

#

Do you happen to know of any other raw filesystem access in Blenvy?

dawn shell
ebon zealot
dawn shell
#

Here's the asset loader in any case. Not that bad for a quick hack.

dawn shell
ebon zealot
ebon zealot
dawn shell
dawn shell
dawn shell
ebon zealot
dawn shell
ebon zealot
ebon zealot
ebon zealot
dawn shell
#

alright, this works on native at least!

#

compiling for wasm takes a few years on my machine, so maybe I'll need to leave that for tomorrow

dawn shell
ebon zealot
dawn shell
#

I'll report tomorrow whether itch.io is also happy with the deployment, but I see no reason it shouldn't be

open steeple
#

link if it's happy, just to make sure it works for everyone

round cove
#

I think its the materials change detection code that's the issue currently

#
materials_to_export = list(set(bpy.data.materials))
#

unfortunately the checker/noise/etc textures don't work, but I'm not sure if they're meant to yet. The materials file writes out and is usable with this change though

round cove
#

nvm, I figured out how to bake

ebon zealot
sly fulcrum
#

im getting a bunch or errors in "testing" and the "demo" and "save load" examples. is this expected? or have i maybe done something wrong?

#

im on nixos cause i cant get into windows rn (drive issues) so it could be a problem with my nix setup

dawn shell
sly fulcrum
#

how do you get around that? it doesnt seem like rust will compile my projects if the examples arent working. should i just delete them?

#

@dawn shell

sly fulcrum
#

ive ignored the test and examples in the cargo.toml file but now i get a bunch of errors in the blueprints folder. specifically animation, mod, and spawn_from_blueprints

#

ive double checked im on the right branch

#
[strange@nixos:~/bevy/Blenvy]$ git branch -a
* (HEAD detached at origin/blenvy)
  blenvy
  main
  remotes/origin/HEAD -> origin/main
  remotes/origin/animation-fixes-and-improvements
  remotes/origin/bevy-0.14
  remotes/origin/bevy_main
  remotes/origin/blenvy
  remotes/origin/crate_tests
  remotes/origin/main
dawn shell
#

I just have a dependency like this blenvy = { path = "../blenvy/crates/blenvy" } in my game.

#

@ebon zealot @open steeple @hollow dove here's the game successfully running Blenvy and Avian in Wasm: https://janhohenheim.itch.io/bike-game 🎉
You alternate pressing A and D to pedal your bike and move
Note that the ramp physics are broken, the mouse is not yet locked to the screen and sometimes the camera is upside down when starting the game.
But the important part is: Blenvy works on Wasm with my changes 😄

sly fulcrum
ebon zealot
ebon zealot
ebon zealot
dawn shell
#

Can do later! The caveats of the solution are the same as before, so you know them already (clunky preloading for the user, archetype moves from the insert and deletes. Although my solution has an extra archetype move than before.)

dawn shell
sly fulcrum
#

im getting errors that look like this:

   Compiling blenvy v0.1.0-alpha.1 (/home/strange/bevy/Blenvy/crates/blenvy)
error[E0412]: cannot find type `AnimationGraph` in this scope
   --> crates/blenvy/src/blueprints/spawn_from_blueprints.rs:340:31
    |
340 |     mut graphs: ResMut<Assets<AnimationGraph>>,
    |                               ^^^^^^^^^^^^^^ not found in this scope
    |
help: you might be missing a type parameter
    |
317 | pub(crate) fn blueprints_assets_loaded<AnimationGraph>(
    |                                       ++++++++++++++++

which looks like a bunch of types arent being found? i get im the only one with this issue but im seriously confused as to what might have gone wrong.

dawn shell
#

Your spawn_from_blueprints.rs is importing bevy::prelude::*, right? Asking because AnimationGraph is a Bevy type. Are you accidentally pulling in different versions of Bevy? cargo tree -i bevy

dawn shell
dawn shell
sly fulcrum
dawn shell
#

The one that imports blenvy

sly fulcrum
#

This is just building blenvy, not even in my own project

#

If I run in my own project, I get the same errors coming from blenvy

dawn shell
dawn shell
ebon zealot
dawn shell
#

Oh, is your local blenvy on the correct branch?

sly fulcrum
ebon zealot
#

So on the topic of materials , I think the system might need some fundamental change:

  • Currently there is one material library file per blend file that contains * all materials * in use by blueprints in the blend file
  • So even if a blueprint does not use a given material it will have a link to a material library containing all materials
  • On the plus side this means a single materials file per blend file
  • But it makes knowing which materials are used by which blueprint/level unclear

However...

  • I think it might make more sense to export individual materials , each to their own file
  • Have blueprints/levels have a list of material files they need
  • It makes it clearer and cleaner which materials are used by which blueprint/level uses which materials
  • As materials are cached by blenvy I don't think there would be much overhead
open steeple
open steeple
dawn shell
ebon zealot
#

Materials get exported as far as supported by the gltf spec + extensions allow (don't remember the exact details). I have long term plans for exporting shaders and modifiers (geometry nodes mostly) but that is still quite a bit in the future

sly fulcrum
#

If you use the principled bsdf shaders with regular textures, this matches the gltf material format and is exported by blender as such. Gltf does not support procedural textures like noise or wave. Bevy will import the materials from a gltf correctly as a standard material.

Not sure how exactly blenvy handles this but that’s the general concept

dawn shell
#

In general, expect Blender to not export anything beyond normal textures, roughness and metallic maps and ambient occlusion

#

But you can do fancy Blender shading stuff and bake it manually

open steeple
#

i don't need them to be exported, i have a mockup of bevy shader, can blenvy not export it, and instead point to correct thing right away?

sly fulcrum
#

I think you’d need a dummy in blender shader, then replace that dummy with the real deal in rust

dawn shell
open steeple
#

why not just "export material[i] as [ select from a list of materials/shaders ]"?

#

or whatever this would use

I think it might make more sense to export individual materials , each to their own file
Have blueprints/levels have a list of material files they need
It makes it clearer and cleaner which materials are used by which blueprint/level uses which materials

ebon zealot
#

The more insane version (which I experimented with in my own engine pre Bevy, and it was a nightmare) would be

  • convert blender shader to Bevy shader
  • export it alongside the material+ additional metadata to help Bevy
  • boilerplate in Bevy to replace the standardmaterial with a custom material with shader
round cove
#

I think in a theoretical Bevy/Blender future Bevy is looking at supporting things like MaterialX and Blender supports USD/MaterialX so could theoretically export spec defnitions from bevy to blender and back

#

but that's way theoretical and sounds like a lot of edge casey work anyway lol

round cove
dawn shell
round cove
#

that's what I was referring to 😄

dawn shell
ebon zealot
#

Short FYI:

  • @dawn shell 's fix has been merged into the Blenvy branch (thanks Jan!)
  • there is also an updated Blender add-on zip on the pre-release page , that sadly only solves a part of the material issues: I have found the core of the problem, but I will be switching to one material per material file & related changes as part of the fix, thanks for your patience
round cove
#

I upgraded to the new zip and am not sure what a "cycles" component is. I assume its related to the baking I was doing somehow.

#

also when clicking X

#

I can file an issue if that's helpful but it doesn't seem to be actually affecting anything. I fully regenerated all the files and ran the app without issue.

spiral trellis
dawn shell
#

@ebon zealot I managed to reliably reproduce the error from a few days ago

#

I copy this from a regular object in World, no blueprint involved

#

And paste it onto an empty that is also in World, again no blueprint involved. The result is the above error message, with the resulting component looking like this

#

But the custom properties reveal that what actually got pasted is this:

{"avian3d::collision::collider::constructor::ColliderConstructor": "Sphere(radius: 0.0)"}
ebon zealot
ebon zealot
# round cove I upgraded to the new zip and am not sure what a "cycles" component is. I assume...

Hmm so there is no full distinction between components & Blender's custom properties. And as you see with "cycles", Blender adds its own components to objects sometimes (so do some add-ons, other tools etc)
I think the best solution for this would be to add an "ignore list" so that users can just add the custom properties they do not wish to be displayed in the rename/fix/upgrade screen , what do you think ?

round cove
#

yeah maybe "ignore all of this type" as an additional button then, and some way to get back and view that list of ignores. Doesn't feel great, but removing them probably isn't what I want either and that was my natural reaction.

#

feels a lot like "warning messages" in the console. if they're always there, then people are trained to not look there for actual issues

dawn shell
round cove
#

yeah deff low priority. easy to just ignore

ebon zealot
round cove
#

oh that's cool

ebon zealot
dawn shell
# ebon zealot Is the error * for that component only ? * for any enum ? * this is a general...

Components that trigger this:

  • bevy_render::mesh::morph::MorphWeights (struct containing an enum)
  • avian3d::collision::collider::constructor::ColliderConstructorHierarchy (struct that contains ColliderConstructor)
  • bevy_core_pipeline::bloom::settings::BloomSettings (struct containing an enum)
    Components that do not trigger this:
  • bevy_render::primitives::Aabb (struct)
  • avian3d::dynamics::rigid_body::RigidBody (simple enum)
#

Looks like a case of structs containing enums? Not sure

#

In case the materials fix is not out by the time the jam ends, do you know of any workaround to get materials working on blueprints?

ebon zealot
dawn shell
ebon zealot
dawn shell
#

Yeah, that's the reason I did all of those Wasm tests in the first place 😄

#

I don't care about Wasm at all when outside a jam, haha

ebon zealot
dawn shell
ebon zealot
ebon zealot
dawn shell
#

(or embrace the grey block aesthetic)

ebon zealot
ebon zealot
round cove
#

"cycles" as in "take it into blender yourself and render the materials if you want to play with some"

#

fits the theme!

ebon zealot
#

@round cove & @dawn shell I just pushed & updated a fix for materials before I start changing things around. Now the MaterialInfo component is being inserted normally again on the Blender side.
@round cove I don't think this will solve your strange error with the standard gltf exporter being unable to export the material Library (still unable to reproduce that one), but the next, more radical update might.

round cove
#

sorry if I didn't make that clear

dawn shell
round cove
#

huh. I wonder if my ad-hoc changes stuck around somehow then

#

will have to clean it up and check

ebon zealot
dawn shell
#

I did not

#

sec

ebon zealot
round cove
ebon zealot
#

Ok this is getting more & more confusing 😄

dawn shell
#

I'll try restarting my Blender after installing the addon

#

sec

#

still nothing

ebon zealot
# dawn shell bevy

Could you please check if you have any BlueprintInfo component on the object that is supposed to have the material applied

dawn shell
#

I wonder if you can reproduce this? I recently sent the link to the project

ebon zealot
dawn shell
#

Either download them from your package manager to run Bevy wayland apps in general or disable the wayland feature on the bevy dependency

ebon zealot
ebon zealot
dawn shell
#

But yeah, feel free to disable Wayland here

ebon zealot
round cove
#

(this is with the last zip, not the current one)

ebon zealot
#

Btw I feel like I have not been clear about this:

  • every change to the export part of the Blender add-on, is very likely to change the output files (for example the previous version was not writing the MaterialInfo correctly), so it can potentially impact ALL the gltf files
  • so I highly recommend deleting the various Blenvy generated asset folders before trying out a new version
round cove
#

this is the textures working from a build right before the current (non-blenvy) change I'm working on.

#

a build of my app that is

#

checkerboard is the texture

ebon zealot
#

@dawn shell I just checked in your project, there is no BlueprintInfo. Going to try & regenerate the files with my local changes to see if it changes anything

ebon zealot
dawn shell
dawn shell
#

Yep, the Ramp has a BlueprintInfo

#

name: Ramp path: blueprints/Ramp.glb

dawn shell
#

But... I have it?

ebon zealot
dawn shell
dawn shell
#

I assume you manually changed the colors?

#

Otherwise, something else that is weird is going on 😄

ebon zealot
# ebon zealot

So this is very confusing, going to call it a night,

  • I had to change your fork of Blenvy to the original Blenvy branch
  • I removed all levels, blueprints, materials & regenerated it
dawn shell
ebon zealot
dawn shell
#

yep

round cove
#

it was a one-line patch to "fix" and return all of them

dawn shell
#

I can try to see if that fixes it

#

I think hot reloading might just have crashed my game

#

But not important, the player is never going to be able to hot reload anyways 😄

ebon zealot
dawn shell
#

Btw, in better news: I found a fix for the empties not allowing arbitrary shapes

ebon zealot
ebon zealot
round cove
dawn shell
ebon zealot
dawn shell
dawn shell
#

And then set it to not be renderable

#

That way, the cylinder debug mesh will never be exported 🙂

#

Make sure the cylinder collider and the generated cylinder mesh have the same height and radius, and your blender setup will perfectly match your avian setup no matter how much you scale and rotate everything 🎉

dawn shell
ebon zealot
dawn shell
#

Yes, right?

ebon zealot
dawn shell
#

Aaah got it, thanks

#

I can confirm that I don't have it in my version either

#

With the addon installed in "user mode", does it also not generate a materials directory for you?

ebon zealot
#

AHHH, ok , it seems there is a caching issue in Blender

dawn shell
#

I tried out @round cove's hack and still no materials dir

ebon zealot
#

I closed Blender (user mode) , and re-tried it , and the colors are back

#

Ok this is the local version that works for me (user mode too), just disregard the additional material files, part of experiments

#

Calling it a day, will re-try again tomorrow with a fresh brain & a fresh clone of your project @dawn shell

dawn shell
ebon zealot
dawn shell
#

No dice. Maybe it's a Windows issue?

dawn shell
#

But hey, as long as someone can generate the materials file, this is at least not a blocker for the jam 😄

dawn shell
#

@ebon zealot how do I best check if my World has finished loading, including all sub blueprints?

#

Observe Trigger<OnAdd, BlueprintInstanceReady> and see if the entity holds GameWorldTag?

ebon zealot
dawn shell
#

FYI my Blenvy randomly started generating the material files. They still don't show up ingame, but at least they exist 😄

dawn shell
#

@ebon zealot is there anything I can help with regarding the materials not showing up ingame?

round cove
dawn shell
#

Looking at the generated material files, they seem correct to me, but I'm not sure how they should look like, so idk

#

My guess so far is that something is going wrong while importing the material files.

round cove
#

I cause issue using various things in blender all the time, but I always get specific loading warning and such

#

specifically for material exports and such

dawn shell
dawn shell
#

Now it randomly loaded some materials

#

For reference, this is how it should look

#

Seems like the red color of the car is coming from the material belonging to the car's lights?

#

The road and the bike are looking correct. Notably, these two use only one material. The buggy objects in the scene are using multiple materials per mesh.

#

So it seems like when an object uses multiple materials, a random one is picked for the whole object

ebon zealot
dawn shell
ebon zealot
dawn shell
ebon zealot
ebon zealot
dawn shell
dawn shell
ebon zealot
dawn shell
#

Bike mesh

ebon zealot
dawn shell
#

One of the building meshes

dawn shell
#

In case you want to take a look yourself

ebon zealot
dawn shell
#

I googled, it works the same 🙂

ebon zealot
#

btw, you need to install Blenvy on that copy of Blender too of course 🙂

dawn shell
#

I misunderstood what you meant. I thought I had to do something like blender --save-scene World because I assumed it would be in headless mode, that's why I asked for a command 😅

dawn shell
ebon zealot
dawn shell
round cove
#

the addons on mac are all stored in a single version directory too

dawn shell
#

lemme check