Closed makc closed 7 years ago
I don't really wanna sign up that site. Can you (personally) share the file with us?
Let's see... looks like I can: Dentist's office.FBX.zip
Thanks. I confirmed. I'll look into...
I ran into the same error even I converted the file to ascii with Autodesk FBX Converter. So probably it isn't a binary parser issue.
Seems like missing some connection
data.
Can the file be loaded with other libs/viewers?
I asked them if the file may be truncated (as in: broken download). They said:
I tried the model on the desktop 3D viewer on windows and it opened fine
I tried the same to confirm, and my autodesk viewer does not claim any error:
OK, I see.
I speculate the file includes unused materials which don't have any connections. Probably we can ignore them.
Would you please try FBXLoader
in my branch that I updated?
https://github.com/takahirox/three.js/blob/FixFBXLoader/examples/js/loaders/FBXLoader.js
Can't test the project atm, but FBXLoader does now call onLoad with the file, at the very least.
var loader = new THREE.FBXLoader;
loader.load ('Dentist\'s%20office.FBX', function (done) {
console.log (done);
}, undefined, function (crap) {
console.log (crap);
});
Btw, getting a bunch of warnings here
THREE.MeshBasicMaterial: 'emissiveIntensity' is not a property of this material. THREE.FBXLoader: No implementation given for material type unknown in FBXLoader.js. Defaulting to basic material.
These two at least are very common and pretty self explanatory.
No implementation given for material type unknown in FBXLoader.js. Defaulting to basic material
THREE.MeshBasicMaterial: 'emissiveIntensity' is not a property of this material.
However given how common this is I think it would be more useful if the default was something other than MeshBasicMaterial
.
By the way I've tried importing this into 3ds max and then re-exporting and it loads
Both files are the same FBX version (7400), however interestingly the re-export is much larger (44mb vs 22mb)
I can't attach the re-exported file here as it's too big (it says there's a limit of 10mb, so how did @makc attach the original? 🤔 ).
@looeee Idk, I just dropped the zip into the input field. maybe you are emailing it, and it's your email limit?
@looeee still, I cant get textures on 20 mb model:
they are loaded but do not show up. was it the same for you before you re-exported?
@makc nope, was uploading on github on Chrome. It popped up an error saying I should try again with a file less than 10mb.
If you want I can share the file with you via Dropbox.
As for loading the original file, I was testing it on my loader here. It showed the same errors as you, then spewed a few more errors, something about textures but it crashed my console window before I could copy them.
From memory they were something like
Data64:blablabla..... Couldn't load texture someurl/door-fexture.jpg
About default material, agreed.
I think MeshStandardMaterial
would be better.
@takahirox and what about textures? how come they are loaded (network tab says so) but do not make it into materials? is it because the property name is not 'map' (for MeshBasicMaterial) ?
What are the texture names?
There are too many of them:
it also says this a lot:
(this is with the loader from your repo fork)
What I wanna know are not image files but texture names like "3dsMax|maps|texmap_reflectionGlossiness"
those I can only see in warnings, I did not make the file :) there are:
on repeat, not sure if I missed others
missed 3dsMax|maps|texmap_refraction
Oops, they aren't texture names but parameters in connection
that we call relationship. Anyways, they're what I wanted to know, thanks.
Currently we recognize the valid textures by using perfect match with only some types.
Probably we'd be better to do partial match with more types.
I've update FBXLoader
in my branch. Would you please try again?
Not sure how reflection[Glossiness] should be handled tho. Is that for roughness? Or envMap? I handle it as envMap so far.
And I ignore refraction so far.
If I'm right, it'd be for refraction of env map but Three.js doesn't support refractionMap yet both reflection and refraction at a time but just either one.
env map but Three.js doesn't support refractionMap
then what do you think are these:
THREE.CubeRefractionMapping THREE.EquirectangularRefractionMapping
They aren't texture settings.
Ah, I meant they aren't textures themselves but texture mapping parameters. I'm not sure how to apply the textures which indicates 'refraction'.
For examples, the bump textures should be set to material.bumpMap
but where refraction
textures set to?
The answer was in the same demo :)
The property names might differ for different materials, check the docs.
Wait, doesn't a material have both reflection
and refraction
textures in FBX file?
I already set reflection
texture to envMap so I'm not where refraction
texture set to.
reflection
is not for envMap but for others? (roughness?)
Can you list up what textures each material uses in the FBX file? Like
Now that, I think, 3js does not support ootb. @mrdoob or anyone feel free to correct me.
What's ootb?
out of the box. of course you can always just write your own shader.
Updated my comments above to clarify.
Can you list up what textures each material uses in the FBX file? Like
no, I am not fbx wizard or anything ) I see the same file you do, and have no more information about this file than you have.
Can you open another issue for FBX texture handling enhancement? I wanna fix the original "loading failure" issue and close this thread for now.
I am trying to find what file was that.