Using Ramp param VOPSOP to adjust the profile of a curve?

   18750   11   3
User Avatar
Member
249 posts
Joined:
Offline
Hey guys i'm trying to find an efficient way of adjusting the profile of a curve using the Ramp parameter in a VOPSOP.

I'm using the Float, Spline method on the ramp but cant map the length of the ramp to the X co-ordinate and the values of the points in Y.

Is this possible and if not can i use chops or something else. I would really like some help on this.


-andrew
blog [abvfx.wordpress.com]tumblr [andrewbrowne.tumblr.com]twitter [twitter.com]
User Avatar
Member
257 posts
Joined: Nov. 2007
Offline
Whichever axis you are using to drive your ramp should be normalized.
example: If you have a default line sop (pointing in the Y direction) with 11 points, each point's y component will be something like 0.0;0.1;0.2;0.3;0.4;0.5;0.6;0.7;0.8;0.9;1.0

You use these values to drive your ramp in a vopsop:
P -> vector to float -> y-component -> ramp -> float to vector (x-component from ramp, other components from vector to float) -> ouput in P.

You could use other values for mapping (Uv's tend to work well), or
(point numbers/max number of points), as long as it is in the 0->1 range it should work with your ramp.
Cg Supervisor | Effects Supervisor | Expert Technical Artist at Infinity Ward
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
User Avatar
Member
519 posts
Joined:
Offline
I tried to do it all in sops and with uv's…I wasn't very lucky with the setup but it might give you some inspiration.

Attachments:
ramps_to_curve.hip (849.2 KB)

User Avatar
Member
249 posts
Joined:
Offline
Thanks guys,

Pete i think that the method i was trying to do but had no success. It just moves a bunch of points around.

Tried to find something but no luck. I was looking at the new fur stuff in H11. There is a thickness ramp in the fur node that adjust the profile of a strand. Maybe there might be something in there i can use.

Pete if you could post a very simple scene getting it to work i would be extremely grateful.
blog [abvfx.wordpress.com]tumblr [andrewbrowne.tumblr.com]twitter [twitter.com]
User Avatar
Member
42 posts
Joined: Nov. 2006
Offline
is this what you mean?

(N / NPT) drives the ramp… then add the output to the coordinate you want to move.

you can tinker more by adding extra params to scale (multiply) the values more if you like.

ps - you don't have to do this in VOPS ( although probably faster ), you can append a ramp param from the “Edit Param Interface” and use “uv” or “bbx” or whatever to get your lookup value, but then you'll be in hscript ( or python) territory.

peace & 42

Edit: (N / NPT) has a small error ( N starts at zero )… for exactness, probably should be ( N / (NPT - 1 )) … just make sure you have more than one point.

———————
cgroundup fan

Attachments:
ramp_curve.hipnc (48.9 KB)

User Avatar
Member
175 posts
Joined: July 2005
Offline
I created light streaks with curves. Here's a dirty scene. Perhaps it could be of some help.

Peter

Attachments:
smugi.hipnc (276.8 KB)

User Avatar
Member
257 posts
Joined: Nov. 2007
Offline
example:

edit: made a slight modification, the ramp will define the width attribute, the polywire is for preview purposes only.

(I would go with the uv method personally)

Attachments:
curve_ramp_01.hip (82.5 KB)
curve_ramp_02.hip (101.0 KB)

Cg Supervisor | Effects Supervisor | Expert Technical Artist at Infinity Ward
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
User Avatar
Member
42 posts
Joined: Nov. 2006
Offline
after tinkering a bit, i now have more Q's than i started with:

is the curve planar? do you want to be able to transform into an arbitrary direction a la Transform Axis SOP? or only along X, Y or Z axes? or along their point normals? as for a VOP SOP, how does one limit it's scope to a point group? ( skipped for now. thinking setting attrib to -1 or something then filling the 0..1 range then i can use an If-Then VOP. other suggestions? )

if using the (N / (NPT -1)) method, how does one deal w/ a point group that doesn't start with 0? isn't sequential? ( del non sel, sorted by vec, set attrib and transferred back to original pts )

can the Transform Axis SOP use point attributes in the Transform param field? used as a look-up into the ramp with the chramp() expression? ( i couldn't get this to work. seemed to only use the first value in the ramp )

my WIP solution uses a point group and so far requires the first value in the ramp to be zero or the whole mesh moves. “input” params include a vec to control the “u” attrib creation via a sort, a vec to set the transform direction, the ramp and a scale ( not just to inc but also invert the ramp ).

any suggestions welcome.

Attachments:
ramp_curve_03.hipnc (67.2 KB)

User Avatar
Member
249 posts
Joined:
Offline
Ive been meaning to respond to this thread. I will be back in about 2 hours to test the files you guys have put together and work out what is going on.

Thanks for all the help so far guys. Be back soon.


-andrew
blog [abvfx.wordpress.com]tumblr [andrewbrowne.tumblr.com]twitter [twitter.com]
User Avatar
Member
249 posts
Joined:
Offline
Hey guys, Ive have a good look at all the files and first off i want to say thank you for the for responding and taking the time make some examples of your thoughts.

If there is any example that fits the closest to what im looking for it would be Jason's (houdiniuser42).

Pete your version, im unable to adjust the ramp's curve from the left side. When i add a point it snaps to the center one.

Jason, your one has the functionality that im looking for. I swapped out the box for a line and replaced the point group with a simple $NPT. What's cool is if the shape i want (using the ramp) cannot be replicated with the current amount of points then i can resample before the or after (i think) and get a better representation.

The reason why i need this functionality is i will use the ramp as a tool to modify/create the profile of a revolved surface, rather than adding adjusted circles or manually lay down a curve. If anyone can find a better way of doing this, rather than finding a way to edit the profile with a ramp let me know because i really think if this works then it would speed alot of things up

the only problem with Jasons file is when i create the line and have it facing up in Y, the line points in $TY $TX (or Z)

But great work guys im almost there.
blog [abvfx.wordpress.com]tumblr [andrewbrowne.tumblr.com]twitter [twitter.com]
User Avatar
Member
130 posts
Joined: April 2009
Offline
Hi,

Try Swann's “Bridge” tool in the exchange, and see how he did it. It contains the functionality you talk about, and seems to work quite robustly.

Cheers,
Greg
User Avatar
Member
249 posts
Joined:
Offline
Thanks aiWorks, i will check that out.

BTW awesome website.
blog [abvfx.wordpress.com]tumblr [andrewbrowne.tumblr.com]twitter [twitter.com]
  • Quick Links