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

FBXLoader: model having some parts at wrong positions after loading #15287

Closed
3 of 13 tasks
DucNguyenPTIT opened this issue Nov 20, 2018 · 22 comments
Closed
3 of 13 tasks
Assignees
Labels

Comments

@DucNguyenPTIT
Copy link

DucNguyenPTIT commented Nov 20, 2018

Description of the problem

I’m using FBXLoader to load my .fbx model, without modifying its position. The loading succeeded, but the model appeared to have some of its parts standing at wrong positions. I tried viewing the model with 3D Viewer and saw that it’s absolutely OK. I was reported that this problem is due to the latest update of FBXLoader. Please fix it soon! Thanks a lot!

Here is the loading code:

var fbxLoader = new THREE.FBXLoader();
fbxLoader.load('baotang.fbx', (object) => {
    object.traverse((child) => {
        if (child.isMesh) {
            child.castShadow = true;
            child.receiveShadow = true;
        }
    });

    scene.add(object);
)};

Here is the error scene: (the big ball, the light and the black plane was added for other purposes. I’ve tried loading the model without them and can confirm that they have no relevant to the problem)
image

Viewing the model with 3D Viewer:
image

Here is the link to download the model for testing

Three.js version
  • Dev
  • r98
  • ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
@DucNguyenPTIT DucNguyenPTIT changed the title FBX model having wrong positions after loading FBX model having some parts at wrong positions after loading Nov 20, 2018
@mrdoob mrdoob added this to the r99 milestone Nov 20, 2018
@donmccurdy donmccurdy changed the title FBX model having some parts at wrong positions after loading FBXLoader: model having some parts at wrong positions after loading Nov 24, 2018
@pikilipita
Copy link

I am experiencing similar issues, but only with rigged fbx files exported from Cinema 4D

@mrdoob mrdoob modified the milestones: r99, r100 Nov 29, 2018
@mrdoob mrdoob modified the milestones: r100, r101 Dec 31, 2018
@mrdoob mrdoob modified the milestones: r101, r102 Jan 31, 2019
@mrdoob mrdoob modified the milestones: r102, r103 Feb 28, 2019
@mrdoob mrdoob modified the milestones: r103, r104 Mar 27, 2019
@mrdoob mrdoob modified the milestones: r104, r105 Apr 24, 2019
@mrdoob mrdoob modified the milestones: r105, r106 May 30, 2019
@yazancash
Copy link

i have the same problem with Mixamo FBX animated models.

@mrdoob mrdoob modified the milestones: r106, r107 Jun 26, 2019
@mrdoob mrdoob modified the milestones: r107, r108 Jul 31, 2019
@TripNRaVeR
Copy link

i also came by this issue and after two days of messing arround i have fixed it by loading the fbx like this:

					loader.load( 'model.fbx', function ( object3d ) {
					object3d.traverse( function ( child ) {

					let material = child.material;

					let mesh = new THREE.Mesh(child.geometry, material);

					if ( child instanceof THREE.Mesh  ) {
						const wireframeMaterial = new THREE.LineBasicMaterial( { color: 0x000000 } );
						const wireframe = new THREE.LineSegments( new THREE.EdgesGeometry( child.geometry ), wireframeMaterial );
						mesh.add( wireframe );
						
					}

					mesh.applyMatrix(child.matrix); //this fixed it
					
					scene.add(mesh);

if you need more info or help just hit me up, hope this helpes you guys in solving it correctly

@mrdoob mrdoob modified the milestones: r108, r109 Aug 27, 2019
@KaikePing
Copy link

meet the same issue with fbx exported by Cinema 4D

@BVR83
Copy link

BVR83 commented Jan 21, 2020

Thank you for your fast and honest reply.

To all struggling with this issue, for static objects making sure all pivots are zeroed out help me out.

@pikilipita
Copy link

Hi, we also encounter this issue with some fbx files, using an older version of the fbx loader usually give better results. For some reason some fbx files that used to be loaded correctly are glitchy on the newest versions of the loader.

You can try this (old) version:
http://xr.plus/tmp/FBXLoader1204-fix.js.zip

Let me know if it helped

@mrdoob mrdoob modified the milestones: r113, r114 Jan 29, 2020
@mrdoob mrdoob modified the milestones: r114, r115 Feb 29, 2020
@mrdoob mrdoob modified the milestones: r115, r116 Mar 25, 2020
@mrdoob mrdoob modified the milestones: r116, r117 Apr 30, 2020
@mrdoob mrdoob modified the milestones: r117, r118 May 27, 2020
@mrdoob mrdoob modified the milestones: r118, r119 Jun 24, 2020
@mrdoob mrdoob modified the milestones: r119, r120 Jul 29, 2020
@mrdoob mrdoob modified the milestones: r120, r121 Aug 25, 2020
@mrdoob mrdoob modified the milestones: r121, r122 Sep 29, 2020
@mrdoob mrdoob modified the milestones: r122, r123 Oct 28, 2020
@mrdoob mrdoob modified the milestones: r123, r124 Nov 25, 2020
@mrdoob mrdoob modified the milestones: r124, r125 Dec 24, 2020
@mrdoob mrdoob removed this from the r125 milestone Jan 12, 2021
@mrdoob mrdoob closed this as completed Jan 12, 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

9 participants