Hopefully simple question

   1535   2   0
User Avatar
Member
28 posts
Joined: March 2014
Offline
I'm trying to create one Octane shader that will work with multiple objects. Each object has its own color attribute. I want each objects color to be used as the base (diffuse) color channel in the shader.

I can get this to work for one object by creating “Color RGB” whose colors channels look like this:

ch(“../../../obj/sphere_object2/color1/colorr”)
ch(“../../../obj/sphere_object2/color1/colorg”)
ch(“../../../obj/sphere_object2/color1/colorb”)

For R, G and B respectively. This works great for “sphere_object2”, but I need it work for every object that uses this shader.

So in order to get this shader to work with a bunch of objects, I just need to substitute the object name in the strings above. I'm sure there is some simple way to do this, but I'm banging my head trying to figure it out. Any help would be appreciated.
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Sounds like you need to turn on use Point color if that attribute is available on the shader.

Rob
Gone fishing
User Avatar
Member
28 posts
Joined: March 2014
Offline
Hi Rob,

Thanks for the quick reply, unfortunately the Octane shader does not promote “Use point color”. I have dug around in their nodes and haven't found anything that seems to facilitate that functionality.

I was hoping the expression language would have some way of inserting the incoming object name into the string. So I could add an expression like this:

ch(“../../../obj/$SOMETHING/color1/colorr”)

And the expression would evaluate $SOMETHING as name of the object the shader was currently being run on. Your method would be nicer, but can't seem to find that in the Houdini shader tools.

Maybe I'll check in the Octane Forum.

Thanks.
  • Quick Links