PDA

View Full Version : particleSamplerInfo like node but for geometry


rxgeez
11-17-2009, 05:48 AM
I wanted to find out if there is a mental ray and/or maya node similar to the particleSamplerInfo node but that works on custom attributes on geometry. Essentially I want to be able to create an attribute on an object and then apply that attribute's value to a shader at render time.

e.g. lets say I have 50 cubes and I apply a attribute called "transparency" to each with random values. I want to have one shader that at render time reads in the transparency value and maps it to the shaders transparency....in the same manner as the particleSamplerInfo node works.....any ideas? Is there a custom mental ray node/shader out there already...if not any idea how difficult it would be to write a custom node like that?

rxgeez
11-18-2009, 07:57 AM
just in case anyone is interesed...I posted this in the dynamics section as well: http://forums.cgsociety.org/showthread.php?f=86&t=826484


here's the response:

"There's node called singleShadingSwitch. In that node you can create list of shapes and give them different values.

In this example, I would create one shader, connect shading switch into transparency, and than add all shapes to the switch node. Every object would have attr called transparency. With simple script I would connect every objects transparency attr to corresponding entry in the switch node. That should work well.

With little bit of mel u can make that objects follow particle system and gather all attributes from particle system, and then pass data to switch."

CGTalk Moderation
11-18-2009, 07:57 AM
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.