User toggles object transparency?
20 August 2016 00:13
I have a scene with buttons elsewhere on the page that allow the user to change object colors via m_mat.set_diffuse_color.
I'd like to do the same with transparency. Objects saved in blender with transparency display nicely with blend4web, but I don't know how to change the transparency setting dynamically.
I read the section here https://www.blend4web.com/doc/en/materials.html and see that the material alpha value is not used by the engine. I don't see how to use the alpha channel of a texture. I couldn't see anything further in the API.
Thanks!
I'd like to do the same with transparency. Objects saved in blender with transparency display nicely with blend4web, but I don't know how to change the transparency setting dynamically.
I read the section here https://www.blend4web.com/doc/en/materials.html and see that the material alpha value is not used by the engine. I don't see how to use the alpha channel of a texture. I couldn't see anything further in the API.
Thanks!
20 August 2016 05:41
20 August 2016 06:17
20 August 2016 08:28
Hey Joel, and welcome to the Blend4Web forums!![smiling]()
Glad you figured it out! See also the dedicated code snippet for material API usage.

Glad you figured it out! See also the dedicated code snippet for material API usage.