Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 31-08-2013 , 08:33 AM
Registered User
Join Date: Mar 2013
Posts: 38

Color with Alpha channel?

Hello, I just textured my model and have alpha channel in the diffuse/color. How do I set this up in hypershader? I have only set up plain diffuse before.

# 2 31-08-2013 , 12:00 PM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522
Please elaborate. You plugged the alpha into the diffuse color? Could you show pictures of what you're trying to do and what you've done so far?


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
# 3 31-08-2013 , 08:06 PM
Registered User
Join Date: Mar 2013
Posts: 38
No, What I mean is, I made a texture with an alpha channel built in. But I don't know how to set it up in hypershade material to display color and use the alpha channel too.

# 4 31-08-2013 , 09:59 PM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522
Pop open the connection editor. The quickest way to do that if you have Hypershade open is to just middle mouse drag and drop the texture onto the shader and choose "other" from the popup menu (or just hold shift and middle mouse drop, it immediately opens the connection editor).

The column on the left lists attributes from the texture, the column on the right lists attributes of the shader. In the left column, scroll down until you find "Out Alpha", left click it and and it will highlight then scroll down on the right column until you find the attribute you want to control, for example "Transparency", left click that and the connection is made. Since some transparency attributes use RGB values, you'll have to click on the little (+) icon next to the attribute to expand and further click on all three channels to connect the out alpha to them.(see pic)

This might lead to inverted transparency because Maya interprets black as opaque and white as transparent so you can:


Create a "Reverse" node and plug the texture's out alpha into the reverse node's input( in this case its XYZ instead of RGB, big deal) first then drop the reverse node into the shader's channel.

I'll stop rambling here, if you have questions please ask. user added image

Note: In case things getting too cluttered in the connection editor or some attributes are not visible, there are filters under the "Left Display" and "Right display".

Attached Thumbnails

- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
# 5 01-09-2013 , 02:59 AM
Registered User
Join Date: Mar 2013
Posts: 38
It's not working, I tried to set outColor to Color also. If I do that, the color shows, but no alpha with or without that.

Well, it's kind of working. I can see through part of the model that has no alpha though.


Last edited by bpears; 01-09-2013 at 03:27 AM.
# 6 01-09-2013 , 03:34 AM
Registered User
Join Date: Mar 2013
Posts: 38
I tried using the reverse node, but I dont know how to assign the node to the material? Output to color doesnt work, output to transparency doesnt work. Do I use nodeState? Something else?

# 7 01-09-2013 , 06:08 AM
Registered User
Join Date: Mar 2013
Posts: 38
Well, I guess it doesnt really matter, it works perfect in the game engine for some reason. Oh well.

# 8 01-09-2013 , 06:34 AM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
# 9 03-09-2013 , 01:41 AM
clocker1's Avatar
Bored but busy
Join Date: Mar 2011
Location: Cleveland
Posts: 76
Awesome that u took the time to do this. Learned a thing or 4. Thanx!😃

# 10 03-09-2013 , 02:53 AM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522
Glad it helped <3.


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads