Maya for 3D Printing - Rapid Prototyping
In this course we're going to look at something a little different, creating technically accurate 3D printed parts.
# 1 12-06-2007 , 05:56 AM
suraj's Avatar
Subscriber
Join Date: Aug 2004
Posts: 16

Surface Shader Alpha Issues (OSX)

Howdy friends,
Been having serious trouble getting a flat shaded model with a transparency mask.

Whether with the Surf.Shader or Lambert using Incandescence, the transparency gives off an additive effect (ie. goes white)

Its driving me bananas, Ive never hit a wall like this before.

Any solutions?

# 2 01-10-2007 , 10:58 AM
Registered User
Join Date: Oct 2007
Posts: 3
Did you find a solution to this? I'm having the same issue.

I have an image file of a "moon" textured to a plane, with a mask in the transparency. The idea is to only see a round moon but when I render in either surface or lambert shaders, there is a slight opacity visible in the part that's supposed to be empty.

I have to point out that when I do this in Lambert, this problem only happens when the image is mapped to the incandescence. Mapping to color gives a clear cutout. However, since this is a "moon" it should match the original image file. One solution is to map to color instead of incandescence and link it to its own light. Another workaround I found was to multiply the mask file with the image file and link them to incandescence while also linking the mask to the transparency. Not sure why this works but it seems to do the trick.

BUT, I still would like it to get it to work with a surface shader at least for the principle. It seems like such a simple logical procedure (image+mask=cutout) but for some reason it doesn't work.user added image

# 3 01-10-2007 , 11:29 AM
jsprogg's Avatar
Lifetime Member
Join Date: Feb 2004
Location: Chicago
Posts: 1,712
incandescence mapping works the opposite of transparency mapping in that black is what you want to be transparent and not giving off light on the incandescent map.
Your problem is most likely that your black on your map is not true black meaning 0 value, if it has a slight value it will still give off light so make sure you paint it with 0 value and it should work.




2 x Modeling Challenge Winner
# 4 02-10-2007 , 08:25 AM
Registered User
Join Date: Oct 2007
Posts: 3
Thanks for the suggestion. I went into Photoshop to check my alpha and got my hopes up when I realized that the black area had a value of 1 in RGB. I realized that I needed to save as a higher quality JPG to keep the value at zero, or save it as another format that didn't compress.

BUT unfortunately, the slight opacity was still there when I mapped the new file... :headbang:

So, the best solution I found so far was to multiply the image with the alpha and map to the color on the surface shader, and then map the alpha to the transparency (almost the same thing I'd tried with a lambert shader before except on a surface shader you dont have to adjust the incadescence).

What you said about incandescence is very interesting though. I had not realized that alpha does not mask incandescence the same way it masks color. I don't think it's just a matter of inverting the colors though. I tried inverting the black and white and the results were not even the opposite of what I had before. Do you know anything else about how incandescence and transparency work with each other?

# 5 02-10-2007 , 01:11 PM
Registered User
Join Date: Oct 2007
Posts: 3
UPDATE: OK, I have found the culprit.

I realize now that when you said to check the values on the map, I needed to do it not just for the alpha, but *especially* for the original image. The black around the moon in the original "incandescent" image had a value of 1 in Photoshop and this is the slight opacity that was sneaking into the render even when the alpha value there was zero.

I guess this means incandescence (whether as a common material attribute or just as a function of a surface shader ) acts upon (makes incandescent) the values it has mapped to it, regardless of the transparency/alpha mask. It's as if it were being calculated *after* the transparency, bringing back to "1" what the transparency had already brought down to "0". This is different from how mapping to color works.

Thanks for the help jsprogg!

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