Copy SOP/VEX experimenting - Scaling not working like I was expecting

   1371   2   2
User Avatar
Member
22 posts
Joined: Jan. 2011
Offline
Hi,

Let me first say that I am somewhat technically challenged. I've been watching videos and reading up on VEX to at least get a basic understanding of VEX. To me Vex is about as mysterious as the force is for a Padawan.

Today I was experimenting with Copy SOPs and some very basic VEX. I decided I wanted to change the size of the copied geometry (a polygonal circle) along a line and then skin the geometry. Then I decided to ramp the size of the circle along the line.
It all went well up until I noticed that when I changed ramp parameters, the end point scaled up and down. At the start point (point 0) the circle behaved like I wanted it to (not change size but stay at the default size I gave it). At the end point however the circle size kept varying.

How can I get the end point scaling to behave like the start point scaling? The attached Hip file might make things more clear.

Greetz, Rob.

Attachments:
AttrSizeVary_ramped.hipnc (81.0 KB)

User Avatar
Member
402 posts
Joined: June 2014
Offline
Hi Rob,

You should find that dividing by (npt-1) inside the chramp() should fix things. So:

float pt = @ptnum;
float npt = @numpt;

f@circleSize = chramp("circleSize", pt/(npt-1)); // change to (npt-1) here!
@pscale = fit01(@circleSize, 0.2, 0.5);

In your file npt == 9, so now when pt == 8 the division spits out 1 rather than 0.88888.

Hope that helps,
Henry
Henry Dean
User Avatar
Member
22 posts
Joined: Jan. 2011
Offline
Henry,

Thanks for clearing that up!

Rob.
  • Quick Links