How to add texture into gltf models

I have this model I made in blender and I baked the textures in it so that I won’t need three.js shadows but I don’t know how to add the texture in the loaded gltf

Hi!
What model and what texture?
And what code for loading of the model?

you can just drop the baked image into the principled bsdf color node in blender as a regular texture. or do you plan to exchange it later, i wonder why you want to do it by code?

Examples of how to set up materials in Blender here —

https://docs.blender.org/manual/en/2.80/addons/io_scene_gltf2.html

If you don’t want the material to be affected by light at all (“unlit” i.e. THREE.MeshBasicMaterial) then you can connect a texture directly to the Surface socket of the Material Output node.

1 Like