Opacity by alpha or image as a mask

Discussions regarding Materials, Material-Compounds or Shaders, etc.
Post Reply
User avatar
Leandro Oliveira
Posts: 45
Joined: 25 Aug 2009, 20:58
Location: Brazil
Contact:

Opacity by alpha or image as a mask

Post by Leandro Oliveira » 21 Oct 2009, 21:33

Hi,

I have a bottle and I want to apply a label with texture, but the background of this texture must be transparent. How can I make this?

Cheers,
------
Leandro Oliveira
www.leandrooliveira.com

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: Opacity by alpha or image as a mask

Post by Hirazi Blue » 22 Oct 2009, 09:17

Sorry, I don't understand (but that could just by me, I hasten to add! :D )
You want to place a label on a bottle, that much is clear, but what do you mean
by "the background of this texture must be transparent"?
Do you mean, that the unlabeled part should be transparent,
or do you mean something else?
:-\
Stay safe, sane & healthy!

User avatar
Leandro Oliveira
Posts: 45
Joined: 25 Aug 2009, 20:58
Location: Brazil
Contact:

Re: Opacity by alpha or image as a mask

Post by Leandro Oliveira » 22 Oct 2009, 13:33

Hi Hirazi,

I remembered a solution for my problem: use the channel Cuttout of the Archtectural shader. It works! I made a mask (a black and white image - Black = 100% transparent / White = 100% opaque) of my texture and used it. But, how can I make this using a default shader (like Phong)? There´s no opacity channel in the default shaders....

Cheers,
------
Leandro Oliveira
www.leandrooliveira.com

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: Opacity by alpha or image as a mask

Post by Hirazi Blue » 22 Oct 2009, 13:53

Simply plug the image into the transparency port of the shader?
You'll probably have to check the "invert" check box on the Transparency Tab...
Stay safe, sane & healthy!

User avatar
Leandro Oliveira
Posts: 45
Joined: 25 Aug 2009, 20:58
Location: Brazil
Contact:

Re: Opacity by alpha or image as a mask

Post by Leandro Oliveira » 22 Oct 2009, 18:46

Thanks, Hirazi. It worked!

But the transparency seems not to be 100% clear... I´ll make more tests and I´ll give you a return.

Thanks, again.
------
Leandro Oliveira
www.leandrooliveira.com

User avatar
Rork
Posts: 1359
Joined: 09 Jul 2009, 08:59
Location: Close to The Hague, Netherlands
Contact:

Re: Opacity by alpha or image as a mask

Post by Rork » 23 Oct 2009, 10:08

leandro,

have a look at the sprite node. The basic shaders have the annoying 'feature' to still have a specular on the transparent part driven by the alpha.
With the sprite node this is gone, and with multiple objects behind each other, rendering is much faster when using the sprite node.

There are some threads on stuff like this on XSIBase, just have a search ;)
And if I'm not mistaken, there was an old 'bottle label' tutorial on ed harriss his website.

rob
SI UI tutorials: Toolbar http://goo.gl/iYOL0l | Custom Layout http://goo.gl/6iP5xQ | RenderManager View http://goo.gl/b4ZkjQ
So long, and thanks for all the Fish!!

User avatar
Leandro Oliveira
Posts: 45
Joined: 25 Aug 2009, 20:58
Location: Brazil
Contact:

Re: Opacity by alpha or image as a mask

Post by Leandro Oliveira » 23 Oct 2009, 14:15

Thank you, Rork.

I´ll study this shader. I´ve found the Ed Hariss´s tutorial about alpha channel. I´ll take a look on it, too.

Thanks.
------
Leandro Oliveira
www.leandrooliveira.com

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests