Closed emadurandal closed 8 years ago
@emadurandal wow, thanks for the carefully written issue. I agree this sounds like a bug in COLLADA2GLTF so I labeled this issue accordingly.
In the meantime, you could try converting this model with Cesium's converter, which does some extra processing that may help, or the Autodesk FBX to glTF converter, which also works with COLLADA, but I have not tested myself, or Assimp.
Let me know if you try any of these.
Also, let me know when glTF support in GLBoost is in a state you are happy with and we'll list GLBoost here: https://github.com/KhronosGroup/glTF#webgl-engines
@pjcozzi Thank you for your reply. I'll check those other tools and report the results :smile:
Also, let me know when glTF support in GLBoost is in a state you are happy with and we'll list GLBoost here: https://github.com/KhronosGroup/glTF#webgl-engines
Wow! It's my great pleasure for GLBoost to could be listed there! my friends and I are making the library better gradually. and we are going to try human skinning animations support using glTF. When we get the progress, I'll let you know that. Thank you!
@pjcozzi I tried Cesium's converter, but the same problem happened. I posted feedback to Cesium's forum. http://cesiumjs.org/forum.html Next, I'm now trying Autodesk FBX to glTF converter. but the build steps are a little too much work. :sweat_smile:
@cyrillef are there pre-built binaries for your FBX to glTF converter?
@emadurandal I suspect Cesium's converter issue is the same bug as COLLADA2GLTF.
@pjcozzi - I'll post them asap - I am just back from the trip to Montreal
@emadurandal When I open your attached COLLADA file in Blender I see this:
Is the file you attached correct?
@lasalvavida also try Visual Studio or Mac preview incase the Blender importer has an issue.
@pjcozzi I'm not sure if Visual Studio can play animations, either way I opened it in this viewer and it displayed correctly, so it must be an issue in Blender. It is interesting that Blender and COLLADA2GLTF have a similar issue, so the culprit may be OpenCOLLADA.
@lasalvavida @pjcozzi I apologize for the late reply. I'm relieved that my attached COLLADA file appears to be correct.
I've been playing with this a bit, and I think I understand what's happening, but I don't have a fix yet.
Maya is pivoting around a point by translating, rotating and then translating back
COLLADA2GLTF flattens these transformations to make the node matrix
However, the animation targets , which just gets naively applied to the node matrix
It should be fairly obvious that
One possible avenue would be to force animations in situations like this to be in matrix form and apply the proper transformation to each keyframe as shown for this example
@emadurandal Sorry for the long wait. This should get fixed by #684.
Hi there.
I tried latest COLLADA2GLTF, but I found a little weird covert result.
Look at this maya scene file (group_pivot.mb in attached zip file). In this scene, there is a group whose pivot position is moved to (0, 5, 0). You can see this animation scene at https://youtu.be/-BME5VZRDUQ
I exported this scene to collada file (group_pivot.dae) using ColladaMaya exporter. I checked that this collada file is correct. Because MacOS preview function showed correct animation. https://youtu.be/NwhLpZD2gBM
Then, I converted this collada file to gltf file (group_pivot_original.gltf, group_pivot.bin, group_pivot0FS.glsl and group_pivot0VS.glsl) using COLLADA2GLTF. But Its data (group_pivot_original.gltf) seem wrong.
This video is the result of group_pivot_original.gltf using my original WebGL library, GLBoost. It’s wrong animation as you can see. https://youtu.be/ZapNp3LNB6A
I think that the cause is the following part (in group_pivot_original.gltf).
So, I fixed the data (group_pivot_fixed.gltf) as following.
Then, My GLBoost Renderer showed correct Animation. https://youtu.be/zyV3JKvEZqE
In conclusion, I think that COLLADA2GLTF should export like group_pivot_fixed.gltf, not group_pivot_original.gltf. Or, If there is a pivot infomation in glTF spec. COLLADA2GLTF should export it. I guess that this problem is caused by COLLADA2GLTF’s bug, not my GLBoost library’s bug.
group_pivot.zip