3d model has no texture, it is black, how to add texture?

3d model has no texture, it is black, how to add texture?image

The black color can be caused by many reasons. For example there are no lights in your scene or you haven’t loaded your texture correctly. Can you please share the asset and your code in this thread? If it’s a glTF asset, you would normally do something like:

gltf.scene.traverse( function ( child ) {

	if ( child.isMesh ) {

	    child.material.map = texture;


} );

Notice the notes in documentation for GLTFLoader when applying textures manually:


Hello, I used Pix4D for 3d modeling to get the obj model and texture (MTL + JPG), I don’t know how to load the JPG.

Uploading: protest.zip…

It’s seems something went wrong during your upload…

Anyway, the following example demonstrates how to load OBJ/MTL files. Maybe it’s a good resource for your own code: