Hello!
I am creating the 3D Viewer for some model formats. In my scene, some of the FBX models appear black.
The model example is attached.
Mojo_Idle.zip (3.5 MB)
Hello!
I am creating the 3D Viewer for some model formats. In my scene, some of the FBX models appear black.
The model example is attached.
Mojo_Idle.zip (3.5 MB)
As far as I understand the problem is only with MeshPhongMaterial.
Do you mind sharing the model with all of its textures? When drag’n’drop the model into the three.js editor, you can see a whole set of textures FBXLoader
tries to load:
You can achieve the same result by iterating through the loaded model and set the map
property of the materials to null
. Do this in your onLoad()
callback:
object.traverse( function ( child ) {
if ( child.isMesh ) {
child.material.map = null;
}
} );
The problem is that the “empty” textures result in a black color which makes the vertex colors not visible anymore.
I understand what you mean, but I don’t understand why in the same causes another 3D Viewer (like https://3dviewer.net/) shows this:
and my shows this:
For this model also some materials appear as black, but all textures were loaded
89-fbx.zip (1.2 MB)
For this model also some materials appear as black, but all textures were loaded
89-fbx.zip (1.2 MB)
Sorry, in that case, the problem is with a lighting
I’ve just replaced the model in webgl_loader_fbx with Mojo_Idle.fbx
, removed the animation related code and set the map
properties to null
. Maybe you can use the same approach to easier find out what’s missing in your app.
Yeah, if I set material.map to null
I see the result like in another 3D Viewer.
Thank you. Sorry for my stupid)