PDA

View Full Version : MentalRay/3Delight & Scripted shading nodes (*.py)


Azrail
02-07-2011, 11:50 AM
Hi there.
I'm creating some custom utility/shading nodes for maya with the python API, and they tend to only get computed by the Software and Hardware renderer. 'External' renderers like mentalRay, vray and 3delight are just ignoring them. Does someone have any idea if there is some special declaration or anything which should be included in the node code, so they get recognized? Python or C++ examples are both usefull.

Thanks!

Just to clarify some things: * Maya 2001 SP 1 running on CentOs 5
* The nodes derive from MPxNode
* They return colors or MFloatVectors
* Other thing is that I compiled a C++ example node called flame.cpp and it doesn't work either ( same thing with the *.py shading node examples)

kattkieru
02-07-2011, 01:54 PM
I'm pretty sure that's not going to work. 3Delight ignores nodes it doesn't understand. I'd expect when you render you get an error message in the output window that says it can't see the code for the shader. You'd have to also create the renderman SL code for your python node as a file with the same name as the node in your 3Delight shaders directory.

I don't know as much on Mental Ray (not that I know a lot about 3Delight), but I would assume that you'd have to do something similar there as well. I think Mental Ray shaders are made with their own C++ SDK (if you're not using Mental Mill / that MetaSL stuff); a good example if you'd like to get into that would be to have a look at the P MegaTK shader pack.

Can you recreate the math you're doing inside the node as a group of utility nodes?

flaiver
02-07-2011, 02:00 PM
you have to write your own shader for the specific renderer. Maya is looking for a shader with the same name when your switchig e.g. to mental ray. So keep an eye on the names of your shaders so that the switching between renderers works propertly. By the way - who use the Maya Software renderer today? I think nobody.

CGTalk Moderation
02-07-2011, 02:00 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.