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.
Copy SOP/VEX experimenting - Scaling not working like I was expecting
1513 2 2- rove
- Member
- 22 posts
- Joined: 1月 2011
- Offline
- friedasparagus
- Member
- 402 posts
- Joined: 6月 2014
- Offline
Hi Rob,
You should find that dividing by (npt-1) inside the chramp() should fix things. So:
In your file npt == 9, so now when pt == 8 the division spits out 1 rather than 0.88888.
Hope that helps,
Henry
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
- rove
- Member
- 22 posts
- Joined: 1月 2011
- Offline
-
- Quick Links