maya tranparency alpha issue

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

View Poll Results: Was this question useful
very 3 100.00%
sort of 0 0%
meh 0 0%
not at all 0 0%
Voters: 3. You may not vote on this poll

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 11 November 2013   #1
maya tranparency alpha issue

Hi there I'm having a maya transparency alpha issue with mia material x. I am currently trying to create a transparent insect wing that I can composite onto a background that I will apply affects to. The alpha that I currently get is opaque even with propagate alpha selected. The issue might be to do with the fact that I am using a layered shader... My thinking is that that creates issues with interactions of the different layers. Anyway I just need to find a way to create a file who's alpha map treats the transparency as alpha... however I also need to preserve reflection. Refraction is a minor concern because it is an insect wing. The image attached is a still I took in after effects to illustrate what I mean. As you can see the green camera background is still in evidence.


Thanks
Attached Images
File Type: jpg transparency issue.jpg (55.2 KB, 19 views)
 
Old 11 November 2013   #2
There is a simple method to set the alpha: put a surfaceShader between the mia_material and the shadingEngine, then put the according node into the surfaceShaders "outMatteOpacity" attribute to control the alpha.
First disconnect mia_material.message from shadingEngine.miMaterialShader, then connect mia_material.result with surfaceShader.outColor, at last connect the surfaceShader.outColor with shadingEngine.surfaceShader. All remaining connections between the mia_material and the shadingEngine leave untouched.
 
Old 11 November 2013   #3
Thank you for your reply... i used a layered shader... So that mia material already has a surface shader on it piped into the layered shader. This sort of thing is difficult to explain I suppose without the source files.
 
Old 11 November 2013   #4
Basically there is no shading group directly on the mia material from what I can see... just on the surface shader.
 
Old 11 November 2013   #5
The shadingEngine is the node that associates shaders with geometry, so there must be one. Just connect a new surfaceShader between its shading input and manipulate the matte opacity.
 
Old 11 November 2013   #6
diagram of my shader (crude)

Feel free to make fun of my writing and spelling but I attempted to diagram the shader that I used. I assumed that this was simple and that people would have seen something like this but apparently not. I have created a layered shader connected to a surface shader that is then applied to the model. Each different material is layered using alpha layers. The bottom layer is a body layer followed by a metallic body layer followed by the transparent front wing layer followed by the iridescent wing layer for the rear wings. The issue is that the front wing does not composite as a transparent but as a solid object. Is there a way to do this that does not involve me throwing my computer out the window? Stupidly I converted all my mia material x to mia material x passes because I thought that that would help but in the end that was a dead end because not all my materials in the scene are pass compatible. I tried checking propagate alpha... nothing! Anyway I know that there are crazy geniuses on this site who love programing and looking at pixels so help me out here.


Thanks
Attached Images
File Type: jpg crude-diagram.jpg (78.0 KB, 11 views)
 
Old 11 November 2013   #7
Maybe a maya 2014 issue?

I don't see a shading engine anywhere and I can't figure out how to bring one up... There isn't one listed under shading groups.
 
Old 11 November 2013   #8
Red the surfaceShader which matteOpacity you can use, blue the shadingEngine.
[/img]
 
Old 11 November 2013   #9
Ok I'll give this a try... thank you for your help by the way... Maya had been easy until I ran into this issue...
 
Old 11 November 2013   #10
Ok let me see if I have this correct. If I turn the matt oppacity of that surface shader to zero then all areas with transparency should register as clear when composited? I'm going to attempt this. If this works by the way I'm going to mail you some beer from Canada.
 
Old 11 November 2013   #11
Did not work... at least the way I did it

Hi there,


it didn't work. At least not the way I did it. Instead It turned the whole thing clear when compositing. So I was unable to isolate just the wing opacity. That particular surface shader is for the entire layer shader. Maybe I should have use the surface shader applied to the wing texture?


Thanks... delicious beer is riding on your ability to answer.
 
Old 11 November 2013   #12
I guess what I just thought of now is that I could change the matt opacity of the surface shader connected to the clear wing material to zero and then I guess do a separate reflection pass to make up for the lost reflections that result from the alpha applied to the wing... not too sure at this point... kind of lost.
 
Old 11 November 2013   #13
Ok set the network back to the state where the reflection worked and the file alpha was opaque. Then connect the wings mia_material.resultA to the (red marked) surfaceShader.matteOpacityRGB (all three single components). This at least should give your rendered images the alpha which the wings would have if they would have the mia_material shader alone applied.

PS: you better assign a separate surfaceShader with the modified alpha to your wings, otherwise the remaining body parts will also get the wings mia_material matte opacity

Last edited by zaskar : 11 November 2013 at 01:30 PM.
 
Old 11 November 2013   #14
Of course if they had that opacity they would have no opacity at all would they? Mia material x is interpreted differently than a transparent blinn. I'll try it at least.
 
Old 11 November 2013   #15
Just saying that if you assign a single surface to all of your bodyparts its a bit difficult to let the peculiarities of the different materials (such as blinn and mia_material) come into play. The renderer looks into the shadingEngine which material is connected to a surface and shades the pixel accordingly. If you have additional materials buried deep in your network, their alpha contribution doesnt count if those materials output stream only leads to the SG using their color channels.

So if the node which connects into the SG.surfaceShader is a surfaceShader, then its matte is the only point where you can set your files alpha. Thus i wrote if the wings base mia_material (assigned ro the wings for its own) returns a sufficient alpha in file, connect its .resultA into the surfaceShader matte channel to get back its alpha contribution.

Now if this single shadingEngine serves for all bodyparts, the renderer will be put into the mia_material as soon if the renderer checks the matte channel of the surfaceShader, and your dragonfly would be completely semi transparent in your files alpha, thus you are better with different surfaceShader for wings and opaque bodyparts.

Last edited by zaskar : 11 November 2013 at 06:42 PM.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:01 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.