MackeyK24 Posted November 10, 2018 Share Posted November 10, 2018 Yp @Deltakosh and @bghgary There seems to be a BUG in the GLTF importers... I have a hierarchy like this: - Remy-Master (Parent) --- Body (Child) --- Bottoms (Child) --- Eyes (Child) --- Hair (Child) --- Shoes (Child) --- Tops (Child) --- mixamorig:Hips (Child, Skeleton) But when i look at the scene all the SKINNED MESHES (Body, Bottoms, Eyes, Hair, Shoes, Tops) are DE-PARENTED and in the root of the scene instead of being under Remy-Master. That must be a BUG... Here is a screen shot of the scene: Note: My GLTF json DOES have the 7 other nodes defined as children (and it works right in other viewers? "nodes": [ { "children": [ 1, 2, 3, 4, 5, 72, 73 ], "rotation": [ 0.0, 1.0, 0.0, 0.0 ], "name": "Remy-Master", } ] Quote Link to comment Share on other sites More sharing options...
Guest Posted November 11, 2018 Share Posted November 11, 2018 Well, we will need the gltf file to investigate Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 11, 2018 Author Share Posted November 11, 2018 I imagine it would do the same thing with any Skinned meshes that are children of a master mesh. But here is my Remy-Master Note: Is kinda big... Has a bunch for blendshapes and 17MB worth of textures Yo @bghgary ... Hey Gary... I finally GOT THE WHOLE GLTF Export Pipeline... Take a look at Remy. 1... Picture prefect PBR Material Export 2... Animations (Including Skeletal Animations) 3... Blendshapes (Including Morph Animations) 4... GLB Binary Containers (Which includes ALL external scene assets) 5... And so much more... Like Navmeshes, Lightmaps, Terrains (Including Splatmaps) I tell you... That took a minute to get right. All the Unity type GLTF exporters (Even the one you made for reference) does not really work right and does not export the all the major stuff... Mainly Skeletal Animations... That was a bitch to get right. Quote Link to comment Share on other sites More sharing options...
Guest Posted November 12, 2018 Share Posted November 12, 2018 Pinging @bghgary to investigate Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 12, 2018 Share Posted November 12, 2018 This is done intentionally to satisfy the requirements for the glTF spec. See https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins (second implementation note). Quote Implementation Note: Client implementations should apply only the transform of the skeleton root node to the skinned mesh while ignoring the transform of the skinned mesh node. In the example below, the translation of node_0 and the scale of node_1 are applied while the translation of node_3 and rotation of node_4 are ignored. The code is here: https://github.com/BabylonJS/Babylon.js/blob/master/loaders/src/glTF/2.0/babylon.glTFLoader.ts#L564 Is this causing a specific problem for you? Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 12, 2018 Author Share Posted November 12, 2018 Yes... I need to move Remy-Master as the parent .... body, shoes, etc should be children of Remy-Master Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 12, 2018 Share Posted November 12, 2018 On 11/10/2018 at 10:29 PM, MackeyK24 said: That took a minute to get right. All the Unity type GLTF exporters (Even the one you made for reference) does not really work right and does not export the all the major stuff... Mainly Skeletal Animations... Skinning always take a bit to get right. I'm glad you figured it out! Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 12, 2018 Share Posted November 12, 2018 1 minute ago, MackeyK24 said: I need to move Remy-Master as the parent .... body, shoes, etc should be children of Remy-Master But why? Are you searching for them by path or something? Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 12, 2018 Author Share Posted November 12, 2018 I’m using the gltf as a scene file... could have many root transform node... not just a single character model... and yes I get Remy-Master by name and move around using my Third Person Controller ... but in Babylon the body etc are parented to the root Babylon node and not Remy-master or whatever the main character model name is... this one is Called Remy-Master Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 12, 2018 Share Posted November 12, 2018 26 minutes ago, MackeyK24 said: I get Remy-Master by name and move around using my Third Person Controller The expected behavior in glTF is that transforms (parent and self) of skinned nodes are ignored. If you want to move the skeleton around, you need to move the root of the skeleton hierarchy and not the skinned node. This is the same behavior in Unity. Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 12, 2018 Share Posted November 12, 2018 That said, there is a different between Unity/glTF and Babylon in that the skeleton is not part of the node hierarchy in Babylon. Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 12, 2018 Author Share Posted November 12, 2018 Hmmmm... in that case, how do I move my character around in Babylon Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 12, 2018 Share Posted November 12, 2018 The moving around of nodes and ignoring transforms is just for glTF and for the loader. Once the loading is done, you can move the skinned mesh. https://playground.babylonjs.com/#KDITCT#1 But in your case, since you have a whole scene and multiple roots to move. I don't have a good solution. Can you file an issue for this? I'll think of something. Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 13, 2018 Share Posted November 13, 2018 I have discussed this with the team and I can make a fix that will create a container transform node that will hold all the skinned meshes with the same glTF skeleton property. Moving this transform node will move all the skinned meshes under it. Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 13, 2018 Author Share Posted November 13, 2018 Thank you very much Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 13, 2018 Share Posted November 13, 2018 Created an issue here: https://github.com/BabylonJS/Babylon.js/issues/5502 Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 13, 2018 Author Share Posted November 13, 2018 Btw... the Remy-Master is used for that reason. Why not just use the original parent node. Or better yet , some kind of flag or property to say ... hey , don’t De-parent skinned meshes Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 13, 2018 Share Posted November 13, 2018 2 minutes ago, MackeyK24 said: Why not just use the original parent node. There can be a non-identity transform on the original parent node which should not be applied to the skinned mesh. If there are meshes attached as children of this node, then I must split the hierarchy as the skinned mesh should not have the transform applied but the child meshes should. I can add a flag, but I rather not have options for how the hierarchy is constructed. It might cause some confusion. Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 13, 2018 Share Posted November 13, 2018 The root of these issues is really the glTF spec itself. We can't fix it for 2.0, but we probably will in a future version. See https://github.com/KhronosGroup/glTF/issues/1285. (Pun not intended ?) Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 13, 2018 Author Share Posted November 13, 2018 Kool deal... Whatever you think is best, i trust your judgment Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 13, 2018 Share Posted November 13, 2018 My fix isn't going to work for the Remy model until the `skeleton` property is set to the same root for the whole character. Is that something you can fix? Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 13, 2018 Share Posted November 13, 2018 Never mind. I'm going to look into a different way to fix your issue. Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 14, 2018 Author Share Posted November 14, 2018 Remy came from Mixamo... The different prices of the skinned meshes use different parts of the skeleton as it root bone Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 14, 2018 Share Posted November 14, 2018 I'm working on a fix that will make it behave correctly. Should be ready by tomorrow or so. Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 14, 2018 Author Share Posted November 14, 2018 Thanks Gary , for all your help fixing this issue ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.