Hi Everyone,
I'm trying to set up some automated Mental Ray scripts for our studio 
artists.  I'm having some difficulties accessing all the proper variables 
within Mental Ray.  Specifically setting the Image Based Lighting.
I have created IBLShapes, set their attributes and connected the IBL to 
'mentalrayGlobals.imageBasedLighting' yet when I set an HDR map (done 
manually for the time being) and render, I get no IBL information and a 
warning:
*Warning: (Mayatomr.Nodes) : mentalrayIbl1: IBL ignored. File texture not 
found, or constant black input color. //*

I'm very sure there is an attribute I'm not connecting somewhere, but I 
cant spot it. 

Tracing Mayas output window I can see the miCreateIbl function (C:/Program 
Files/Autodesk/mentalrayForMaya2014/scripts/createMentalRayIndirectLightingTab.mel).
 
 I don't believe I missed anything in the Create or Update IBL functions

Does anyone have any suggestions?

Thanks


Enter code here...
import pymel.core as pm
# Load MentalRay Plugin
if not pm.pluginInfo('Mayatomr', q=1, l=1):
    pm.loadPlugin('Mayatomr', qt=1)

#Set MentalRay Options
pm.setAttr('defaultRenderGlobals.ren', 'mentalRay', type='string')
pm.setAttr('miDefaultOptions.globalIllum', 1)
pm.setAttr('miDefaultOptions.globalIllumAccuracy', 500)
pm.setAttr('miDefaultOptions.finalGather', 1)
pm.setAttr('miDefaultOptions.finalGatherRays', 500)
pm.setAttr('miDefaultOptions.finalGatherPresampleDensity', 5)
pm.setAttr('miDefaultOptions.finalGatherPoints', 125)

# Add IBL
if not ibl:
    ibl = pm.shadingNode('mentalrayIblShape', al=1)
    pm.connectAttr(ibl+'.message','mentalrayGlobals.imageBasedLighting')
    pm.xform(ibl, s=[5000,5000,5000])    
    pm.setAttr(ibl+'.primaryVisibility', 0)
    pm.setAttr(ibl+'.visibleInEnvironment', 1)
    pm.setAttr(ibl+'.visibleInReflections', 1)
    pm.setAttr(ibl+'.visibleInRefractions', 1)
    pm.setAttr(ibl+'.visibleInFinalGather', 1)
    #set Image path in UI (done manually for now)


-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/f7dd1a8f-f5cd-4709-951f-02ecc4d7f8d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to