Hi Fred,
I use a set of shaders for mentalRay called Shaders_P
Within this set of shaders is a very cool node called *'p ray_type'*. It allows you to pipe in a separate HDR image into the Final Gather and a different texture into the Environment or Reflection, and control them independently (plus more!). The node itself gets connected to the mentalRayIbl node via its .color.
Another option, which is an 'out-of-the-box' solution that definitely works for Maya 2008 ext.2 (which is what I'm still working on) is where you alter a mentalRay start-up script to unlock a number of 'unsupported' production shaders. One of these is called a 'raySwitch'. Basically, it has the same functionality of the aforementioned *'p ray_type'*. Here's how you do it:
-
Open 'mentalrayCustomNodeClass.mel' (in ../scripts/others) and replace this chunk of code...
// Internal MentalRay Nodes. Not meant to be used with Maya.
if ($nodeType == "misss_physical_phen" ||
$nodeType == "mip_rayswitch" ||
$nodeType == "mip_rayswitch_advanced" ||
$nodeType == "mip_rayswitch_environment" ||
$nodeType == "mip_card_opacity" ||
$nodeType == "mip_motionblur" ||
$nodeType == "mip_matteshadow" ||
$nodeType == "mip_cameramap" ||
$nodeType == "mip_mirrorball" ||
$nodeType == "mip_grayball" ||
$nodeType == "mip_gamma_gain" ||
$nodeType == "mip_render_subset" ||
$nodeType == "mip_matteshadow_mtl" ||
$nodeType == "surfaceSampler" ||
$nodeType == "mip_motion_vector")
return "rendernode/mentalray/internal";
return "";
}
...with this...
// Internal MentalRay Nodes. Not meant to be used with Maya.
// So? Should poor Maya users use 3dsmax? C'mon... ;)
if ($nodeType == "misss_physical_phen" ||
$nodeType == "mip_card_opacity" ||
$nodeType == "mip_matteshadow" ||
$nodeType == "mip_matteshadow_mtl" ||
$nodeType == "surfaceSampler")
return "rendernode/mentalray/material";
return "";}
if ($nodeType == "mip_rayswitch" ||
$nodeType == "mip_rayswitch_advanced" ||
$nodeType == "mip_cameramap" ||
$nodeType == "mip_mirrorball" ||
$nodeType == "mip_grayball")
return "rendernode/mentalray/texture";
return "";}
if ($nodeType == "mip_rayswitch_environment")
return "rendernode/mentalray/environment";
return "";}
if ($nodeType == "mip_motionblur" ||
$nodeType == "mip_motion_vector")
return "rendernode/mentalray/output";
return "";}
if ($nodeType == "mip_gamma_gain" ||
$nodeType == "mip_render_subset")
return "rendernode/mentalray/lens";
return "";}
Now when you start Maya, there should be a bunch of new shaders/utilities available to you. Go to Mental Ray Materials and click on the *'mip_rayswitch'* material.
Create a mentalRay IBL environment. Connect the outValue of the *'mip_rayswitch'* to the 'color' of the mentalRayIblShape
Now you can map your HDR image to the 'Final Gather' and another map to the environment reflection.
I hope this helps!
BenF