View Full Version : Get my grunge details back in mib_color_mix? (or mix8Layer)
10-19-2009, 07:39 PM
I have been trying over the weekend to get this solved but in vain.
What I want to get is simply layering a grunge texture ( assigned to a Lambert shader or just a surface shader) on top of a mia material. But I lost great amount of details when layering shaders using either the mib_color_mix or mix8layer (haven't tried djx_color_mix yet). I use a really simple scene as a test.
Render of the grunge texture assigned to a surface shader.
I then save the grunge (only) with transparency as a TIFF.
Using mib_color_mix, pure white surface shader as the color_0. Grunge texture assigned to a 2nd surface shader and assign the 2nd surface shader to color_1. The shading network is:
And the render:
A lot of details are lost. I tried different blending modes as well as masks for the weight as mentioned by djx in his blog, but still the details are lost. How to get them back? (scene file attached)
Maya does not handle premultiplied colors very well when layering. In your example your color is faded in both the color and the alpha channel, so mib_color_mix is doubling up the effect. To fix it in this example you could make a selection from your grunge layer in photoshop and use it to create an alpha channel, then create a black layer under your grunge layer and merge the two. When you save the file this time, the transparency is only in the alpha channel, so maya will layer it correctly.
10-20-2009, 04:04 PM
Thank you David for taking the time. :)
I did some more tests based on your suggestion, but unfortunately it still is not working. I think the problem is rooted from how these mib_color_mix or mix8layer (haven't tried your djx_color_mix just yet) handle semi-transparent texture and its alpha.
To clarify the problem, I save the PSD shown below as a TIFF without alpha, and render with a single layer mib_color_mix. All the grunge details are preserved.
Then, I did what you mentioned, create an alpha based on the grunge, merge the grunge layer down with the black layer (get rid of the yellow first), save it as TIFF with alpha,
Set up the mib_color_mix as you mentioned in the blog post, including the (reverse) alpha for weight_0 and weight_1. The grunge details are still lost in the render.
I played with different blending modes or ways of using alphas in the "weight" slot, but I just couldn't figure a way to make the grunge layer on top of the base just like seen in Photoshop. There is got to be a way to set up a dirt layer on top of the base paint while preserving all details right??
scene file and texture PSD in here if you are interested: scene and PSD (http://rcpt.yousendit.com/757701247/addb1ae88e2aac7bce452578ba275eec)
Your alpha channel is not correct. When I open your psd and look at the alpha it is very dark, and I'm guessing you made it based on the luminance of your grunge layer.
What you need to do is ctrl-click on the grunge layer to get a selection based on transparency, then in the alpha channel, start with black and use that selection to fill with white. You should see a much brighter result. I've uploaded my version here (http://www.djx.com.au/cgtalk/grunge/grunge_DJ001.zip).
10-21-2009, 02:31 AM
YOU ARE THE MAN!!! It works! :beer:
10-21-2009, 02:31 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.