question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GLTF Model doesn't move with skeleton when using datGUI on mobile only.

See original GitHub issue
GLTF Model doesn’t move with skeleton when using datGUI on mobile only.

Describe the bug or feature request in detail. I have used GLTFLoader to load the model that was exported from blender with gltf-IO and datGUI to control the skeleton. It works flawlessly on desktop, but not on mobile. This for sure is true for Chrome 80 on Android 8. With SkeletonHealper I can see that bones are in fact moving, just not the mesh. Also, the light controls work.

    function render() {
        spotLight.position.x = guiControls.lightX;
        spotLight.position.y = guiControls.lightY;
        spotLight.position.z = guiControls.lightZ;

        scene.traverse(function(child){
            if (child instanceof THREE.SkinnedMesh){

                 child.skeleton.bones[123].rotation.x = guiControls.head_x;
                 child.skeleton.bones[123].rotation.y = guiControls.head_y;

            }
            //Seems to only produce errors
            // else if  (child instanceof THREE.SkeletonHelper){
            //     child.update();
            // }
        });

    }

Please also include a live example if possible. You can start from these templates:

Three.js version
  • Dev
  • r115
  • 110 fron cdnjs
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Huawei P9 Lite 2017

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
rihardsecommented, Apr 27, 2020

Confirmed - working with 200 bones

1reaction
Mugen87commented, Apr 24, 2020

It seems floating point textures are not supported. Depending on the amount of available vertex uniforms, complex skeletons won’t work on your device.

Your model has 556 bones which is noticeable more than the models from the official examples (e.g. the soldier has just 51 bones).

I suggest you use WebGL 2 if possible or simplify our model. In any event, it seems unlikely that this can be fixed on engine level.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Three.js select GLTF object from a dropdown with DAT.gui
I want to load a model selected from a dropdown list. There is only one model displayed at once, so I didnt want...
Read more >
How to load the same gltf model in threejs or react-three-fiber ...
the solution is gltfjsx. this is what allows you to re-use models. there is no counterpart for this in vanilla three, and they...
Read more >
Three.js Making a Game
So, first we need to include the utils. Above for each model we clone the gltf. scene we loaded and we parent that...
Read more >
Learn Three.js - Third Edition - Packt
Finally, you will learn to use morph and skeleton-based animation, ... The only browser where you have to take care of is the...
Read more >
Help with dat.gui and issues in Animation - three.js forum
I am rendering an animated 3D model from https://sketchfab.com/3d-models/hoverboard-d93296d2412b4997ae8cb96baaba5ccd which has 3 animations and 1 static ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found