I created a basic model in Blender, UV mapped it to a color pallet, and exported as .glb. When I load this model in directly, the colors are displayed exactly as on the pallet. The colors are gray, red, and blue.
However, I want more of a cartoony look without reflections so I decided to try the BasicMeshMaterial to load the pallet.
glb.scene.traverse(function(child){
if ((<THREE.Mesh>child).isMesh){
var texture_loader = new THREE.TextureLoader();
var basic_mat = new THREE.MeshBasicMaterial({map: texture_loader.load('./assets/3d/pallet.png'),});
(<THREE.Mesh>child).material = basic_mat;
}
})
Also the MeshLambertMaterial (with reflections)
You can see in both examples that the gray changes to tan and the red turns to purple. Any idea what’s going on? Am I missing a specific map for these materials? This happens when I use any specific material instead of the default when the object is loaded.
Here’s an example of of the gray exterior mapped in Blender:
Heres the model if you want to take a look:
ship.glb (78.3 KB)
Any help is greatly appreciated!