Replies: 1 comment
-
I've opened the gltf files and more than just the normals that seem reversed, it seems like every faces are duplicated. If you merge vertices by distance in Blender in edit mode I would probably use a Blender python script to pre-process all the assets once rather than doing it in bevy as it's gonna be harder to do (waiting for the asset to be loaded, processing the mesh/normals, and only then allowing instances to be spawned)) and will use CPU time on each app start. If you really want to do it in bevy, I would look at asset events or direct calls to
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to use some external assets (Kenney Tower Defense Kit) in Bevy which gave some very strange results when trying to use actual lighting in the scene. After some debugging, I've figured that the normals seem to be flipped in all of the models. This can also be seen when importing the models into Blender with the normals overlay, where the whole model appears "red", indicating that all the normals point "away".
The example image shows the original model on the left, the fixed model on the right.
What I am wondering now is, if I have to flip all the normals manually in Blender or if there is a low-effort way to do this whole loading the models in Bevy? There's quite a number of resource files that all have the same issue, so doing them all one by one seems quite cumbersome.
I've seen that we can pass
GltfLoaderSettings
to the Asset loader, but there don't seem to be any related to Normals (or modifying the Meshes in general). I could probably use a one-time system to go through the GLTF data after loading, but am still lacking a good approach. Any ideas here?Beta Was this translation helpful? Give feedback.
All reactions