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:
Yeah the head hiding behavior needs to be an import setting. Originally, we didn't know how to create additional import settings, but later we found out that it is possible to combine an EditorScenePostImportPlugin together with an EditorSceneImporter to allow for settings.
Those layer settings are a relatively new addition and I haven't considered how to work with it yet.
The point of assigning layers 2 and 3 was to allow the application to control the visibility of models depending on if you are playing in first or third person. but this is very poorly documented and not configurable.
The issue with setting all meshes to layer 1 manually is you don't want to display both the head and the headless version of the model at the same time, since that will cause z fighting or extra performance overhead.
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.
The text was updated successfully, but these errors were encountered: