Br1
06-26-2010, 11:13 AM
Hi.
I already posted this on the mental ray forums, but as I didn't get an answer there, I thought I might be more lucky here.
I'm testing mental ray phenomenon to build a material that will apply worldPosition color to my objects. Right now I'm using this code :
shader "samplerInfoP"
"maya_samplerinfo" (
)
shader "positionSurface" "maya_surfaceshader" (
"outColor" = "samplerInfoP.pointWorld",
"outTransparency" 0. 0. 0.,
"outMatteOpacity" 1. 1. 1.,
"outGlowColor" 0. 0. 0.
)
shader "shadingEngine" "maya_shadingengine" (
"surfaceShader" = "positionSurface.outColor",
"cutAwayOpacity" 0.,
"alphaMode" 0
)
root = "shadingEngine"
It gives me the correct output, however this is currently not usable to me as I'd like to include it into a larger shader that will output to buffers.
I probably have to get rid of the maya_shadingengine part, but applying this to another kind of shader (I tried p_constant from Puppet) instantly crashes Maya.
declare phenomenon
color "worldPosition" ()
shader "samplerInfoP"
"maya_samplerinfo" (
)
shader "p_constant1"
"p_constant" (
"color" = "samplerInfoP.pointWorld",
"override_alpha" off,
"alpha" 1.
)
root = "p_constant1"
So my questions are :
Is there another way than using the samplerInfoto get the worldPosition into a mental ray shader.
Is there a way to use that samplerInfo without using the maya_shadingengine.
thx
Br1
I already posted this on the mental ray forums, but as I didn't get an answer there, I thought I might be more lucky here.
I'm testing mental ray phenomenon to build a material that will apply worldPosition color to my objects. Right now I'm using this code :
shader "samplerInfoP"
"maya_samplerinfo" (
)
shader "positionSurface" "maya_surfaceshader" (
"outColor" = "samplerInfoP.pointWorld",
"outTransparency" 0. 0. 0.,
"outMatteOpacity" 1. 1. 1.,
"outGlowColor" 0. 0. 0.
)
shader "shadingEngine" "maya_shadingengine" (
"surfaceShader" = "positionSurface.outColor",
"cutAwayOpacity" 0.,
"alphaMode" 0
)
root = "shadingEngine"
It gives me the correct output, however this is currently not usable to me as I'd like to include it into a larger shader that will output to buffers.
I probably have to get rid of the maya_shadingengine part, but applying this to another kind of shader (I tried p_constant from Puppet) instantly crashes Maya.
declare phenomenon
color "worldPosition" ()
shader "samplerInfoP"
"maya_samplerinfo" (
)
shader "p_constant1"
"p_constant" (
"color" = "samplerInfoP.pointWorld",
"override_alpha" off,
"alpha" 1.
)
root = "p_constant1"
So my questions are :
Is there another way than using the samplerInfoto get the worldPosition into a mental ray shader.
Is there a way to use that samplerInfo without using the maya_shadingengine.
thx
Br1
