Can we load GLTF material is MeshBasicMaterial instead of MeshStandardMaterial

Hello all,
Can we force load MeshBasicMaterial instead of MeshSanderMaterial by default. I export gltf from Blender.
Thanks for any suggestions

It’s not possible to configure the loader so is uses MeshBasicMaterial instead of MeshSanderMaterial. You have two options:

  • Export your glTF asset in Blender such that it uses the KHR_MATERIALS_UNLIT glTF extension.
  • Replace the materials after loading in three.js by traversing through gltf.scene and updating all meshes.
1 Like

A simple way to do this in Blender is to hook an Image Texture or color directly to the “Surface” output:

You can also convert glTF materials to use the KHR_materials_unlit extension offline:

gltf-transform unlit input.glb output.glb

Currently, I using the second way but I want to ask about performance(Like memory). I think I will learn about glTF extension.

Using unlit materials will perform better than PBR materials. Besides, the replaced material objects are going to be GC-collected. So I don’t think you have to worry about performance.

1 Like

Cool, I get KHR_materials_unlit when I connect Image node to Surface socket output. But if I only use Base color, not image. How I can make it. I export glb(not gltf). So I can’t open gltf file and change json file.

I don’t understand about this. Can you explain more about it. Thank you

I just find the way to do this :D. Thank you

Thanks for your information :blush: