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!
send attributes to prman shader
3781 4 1- burnie
- Member
- 23 posts
- Joined: July 2008
- Offline
- Gerome
- Member
- 85 posts
- Joined: July 2005
- Offline
- burnie
- 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!
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!
- mark
- Staff
- 2619 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.
- burnie
- Member
- 23 posts
- Joined: July 2008
- Offline
-
- Quick Links