Jump to content

Y Ramp VOP


rawks

Recommended Posts

Hi all,

 

I'm trying to create a ramp in VOP to drive an attribute that will drive another simulation. Works fine for X axis but I'm totally confused about how to use the same technique, or similar one to put my ramp on Y axis.

File to explain is attached.

 

Thank to everyone will help me with this simple thing.

 

E.

 

 

YRamp.hipnc

Link to comment
Share on other sites

Move your vecToFloat to before the ramp.

 

See how in your setup there's a dashed line connecting P to the ramp? That's a warning to tell you you're connecting different types together. P is a vector, but the ramp takes a float. It's doing a naive type conversion for you, so P becomes P.x. 

 

By moving the vecToFloat to sit between P and the ramp, you can explicitly control the conversion. Connect the 2nd output of vecToFloat to the ramp, you'll be controlling your setup with P.y.

Link to comment
Share on other sites

Thank you for your reply, you have solved my problem!

I have attached the correct file, maybe could be useful for someone.

 

However, I want to go in deep with this.

At the moment looking spreadsheet and colours on my monitor I haven`t a full scale from black to white (so from 0,0,0 to 1,1,1), i have tried to add another fit range before the 'visualize colour node' but it doesn't work!

 

Thank you,

E.

YRamp_Corrected.hipnc

Link to comment
Share on other sites

Similar answer to before, gotta put the fit range in the right place. :)

 

A ramp parameter assumes whatever is driving it is between 0 and 1, anything above and below that will be clipped.

 

In your existing setup, look at the geometry spreadsheet and click on the P[y] column to sort it. The values go from -0.5 to 0.5. You have a cylinder of length 1, but its centered on the origin.

 

To fix this to make the ramp work as expected, put the fit range after the vecToFloat, and before the ramp. You then set it so that the input range is -0.5 , 0.5, and the output range is 0,1.

 

Helps to add a few divisions on the cylinder too, to ensure it's all doing the right thing.

 

YRamp_Corrected2.hipnc

 

 

 

 

Link to comment
Share on other sites

Hey Matt,

 

Cool, your explanation has been really easy and useful. For what I have understood the fit node is related also to the position of the object in the space in this case, so moving the object will affect also his colour. 

Just solved this applying transform node after vopsop.

 

Thanks again Matt, big up

 

E.

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...