You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a VRM model is imported, with only layer 1 selected, the model loads as if only layer 3 is selected.
At first, the only thing I noticed was that the lighting was not behaving as expected on the imported VRM models.
When I iterated through the MeshInstance3D objects in the VRM and printed the values for each layer, that's when I found it was all set to 3.
I did attempt reimporting the model with different layer settings. None of them seemed to make a difference in the outcome.
I also recalled that I had previously imported a gltf with the layer 3 set to true. So I imported another gltf file with the layer set to 1, and then imported a new VRM model, and it was still set to 3. So I do not believed it's picking it up from other imported gltf files.
I was able to work around the issue by iterating through all the layers in each MeshInstance3D for each VRM model, set them all to false, then set layer 1 (the desired layer) to true, placing that code in the ready function for the scene. It's not ideal, but it does work.
all_children = get_all_children($Characters)
for _i in all_children:
if _i is MeshInstance3D:
for _y in range(1,21):
_i.set_layer_mask_value(_y,false)
_i.set_layer_mask_value(1,true)
The text was updated successfully, but these errors were encountered:
When a VRM model is imported, with only layer 1 selected, the model loads as if only layer 3 is selected.
At first, the only thing I noticed was that the lighting was not behaving as expected on the imported VRM models.
![VRM_LayerBug](https://private-user-images.githubusercontent.com/115270427/313847532-0ed43a56-eba6-4af6-bacf-03348f8664db.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkxMDMxNzgsIm5iZiI6MTcxOTEwMjg3OCwicGF0aCI6Ii8xMTUyNzA0MjcvMzEzODQ3NTMyLTBlZDQzYTU2LWViYTYtNGFmNi1iYWNmLTAzMzQ4Zjg2NjRkYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyM1QwMDM0MzhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02Y2QzNzRmZGI5MTM5ZDUxMjkxZmU3NjQxOGFjYmFmYWIzYmUwMDIwOWM0NmYxOTE3ZTA2ZWM0MGZiNmYyMWJlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.-1oLlCkBNtPZT0gzsPbm4g-SDajueyKy5RjIDxJQiTo)
When I iterated through the MeshInstance3D objects in the VRM and printed the values for each layer, that's when I found it was all set to 3.
I did attempt reimporting the model with different layer settings. None of them seemed to make a difference in the outcome.
I also recalled that I had previously imported a gltf with the layer 3 set to true. So I imported another gltf file with the layer set to 1, and then imported a new VRM model, and it was still set to 3. So I do not believed it's picking it up from other imported gltf files.
I was able to work around the issue by iterating through all the layers in each MeshInstance3D for each VRM model, set them all to false, then set layer 1 (the desired layer) to true, placing that code in the ready function for the scene. It's not ideal, but it does work.
The text was updated successfully, but these errors were encountered: