How to apply metallic maps to mesh during runtime

Hi.
Is there a way to set the metallic map of a model during runtime? I cannot seem to know how to apply maps instead of just constant floats for the metallic value in Material.

Thank you.

Metallicity is AFAIK usually stored in the third channel of TextureStage.MSelector, so you would either have to replace the whole Occlusion/Roughness/Metallicity texture, or manipulate the channel at runtime. Here are my notes on the topic: pandacademy/geometric_modeling/pbr/pbr_model.py at master · TheCheapestPixels/pandacademy · GitHub

1 Like

Thanks for your reply. I will try out your solution soon.