Jump to content

orient a gradient ramp on an object


logix1390

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...