Forum

[SOLVED] Combine a webcan stream and a transparent PNG in a same material

08 September 2017 17:56
Hi everybody,
I am trying to combine a webcan stream (canvas texture) and a transparent png (also canvas texture) in a same (node) material. But the PNG is geting transparent where it should remain opaque. I set webcam stream and the PNG also in 2 separate materials on separate object to compare the transparency. And it looks as I would like.

Here a screenshot to compare


Here the setup my nodes material combining webcam stream canvas texture with transparent PNG canvas texture


Here my Blend and js html css files in a zip
beSomething.zip

I think I have to better set the nodes to get the same effect as when the materials are applied on separated objects. But I don't know how.

Any clues ?

Thank you in advance !
08 September 2017 18:10
Try to connect Value output from transparent textue to Factor input in mix node. Like this:
Blend4web and that kind of thing.
09 September 2017 00:46
Thank you Mikhail !
You've brought me on the right path. It just needs an "invert" node in addition to get the result I wanted. Nodes look like this in the end:


Thank you very much

Problem solved !
11 September 2017 11:27
Thank you Mikhail !
You've brought me on the right path. It just needs an "invert" node in addition to get the result I wanted. Nodes look like this in the end:
Great! To avoid the Invert node you can just switch textures in the Color Mix node inputs.
Blend4web and that kind of thing.
11 September 2017 12:59
Ok, thank you for this tip !
 
Please register or log in to leave a reply.