Forum

Object's Transparency control

12 October 2018 22:02
Srg
I need to attach the gradual transparency control to the object, so the user can move a slider and the transparency of the object will go from “opaque” to “transparent”. Can you suggest the way to achieve this? Thanks in advance.
15 October 2018 10:41
you need to set the material type to "Alpha Blend" or "Alpha Sort". and change the transparency via script.

for non-node materials:
https://www.blend4web.com/api_doc/module-material.html#.set_alpha_factor

for node materials:
create a node value which is connected to the materials alpha channel.
then use https://www.blend4web.com/api_doc/module-material.html#.set_nodemat_value to set the value node
 
Please register or log in to leave a reply.