Shader Prob With Mray Standalone

I’m using Mental Ray standalone for Maya 6.5 and want to use the custom shader L-glass with it. But even though I’ve put the .mi into the standalone\include directory and the .dll into the lib directory, Mray can’t find it and outputs a message that says the shader L-glass is missing. What’s worse is that it can’t even find the mib_lookup_spherical shader!

Can anyone please help me on this?

you need to add the entries into your rayrc. Refeer to your manualk its explained there! Also allomost all shaders describe how to do this too.

I know this is basic stuff, but I got a bit confused because there are no link or include statements in rayrc for Mray standalone like there are in maya.rayrc

I thought this was like in the setup for Mray satellite and there it works without specific link/include statements…

Thanx joojaa

There still is something strange here…

I’ve added (to rayrc) like this:

registry “{MR_START}”
link “{MAYABASE}/lib/base.{DSO}”
link “{MAYABASE}/lib/physics.{DSO}”
link “{MAYABASE}/lib/mayabase.{DSO}”
link “{MAYABASE}/lib/contour.{DSO}”
link “{MAYABASE}/lib/subsurface.{DSO}”
link “{MAYABASE}/lib/mi_openexr.{DSO}”
link “{MAYABASE}/lib/l_glass.{DSO}”
link “{MAYABASE}/lib/mix8layer.{DSO}”
link “{MAYABASE}/lib/bumpCombiner.{DSO}”
mi “{MAYABASE}/include/bumpCombiner.mi”
mi “{MAYABASE}/include/mix8layer.mi”
mi “{MAYABASE}/include/l_glass.mi”
mi “{MAYABASE}/include/mayabase.mi”
mi “{MAYABASE}/include/base.mi”
mi “{MAYABASE}/include/physics.mi”
mi “{MAYABASE}/include/contour.mi”
mi “{MAYABASE}/include/subsurface.mi”
end registry
$lookup “{MR_START}”

but still I get warnings like these, lots of them:

API 0.0 warn 302005: C:\Programfiler\Alias\mentalray3.4/include/base.mi, li
ne 950: while defining declaration “mib_amb_occlusion”: ignoring redeclaration o
f function mib_amb_occlusion
API 0.0 warn 302005: C:\Programfiler\Alias\mentalray3.4/include/l_glass.mi,
line 42: while defining declaration “l_glass”: ignoring redeclaration of functi
on l_glass

I really don’t know why this happens. And I still think the documentation is unclear on several issues. However I tend to be pragmatic on many things, like these, as long as the render is good. And yes my mib_lookup_spherical and l-glass is working now, so maybe I should shut up?

Is there a good reference somewhere to the Mray warning and error messages?

are you sure you have compatible verssions of maya and standalone?!?! Imena if you donthave the extactly same version as sued by your maya the libs will not be compatble.

I’m quite sure it’s the same versions, because the render looks the same as in Maya interactive. Anyway Joojaa, don’t waste your time anymore on this it. The rendering now works and that’s the main thing.

I guess my point was that sometimes Mental Ray can appear confusing.

Thanx for your time.

Just remove all declaration of mi file from rayrc file.
Maya (6.5+) itself add mi declaration to your scene mi file and as result you get double shader declaration and warning.

Remove or comment these lines:
mi “{MAYABASE}/include/bumpCombiner.mi”
mi “{MAYABASE}/include/mix8layer.mi”
mi “{MAYABASE}/include/l_glass.mi”
mi “{MAYABASE}/include/mayabase.mi”
mi “{MAYABASE}/include/base.mi”
mi “{MAYABASE}/include/physics.mi”
mi “{MAYABASE}/include/contour.mi”
mi “{MAYABASE}/include/subsurface.mi”

It worked! But you already knew that :slight_smile:

Thanx Puppet, always better to know