Jump to content
Sign in to follow this  
logix1390

orient a gradient ramp on an object

Recommended Posts

Hello,

I have a test object floating in space . I want to get a ramp that is oriented along the direction its facing no matter what the rotation or position is... I am using a "relative to bound" vop and using the x component to visualize the ramp but it seems like its not actually relative to its bound but to the world. I will attach a screenshot of what I mean. The green arrow is where I want the gradient ramp to face but the red arrow represents what its actually doing ... I will also attach my scene for anyone that wants to take a look.

Thanks 

Ramp_orient.hipnc

orient_ramp.jpg

Share this post


Link to post
Share on other sites
Posted (edited)

relbbox is relative to the bounding box of the geometry, it is axis aligned in the object space and since your object doesn't have any transform it's also the same as world space, Transform SOP just moves geometry around, that doesn't affect neither object nor bbox orientation

so you can either store your relbbox as an attribute before Transform SOP, then you can use it even after to sample your ramps, or there are more involved methods if necessary depending case by case

Ramp_orient_mod.hipnc

Edited by anim

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×