[ISSUE]FBX model shows abnormal

Hi all,

To load a fbx model, I use the example https://threejs.org/examples/#webgl_loader_fbx, but still failed to load it normal.

the normal model should be:(using playcanvs and unity)

using FBXLoader of three.js, it shows like:

seems that it shows abnormal, maybe not from the frame 1.

Any hints for this? Thanks in advance!

The model I used: https://drive.google.com/open?id=0B3fbDdDQNZVBMktFNmJydkVMVmc

1 Like

I opened an issue about this a a month or so ago here, but so far it seems to have slipped through the cracks.

Could you add your voice there?
It would be good to get some attention paid to this issue.

Also, do you know if this was exported from 3DS max?

Got it, thanks!

Yes, the model is exported from 3DS, but if I imported to blender then exported again, still the same issue.

Great, thanks! Also, if you do find a workaround please post it here, and I’ll do the same as I need to look into this over the next couple of days.

Right, I think I’ve found the reason - the FBXLoader doesn’t recognise transformed pivot points. I’ve closed the old issue and opened a new one here:

Okay, thank you!

Copied from the Gitub issue to continue the discussion here:

I found a solution! :champagne: :fireworks:
Tested with a very simple single jointed example.

It seems the GLTF2Loader does support transformed pivots. So the process goes like this:

  1. Install the blender gltf2 exporter
  2. Export the file as FBX from your preferred software.
  3. Load the FBX file in blender (needs to be binary format 2015 or earlier)
  4. Export as GLTF2 ( I used .glb binary format)
  5. import in three.js and the results for this simple example look like this, and the animations play correctly (with a bit of tweaking of exporter settings)

For reference the same file imported with the FBXLoader looked like this (see the github issue for full details)

I’ll be testing with more complex examples over the next couple of days, I’ll report progress here.

:+1:

sounds good, I will test my model as well.

1 Like

@johnny can you try adding this to your FBXLoader and see if it works for you?

Right before the line

var conns = connections.get( model.FBX_ID );

add

if ( 'GeometricTranslation' in node.properties ) {

   var array = node.properties.GeometricTranslation.value;
    model.traverse( function( child ) {

        if( child.geometry ) {

           child.geometry.translate( array[ 0 ], array[ 1 ], array[ 2 ] );

       }

   } );
}

@looeee, seems better than before, but still is abnormal, here is the result.

@looeee, I forgot to report that using glTF works well, it’s great! thanks very much, it is a workaround now.

the result is like:

1 Like

Great, glad the gltf route worked for you! Unfortunately for me, exporting my model from 3DS Max to blender seems to be impossible, so I’m still looking into fixing the FBXLoader. I’ve opened another thread here which I think might be related to your latest issues

By the way, what method did you use to export from 3ds max to blender?

@looeee, I just create model in 3DS MAX and exported as fbx file, then import the fbx model into blender, then exported it as glTF format using the plugin from link you sent.

@Johnny OK great - I think you were lucky then as when I load my FBX file in blender it looks like this

…and it’s not supposed to look like that.

FBXLoader.js (105.0 KB)

Hello @looeee,
Could you use my modified FBXLoader for testing with your model?
My solutions are:
- Geometric translation, geometric rotation, and geometric scaling relate to the object-offset concept in 3ds Max. These geometric transformations are applied to the node attribute after the node transformations. 3DMax document link
- Set material.vertexColors on / off match to geometry.attributes
Regards & hope to get your feedback soon.
LCD

1 Like

@Cong_Dan_Luong have you tried with the latest version of the FBXLoader? There have been a lot of updates in the past year, and transforms should be pretty close to the official FBX spec now.

Perhaps you could compare your version to the latest version, and if it offers any improvement, create a pull request on GitHub?

Here’s the latest version:

Hello @looeee,
I used your latest version, but it seems there’re some issues of model (sadly, my modified version has issues too.)
My github with test model here. Can you check the html file for testing?

I attached the screen shot to compare with Unity.
I appreciate if you can fix the issues for 3js community.

FBXLoader Regards,
LCD