Change material diffuse intensity

19 July 2016 16:00 #10608
Hi, thanks again for this powerfull SKD

I have an object with several faces and 2 materials. I assign first material to a specific face, and other material to another face

Now i try to change diffuse intensity, or emit factor for one material, but it seems to apply on both

var monObjet=m_scenes.get_object_by_name("coffre");

But emit is applied on both material (latest SDK version patched)
19 July 2016 16:39 #10610

I couldn't reproduce the issue. Could you prepare and send me a simple example with incorrect behavior please?

Blend4Web developer
20 July 2016 11:23 #10621

here it is.
20 July 2016 11:26 #10622
+blend file
21 July 2016 18:01 #10674

Indeed there is an issue - your materials are identical (except names) and the engine automatically batches them into a single mesh. As a workaround, try to change the color a bit so that they become different. Of course this is not good and we have to think how to resolve this problem. Thanks for the feedback!
Development Lead | Twitter
Please register or log in to leave a reply.