Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loading models exported from Daz3D #14996

Closed
8 tasks
ran-j opened this issue Sep 30, 2018 · 14 comments
Closed
8 tasks

Error loading models exported from Daz3D #14996

ran-j opened this issue Sep 30, 2018 · 14 comments
Labels

Comments

@ran-j
Copy link

ran-j commented Sep 30, 2018

I create a model in daz 3d, but when I export as a collada and try to load in three js I got this error

Uncaught RangeError: Maximum call stack size exceeded
    at SkinnedMesh.Mesh [as constructor] (three.min.js:14322)
    at new SkinnedMesh (three.min.js:25480)
    at buildObjects (ColladaLoader.js:3653)
    at buildNode (ColladaLoader.js:3467)
    at getBuild (ColladaLoader.js:219)
    at getNode (ColladaLoader.js:3680)
    at buildNode (ColladaLoader.js:3442)
    at getBuild (ColladaLoader.js:219)
    at getNode (ColladaLoader.js:3680)
    at buildSkeleton (ColladaLoader.js:3296)

My configs to export https://imgur.com/a/vCQmMCm

How Im loading

var loadingManager = new THREE.LoadingManager(function () {
    scene.add(modelRender);
  });

  var loader = new THREE.ColladaLoader(loadingManager);
  loader.load('./src/models/e/Teste.dae', function (collada) {
    var animations = collada.animations;

    if (animations.length > 0) {
      var avatar = collada.scene;
      mixer = new THREE.AnimationMixer(avatar);
      var action = mixer.clipAction(animations[0]).play();
      modelRender = avatar
    } else {
      modelRender = collada.scene;
    }

  });
Three.js version
  • Dev
  • r97
  • THREE.ColladaLoader: File version 1.4.1 || THREE.WebGLRenderer 96
Browser
  • [] All of them
  • [x ] Chrome
  • Firefox
  • Internet Explorer
OS
  • [] All of them
  • [x ] Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, ...)

GTX 1060
Core I5 4460
20 Ram

@mrdoob
Copy link
Owner

mrdoob commented Sep 30, 2018

Could you share the model?

@mrdoob mrdoob changed the title Daz3D models Error loading collada file exported from Daz3D Sep 30, 2018
@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 30, 2018

Your code looks correct. I guess there has to be a problem in the loader/file.

@ran-j
Copy link
Author

ran-j commented Sep 30, 2018

Sure I Will upload tomorow

@ran-j
Copy link
Author

ran-j commented Oct 1, 2018

@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 3, 2018

The DAE places nodes (the skinned mesh) within the hierarchy of bones/joints. ColladaLoader is currently not able to parse such files. I've tried to convert your file to glTF via COLLADA2GLTF but the outputted glTF does not render correctly in glTF-Viewer and sketchfab. I assume COLLADA2GLTF also has problems to process the file.

Is it possible to directly export to glTF from Daz3D? Or at least to FBX?

BTW: Your model contains textures with extreme resolutions and file sizes. Just G8MW_SuperJeans01.jpg(8000x8000) is 36,5 MB big! You definitely have to decrease the resolution of your textures if you want to serve your stuff over the web.

@ran-j
Copy link
Author

ran-j commented Oct 4, 2018

@ran-j
Copy link
Author

ran-j commented Oct 4, 2018

When I use https://github.com/mrdoob/three.js/blob/master/examples/webgl_loader_fbx_nurbs.html

I got

(index):89 Uncaught ReferenceError: Stats is not defined
    at init ((index):89)
    at (index):59
init @ (index):89
(anonymous) @ (index):59

@donmccurdy
Copy link
Collaborator

Converting to glTF with FBX2glTF gives a mostly-working result, although (1) there's a minor issue with the character's eyes, and (2) the textures are too large as @Mugen87 mentions — I get about 3-5 FPS.

@mrdoob
Copy link
Owner

mrdoob commented Oct 4, 2018

@ran-j
Copy link
Author

ran-j commented Oct 5, 2018

Uncaught TypeError: Cannot read property 'toString' of undefined
    at FBXLoader.js:2499
    at Array.forEach (<anonymous>)
    at AnimationParser.parseAnimationLayers (FBXLoader.js:2480)
    at AnimationParser.parseClips (FBXLoader.js:2365)
    at AnimationParser.parse (FBXLoader.js:2337)
    at FBXTreeParser.parseScene (FBXLoader.js:849)
    at FBXTreeParser.parse (FBXLoader.js:149)
    at FBXLoader.parse (FBXLoader.js:122)
    at FileReader.<anonymous> (Loader.js:197)

@mrdoob
Copy link
Owner

mrdoob commented Oct 5, 2018

Can you share the fbx too?

@looeee
Copy link
Collaborator

looeee commented Oct 7, 2018

The FBX should load after #15017, unfortunately it seems that transforms are not correct.

@ran-j
Copy link
Author

ran-j commented Oct 8, 2018

On windows 10 ~Mixed Reality View open normaly

https://imgur.com/a/Hqm46y1

@Mugen87 Mugen87 changed the title Error loading collada file exported from Daz3D Error loading models exported from Daz3D Jan 18, 2021
@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 18, 2021

Closing since the test files do no exists anymore.

However, #20932 should fix the issue for the FBX asset.

@Mugen87 Mugen87 closed this as completed Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants