Closed ronh991 closed 2 weeks ago
Thankyou - Now it was not my intension to have missing vertices for skinning, I'll change this to an enhancement requires to push a warning out to the console that a neutral bone is being added and display what mesh it's being added to.
For 3.6 and 4.2 LTS
I am trying to understand how to fix my issue. Are you saying that parenting an armature to a mesh and the automatic weights have some vertices set to zero (or blue) is forcing a vertex to be associated to a neutral_bone?
If the mesh vertex did not have a zero weight then the neutral bone would not be needed?
Is this neutral bone added to multiple armatures if my blend file has more than one?
Can I use a hook to remove this neutral?
Further to this. An additional enhancement request - Since the exporter may be used for game requirements, Perhaps other ganes need unique naming for the meshes and armatures.
In MSFS we use two gltf files and combine them. If both glTF files have the same name for armature bones then I get a naming conflict.
Additional enhancement is to make the neutral_bone name
Still requesting a log warning in the console
Is there a hook I can use to find this neutral_bone and change it's name in my add-on?
I can't seem to get gather_scene_hook or gather_gltf_hook to work. vtree is not accessible
In order to properly use your neutral_bone - require access to the vtree - or somehow I need to add an extension to that added bone. Can you suggest a way - or add vtree to be modified?
You add this
{
"name":"neutral_bone",
"rotation":[
-0.7071067690849304,
0,
0,
0.7071067690849304
]
},
I need to be able to modify it to add
{
"extensions":{
"ASOBO_unique_id":{
"id":"neutral_bone1"
}
},
"name":"neutral_bone1",
"rotation":[
-0.7071067690849304,
0,
0,
0.7071067690849304
]
},
I have to be able to change the name and add the extension
Any chance you can add a hook in the add_neutral_bones function in gltf2_blender_gather_tree.py with the neutral_bone as an argument?
This way I could change the name and add the extension as a gltf2_node.
Hello,
Can I use a hook to remove this neutral?
No, remove it is a bad idea. This will generate a not valid glTF file. A better idea is to fix your model to be sure that any vertices are skinned, if you want to avoid this neutral bone.
enhancement requires to push a warning out to the console that a neutral bone is being added and display what mesh it's being added to
Yes, Added in TODO list
Are you saying that parenting an armature to a mesh and the automatic weights have some vertices set to zero (or blue) is forcing a vertex to be associated to a neutral_bone?
Yes. If there are some 0 weights => The neutral bone will be added. If no 0 weights => Not added
Is this neutral bone added to multiple armatures if my blend file has more than one?
Have to double check, but yes, if I remember correctly, a neutral bone is added for each armature/skeleton where needed.
Perhaps other ganes need unique naming for the meshes and armatures.
Unique naming is not part of the glTF specification. Having a pipeline based on naming in probably not a good idea.
Any chance you can add a hook in the add_neutral_bones function in gltf2_blender_gather_tree.py with the neutral_bone as an argument?
Yes, added in TODO list
Yes!! Thanks very much for the consideration and detail answers.
Describe the bug The neutral bone is causing me trouble. What is if for? THE MSFS build process does not like it - it's a naming issue. Does the neutral bone get use numerous times? Is there a way to stop it from being added to the glTF files?
I know there is nothing you can do directly - I am just trying to figure out how to not add it to my exporter gltf.