Giter VIP home page Giter VIP logo

Comments (8)

javagl avatar javagl commented on May 28, 2024

The fact that the "ice fragments" are shown the whole time is probably an issue of three.js. At least, the ice fragments are not displayed in other viewers:

shooterscreenshot

(Left: JglTF, Right: Cesium)

However, you can see that there is another issue with the transforms: The gun is not transformed properly. Right now, I cannot say if (or how) this is caused by COLLADA2GLTF, or whether there is something wrong with the COLLADA input file.


BTW: During the conversion, it prints

WARNING: matrix can't be decomposed

several times. The message comes from

if (!unmatrix(tr, tran) && (translation || rotation)) {
with the only call being at
GLTF::decomposeMatrix(matrix, translation, rotation, scale);
, but this might only be caused by the fact that the scaling factor of the "ice fragments" is (0,0,0) when outside of the "icing" animation - I'm not sure whether this is related to this issue.

from collada2gltf.

skalexey avatar skalexey commented on May 28, 2024

Thanks a lot for the answer. Yes, the problem with gun is also present here and the gun is also moves in Three.js as if it controlled by bones of legs and not involved in "shooting" sequence of the animation at all.
I will try to investigate problems in Three.js.
The message
WARNING: matrix can't be decomposed
occurs very often, I already have investigated this problem and found that there are lots of matrices like
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 1
whose determinant is 0 in animations data of Collada .dae file. I don't know is it the reason of Blender's exporter, or is it should be so, but such model somehow rendered properly by all Collada viewers. In my local version of collada2gltf I just replace such matrices by identity matrix
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1 ,
but this doesn't fix any of existing problems.

from collada2gltf.

skalexey avatar skalexey commented on May 28, 2024

As it turns out from the related three.js issute the problem of ice bones and meshes is caused by Three.js and the problem of the gun is caused by collada2gltf when some bones have dots in their names.

from collada2gltf.

skalexey avatar skalexey commented on May 28, 2024

I am on a commit 503473979b6627ffbe8a63b006c2609de7d30461 now and there is no such problem with the gun transformation. If I compile from this commit with replaced dots with underscores in bones names then I have finally got expected result:
shooter_gltf_normal.mov.zip

from collada2gltf.

pjcozzi avatar pjcozzi commented on May 28, 2024

@skalexey thanks for narrowing this down. If you find a fix, a pull request would be appreciated.

from collada2gltf.

donmccurdy avatar donmccurdy commented on May 28, 2024

I'm not sure what the difference is, but FYI this model is animating correctly when exported from the glTF-Blender-Exporer:

d0a1932b-29c5-4ebc-adf5-af6960327639-37566-00008676735b272d

shown in three.js r85

from collada2gltf.

javagl avatar javagl commented on May 28, 2024

I'm pretty sure that the rifle is not animated correctly, but of course, it's hard to tell at which point in the pipeline this error is introduced: In the renderer, the converter, or whether it's already part of the input file (that's why I'm always proposing (and trying to create) sorts of "unit test" models...)

from collada2gltf.

donmccurdy avatar donmccurdy commented on May 28, 2024

here is three.js (using a glTF from the blender exporter) vs the expected animation reference video provided by the OP:

reference three.js
369bb394-c07a-475f-b03b-f34f96828edd-57215-00009fa99b7133e9 27466100-f4d239d2-578c-11e7-8541-516ee49f05cc

there is a section that seems slightly different (when the character starts walking immediately after breaking out of the ice, the torso doesn't animate?) but (never mind i think i was comparing the wrong sections of animation...) the rifle looks the same to me.

from collada2gltf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.