MIB Color Mix

Become a member of the CGSociety

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

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  06 June 2013
MIB Color Mix

I've watched a couple of tutorials about this node but it doesn't cover the desired effect I'm needing or the instructor isn't very good at describing all the steps. My goal is to render a diffused decal on top of a base layer using architectural materials.

I understand how to stack the miaX shaders in the mix node (base goes in slot 0 and the decal in slot 1 of the color section), and the alpha into the Weight 1 slot. The result however, is the decal covering the base layer completely. No masking at all.

I have no idea how to get it to work, nor do I understand how to get the color mix onto my object. I've piped the mix node into the color slot of several different type of shaders but it renders black.

BTW, Mode 1 has been set to Mix, Multiply and Add to no avail.

Does anyone know how to get this node to work in the manner I'm trying?
 
  06 June 2013
I'd suggest that you should really use maya's own layeredShader (and/or layeredTexture) node. Maybe a mentalray guru could advise if there is even something more recent than those.

But this old post of mine might give you some clues.

http://www.djx.com.au/blog/2008/02/...with-mentalray/

I'm using a phenomenon that I built around mib_color_mix, but you could use the original node to do the same thing.

David
__________________
http://www.djx.com.au
 
  06 June 2013
Thank you [djx], this is greatly appreciated and I'll definitely give your dj_mix_colors node a try.

I've already spent the last couple of weeks trying to make the layered shaders and/or layered texture workflow to work, but kept hitting issues with the decal layers suffering strange blending problems. Basically the first layer comes in looking fine--the ones with alphas--but consecutive layers turn into a mushy gray, white or black mess depending on the blending mode.
This might have to do that I'm using multi-tiles (six in the case of my test study ... eighteen in my actual project since it works fine without the multi-tiling. Rearranging my UVs is my last resort.

Anyhow, thanks so much for your blog link. I saw in a much older post you helped someone out with a very similar issue so I'll be working toward similar results

I'll post an update soon.
 
  06 June 2013
DJ_mix_colors

So I downloaded and installed the DJ_mix_colors. In the spirit of this endeavor I'm mixing the install instructions with my findings. My sincerest apologies for the ensuing wall-o-text:

1. Extract the .mel files to your local scripts folder: eg. X:\david\maya\2008\scripts
Aedj_mix_colorsTemplate.mel
・ mentalrayCustomNodeClass.mel
・ mentalrayForMaya.mel

・ These 3 files were tried here (where I usually put all my plugins)> C:\Users\Me\Documents\maya\scripts
・ ... but when that didn't work I put them here (it was empty but I thought I'd try it out)> C:\Users\Me\Documents\maya\2013-x64\scripts

2. Extract the .xpm files to your local bitmaps folder: eg. X:\david\maya\2008\prefs\icons
render_dj_mix_colors.xpm
・ Placed here> C:\Users\Me\Documents\maya\2013-x64\prefs\icons

3. Extract the .mi files to your custom mentalray shaders include folder: eg. X:\david\mentalray\include
dj_mix_colors.mi
・ dj_mix_colors_ExportSelected.mi

・ I'm using 2013 (I believe this location has been moved) so this is where these went> C:\Program Files\Autodesk\Maya2013\mentalray\shaders\include

4. Restart maya: dj_mix_colors can be found in the textures section of the mentalray render nodes.

In short I couldn't get the file to work: Upon Launching Maya I'm greeted with an "Open" dialogue box which is something I've never seen before. I simply closed it then opened the layeringShadersInMR_DJ001 file but a litany of errors and warnings appeared. If you'd like to see it, I can show it to you, but since this entry is already quite verbose I'll refrain adding anymore unless requested.

I had opened this file before installing anything and was able to render the blinn1 and it looked fine. The misss didn't render at all, nor would the file as it had opened, and now nothing in the file will render since installing all the above files. It just remains a gray screen.

The shader network looks intact so I'm befuddled. I've included a screenshot of the attribute editor for the mix node since it doesn't appear to match the one on the blog.

BTW, in spite of me making a mess of things with your node I'm thoroughly impressed with it and your blog. What a great place!

EDIT: It appears one of the files [mentalrayForMaya.mel] was causing all my other files to not render as well, so I deleted it and voila! it all renders perfectly!! Now to dissect this shading network and bend it to my dubious will.
Attached Images
File Type: jpg dj_mix_colors-01.jpg (24.7 KB, 6 views)

Last edited by CyberGolem : 06 June 2013 at 07:00 PM.
 
  06 June 2013
Great news. I was able to get this all to work out. I'm now able to render miaX mats on top of each other and even believe to understand the process, and all thanks to the dj_mix_color node.

most importantly, thank you DJX, aka David Johnson!!!
 
  06 June 2013
HELP!!

Now that I got a small test with a single UV tile working, I'm trying to get the dj_mix_color setup functioning with multi-UV tiles via some layered texture nodes. The alpha isn't working as hoped:

The Layered Texture node is piped into the Weight2 slot of my dj_mix_color to get some rust to reside on top of a base metal layer.

The rust are PNGs with alphas and to make sure the maps aren't bad I took the outAlpha of the individual textures into weight2 where it successfully renders--however--only on its corresponding tile. When the layered texture pipes in, the number for that slot drops to 0.000. Shouldn't it read 1.000 like my previous file?

Does anyone have an idea of how to use a layered textured node to drive the alpha in a dj_mix_color or mib_color_mix?
 
  06 June 2013
Try to use mib_color_interpolate instead of mib_color_mix. I use miaX. But i don't know how to do render passes on this connection(and ever passes in maya mental ray default.)


Uploaded with ImageShack.us
__________________
www.darioortisi.it
MayAdvanced Blog
My youtube channel
 
  06 June 2013
Thanks '76. I greatly appreciate the feedback, but I was able to figure it out before heading to bed (simply too tired to post my results though). You have my curiosity piqued about this interpolate node though.

After futzing with this last night the blend state for each layer became the obvious suspect. These layers were using "ADD" but actually needed to be using "OVER". As soon as I did this and re-piped it all back into the mix node, it responded accordingly. The magic moment was when the weighted slot started reading "1.000" instead of a string of goose eggs. The other change was using Color0 for the base slot and Color1 and Weighted1 for the diffuse overlay and alpha channels respectively.

In the pics you can see the plastic cube that was used for a single UV tile layout sitting in the background. The metal cube in front is a smoothed cube that has 6 unique UV tiles with corresponding UVs for each face of the cube. The first pic shows the base metal, and the second a successful overlay of the weathering effects I'm after (Top most rust needs major tweaking so please ignore its awfulness).
Attached Images
File Type: jpg TEST_metalCube-(BaseTexture).jpg (30.4 KB, 23 views)
File Type: jpg TEST_metalCube-(Success).jpg (31.1 KB, 22 views)
 
  06 June 2013
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
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 09:42 AM.


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