I want to use a circular gradient in the mantra surface shader so that the base color will be fade out from inner to outer.
I think that I have to use the alpha channel but how can I achieve this?
Thanks
mantra shader / gradient circular
9848 8 2- roughsporty
- Member
- 191 posts
- Joined: Aug. 2008
- Offline
- brianBurke
- Member
- 192 posts
- Joined: Nov. 2008
- Offline
more than a few ways to do this but here's on i like the best:
make a null that's the ‘center’ of your ramp. check the ‘output transform as render space’ parameter on the null. this makes the null ostensibly the same as a ‘place 3d’ transformation node in maya.
transform your shading point into that space and take the length. you can then use this to drive a ramp parameter or whatever.
moving and scaling the null will change the position and size of your ramp.
good luck dude.
make a null that's the ‘center’ of your ramp. check the ‘output transform as render space’ parameter on the null. this makes the null ostensibly the same as a ‘place 3d’ transformation node in maya.
transform your shading point into that space and take the length. you can then use this to drive a ramp parameter or whatever.
moving and scaling the null will change the position and size of your ramp.
good luck dude.
- roughsporty
- Member
- 191 posts
- Joined: Aug. 2008
- Offline
- roughsporty
- Member
- 191 posts
- Joined: Aug. 2008
- Offline
- brianBurke
- Member
- 192 posts
- Joined: Nov. 2008
- Offline
- GustavoBraga
- Member
- 6 posts
- Joined: June 2012
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
That's because it's not a Surface Shader. SOPs don't support the various transform spaces available inside of displacement and surface shaders.
It couldn't be easier though and there are an infinite number of ways to do this in Houdini. Here are two common methods:
1. You can still use a Null Object to drive things. Object Merge the single point it in to the object that contains the VOP network, wire it in to the second input of your VOP SOP and do a simple subtract P from the second input point location and wire in to the same ramp.
2. Put down a Parameter VOP and set it as a point. Now you can keyframe animate the position with a bound handle and you don't even need a point. You can tie this parameter to whatever you want. In the example I tied this to a Sphere SOP where the radius is the radial region and the position is the location of the effect.
I rarely use a Ramp Parameter these days without preceding it with a Fit Range VOP or a Fit Range Clamped VOP. Promote the in min and max parameters and leave the out min and max at 0 and 1 respectively. This gives you control to map wildly fluctuating input ranges to 0-1 for sanity in to the Ramp Parameter. In the file attached I use the max range as the range of effect cut-off.
It couldn't be easier though and there are an infinite number of ways to do this in Houdini. Here are two common methods:
1. You can still use a Null Object to drive things. Object Merge the single point it in to the object that contains the VOP network, wire it in to the second input of your VOP SOP and do a simple subtract P from the second input point location and wire in to the same ramp.
2. Put down a Parameter VOP and set it as a point. Now you can keyframe animate the position with a bound handle and you don't even need a point. You can tie this parameter to whatever you want. In the example I tied this to a Sphere SOP where the radius is the radial region and the position is the location of the effect.
I rarely use a Ramp Parameter these days without preceding it with a Fit Range VOP or a Fit Range Clamped VOP. Promote the in min and max parameters and leave the out min and max at 0 and 1 respectively. This gives you control to map wildly fluctuating input ranges to 0-1 for sanity in to the Ramp Parameter. In the file attached I use the max range as the range of effect cut-off.
There's at least one school like the old school!
- rafaels
- Member
- 696 posts
- Joined: March 2009
- Offline
I'm very fond of using the bbox VOP to automatically calculate the center, thus eliminating the need for locator input and/or scripting…
Lay down a Bbox, subtract max from min, divide by 2 and add to min: You got your center point. You can then add to a parameter vector if you intend to offset the center every now and then.
Cheers
Lay down a Bbox, subtract max from min, divide by 2 and add to min: You got your center point. You can then add to a parameter vector if you intend to offset the center every now and then.
Cheers
Toronto - ON
My Houdini playground [renderfarm.tumblr.com]
“As technology advances, the rendering time remains constant.”
My Houdini playground [renderfarm.tumblr.com]
“As technology advances, the rendering time remains constant.”
- GustavoBraga
- Member
- 6 posts
- Joined: June 2012
- Offline
-
- Quick Links