send attributes to prman shader

   3639   4   1
User Avatar
Member
23 posts
Joined: July 2008
Offline
I'm using a SOP to deform and let the user define settings for a surface. Then I would like to send these settings to prman displacement and surface shaders, where the final calculations are performed.

I would very much appreciate any suggestions on how to send settings and/or precalculated data to a prman shader.

Thanks!
User Avatar
Member
85 posts
Joined: July 2005
Offline
There is the SOP Attribute, where there is a Renderman tab where you can map your attributes. I dont know if it is what you are after.
User Avatar
Member
23 posts
Joined: July 2008
Offline
Thanks for the quick response!
I have been looking into SOP attributes, but it seems I’m not doing it right.

For testing, I attached SOP_flatten (example included in HDK) to a sphere. This SOP has the parameter Distance (dist) which I would like to send to my shader. I therefore add an attribute to the flatten node and enter (in the RenderMan tab)

Houdini: `chs(“/obj/sphere_object1/flatten1/dist”)`
RiName: distance
RiType: uniform float

I export the scene to a rib-file but can’t find any attribute named distance.

Any ideas?

Thanks!
User Avatar
Staff
2593 posts
Joined: July 2005
Offline
burnie
Thanks for the quick response!
I have been looking into SOP attributes, but it seems I’m not doing it right.

For testing, I attached SOP_flatten (example included in HDK) to a sphere. This SOP has the parameter Distance (dist) which I would like to send to my shader. I therefore add an attribute to the flatten node and enter (in the RenderMan tab)

Houdini: `chs(“/obj/sphere_object1/flatten1/dist”)`
RiName: distance
RiType: uniform float

I export the scene to a rib-file but can’t find any attribute named distance.

Any ideas?

Thanks!

The SOP's parameter needs to be attached to the geometry. Try using an “attribute create” SOP. Primitive/Detail attributes can be passed as uniform/constant variables. Point/Vertex attributes map to varying/vertex attributes.

I assume this is to attach the parameter to the RIB geometry, right?

If you're just doing channel referencing of shader parameters, you can simply set the shader's parameter to reference the SOP parameter.

I hope that makes some sense.
User Avatar
Member
23 posts
Joined: July 2008
Offline
Thanks for the the help and quick response, I'll see if I can make it work now.
  • Quick Links