Setting material parameters on downloaded meshes

Hi. I am setting material params on regular meshes in my scene fine using the following syntax

meshInstance.setParameter(“material_emissiveIntensity”, 1);

However when it comes to doing the same with remotely downloaded glb meshes the setParameter doesn’t seem to do anything to the material. The mesh instance exists and is being referenced correctly it seems. Maybe my understanding of setParameter is wrong as I can no longer find any help on it.

There is no difference in handling remote or local models. Once the model is loaded a mesh instance is a mesh instance. Make sure you are setting the parameter only after the model is loaded.

Yes I am definitely doing this already. The console is returning a mesh instance node name before I attempt to modify the material parameter. Maybe when a model is downloaded from a glb the materials need setting up in some way to configure them so they are similar to the ones in the editor?

Hmm. Nope, if the GLB includes the textures, then you don’t need to do anything else. I would have to try it myself. Nothing comes from the top of my head for now.

Okay, thanks for the info. I will keep looking into it and report back once I resolve it. Cheers

I think it may be something to do (or similar) with this: Emissive Intensity not affecting emissiveMap without Color · Issue #188 · playcanvas/engine · GitHub

Although the bug was was fixed if I set my material_emissiveIntensity on my regular objects manually everything works but doing this on downloaded models doesn’t work. I can only think this is because of another setting in the downloaded materials that is preventing the change…ie there is no tint set or something else. Is there a list of setParameter settings somewhere I can use to try to adjust things?

To clarify: I can set
meshInstance.setParameter("material_emissive", [1, 0, 0]);
meshInstance.setParameter("material_emissiveIntensity", 0);
makes no difference.

Setting intensity to zero is the same as disabling it. Is it just an example? Setting it to 1 and having a specified color for emissive, like in your example, should make it reddish.