Hello. In the game, the model’s head is loaded dynamically, and is loaded from the server. I noticed that the texture quality is worse than it was in the photo, and by trial I noticed that the quality becomes perfect when the light is turned off. I turned on the lightmapped parameter and everything worked correctly with the light on, but the texture is not very dark. Experimenting with the model in the editor, I configured it by setting the same image for emissiveMap as for diffuse Map. But when I do it dynamically after loading, the texture remains dark. Here is the code
this.app.assets.loadFromUrl(path,'container',(a,b)=>{
this.test.addComponent("model", {
type: "asset",
asset: b.resource.model
});
this.test.model.lightmapped = true
const texture =this.test.model.meshInstances[0].material.diffuseMap
this.test.model.meshInstances[0].material.emissiveMap = texture
this.test.model.meshInstances[0].material.update()
})
Tell me the solution