Good Day Houdini gurus.
I would like to change the colour of a mantra surface shader based on whether or not it is inside a bounding box. if inside, i would like the colour to be zero black, otherwise white. I need to animate the position of the bounding box. I have been thinking about this and looking through the shader for some time. It is not readily apparent to me how to approach this problem.
Any thoughts on how to start would be most appreciated
Nick
Shader colour based on bounding box
5883 6 2- lor
- Member
- 292 posts
- Joined: 12月 2007
- Offline
- mandrake0
- Member
- 638 posts
- Joined: 6月 2006
- Offline
- lor
- Member
- 292 posts
- Joined: 12月 2007
- Offline
- sl0throp
- Member
- 258 posts
- Joined:
- Offline
Could you not use grouping….you would “group by bounding box”. Pipe the object, or create a bounds object and pipe it into the second input of the group node. You would pre-color your object to white, then append another color that colors the group that has been created by the bounds black.
Here is a file that does that.
Here is a file that does that.
- sl0throp
- Member
- 258 posts
- Joined:
- Offline
Could you not use grouping….you would “group by bounding box”. Pipe the object, or create a bounds object and pipe it into the second input of the group node. You would pre-color your object to white, then append another color that colors the group that has been created by the bounds black.
Here is a file that does that.
Here is a file that does that.
- Sadjad Rabiee
- Member
- 1391 posts
- Joined: 12月 2010
- Offline
I think lor's meant is to do this operation in the shader , Because doing this in the SOP Level with Group SOP is related to number of the points , If you have simple grid with only 4 point , and you put the Bounding Box in center of the grid , because we don't have any point on there , the Group SOP can't select any points , Right ?
But if we do it in the Shaders , we can use Pixels instead of Points and we can do this operation on grid with only 4 point !
We should find another way in the Shader and Rendering Process :?
But if we do it in the Shaders , we can use Pixels instead of Points and we can do this operation on grid with only 4 point !
We should find another way in the Shader and Rendering Process :?
- spoopo
- Member
- 19 posts
- Joined: 11月 2013
- Offline
-
- Quick Links