View Full Version : viewport 2.0 and mental ray shaders?
01-18-2012, 09:42 PM
The viewport 2.0 does not seem to support mental ray shaders, (specifically the mia material).
When I apply a color map to a blinn it displays perfectly in viewport 2.0. The same works fine in vray (using the vrayMtl). However when I apply the color map to the mental ray mia material is displays purple in viewport 2.0 (it looks fine in the old "default quality rendering").
I had heard that viewport 2.0 supports mental ray shaders. So what gives?
I am getting this behavior in both Maya 2011 and 2012.
01-18-2012, 09:56 PM
Found this in the manual:
"If an object does not have a shader assigned, or is assigned a shader that is not currently supported, the object appears shaded in the scene view with a bright pink color."
yep, it is bright pink...
yet right above that the manual reads:
"approximated mental ray shader support: mia_material, mia_material_x and mia_material_x_passes (approximated as Blinn)"
which is what I am using.:shrug:
01-19-2012, 12:32 AM
Guess I'm just talking to my self so far, but for any poor souls googling this in the future...
The problem was due to having enabled the mip production shaders in the past which was conflicting with the viewport (basically the code to enable them that worked for Maya2009 is not the same as it needs to be in Maya2012).
I set it back to the default 2012 settings, and then changed the line in the C:\Program Files\Autodesk\Maya2012\scripts\others\mentalrayCustomNodeClass.mel from
int $enableMIPShaders = (`optionVar -query "MIP_SHD_EXPOSE"`== 1);
int $enableMIPShaders = (`optionVar -query "MIP_SHD_EXPOSE"`== 0);
to enable the mip shaders again. All works now.
01-19-2012, 07:05 PM
okay, now that viewport 2.0 is reading my mia materials I am encountering another problem:
Using a linear lighting workflow I have degamma nodes on all my materials for the color. The default viewport displays this fine, but viewport 2.0 just displays this as grey(!) So if I want gamma corrections (and I certainly do) viewport 2.0 becomes useless.
Is there any way to fix this?
01-19-2012, 07:44 PM
Okay, I found a workaround (LOL, this thread seems to be my new diary!)
The mia material connects in the mental ray material shader section of the shading group. I can create a blinn with the color texture (no gamma) and connect that to the shading groups surface material. It will then display the blinn in viewport 2.0 but render the mia material. Woot! Take that Maya!
01-19-2012, 09:39 PM
Thanks for the tips and workaround....but yeah, to be honest I don't think the VP2 isn't even slightly production ready yet. I really hope AD have done a lot of work with it for the next version of Maya as I have found it pretty much to be unusable and in a lot of cases, the original one is faster and displays better higher res textures.
It's a shame with all these bugs because it is a good idea in theory, they just haven't executed it very well yet.
01-19-2012, 10:32 PM
What were some of the problems you ran into with viewport 2.0?
(not that I'm an expert in it by any means! but this could be a useful place to hash out stuff and see if we can find some solutions)
On my list: I think it's a shame that it only does depthmap shadows.
01-23-2012, 07:43 PM
the original one is faster and displays better higher res textures.
Viewport 2.0 defaults to displaying textures at low-res (don't ask why). To get them high res you need to do two things:
1) in the viewport 2.0 setting (render->viewport 2.0->[setup box] )
set the color textures to 1024 (under the Bake Resolution section of Common Options > Performance)
This will set it to high res texture display
2) run the mel command ogs -reset in the script editor.
This will make viewport 2.0 update.
I found that I needed to run that a lot after making changes to get it to update. Hope that is fixed in a future release since it is not exactly intuitive.
01-23-2012, 07:43 PM
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.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.