I want to make a copy that converges size

   2204   3   1
User Avatar
Member
20 posts
Joined: Aug. 2015
Offline
I want to smaller(or bigger) it at copy sop, but it does not get what I want.

Same is Sweep sop.
I created pscale through sweep's help documentation.
(create curveu, and pscale aplly curveu*chramp)
but, It did not apply to the overall shape created, it was applied to individual curves and was meaningless.


How can i create at want model?

Attachments:
000.PNG (481.5 KB)
Sweep_twist.hipnc (80.0 KB)

User Avatar
Member
480 posts
Joined: July 2005
Offline
Hi,

if you want the curves to converge you can blend them to an target curve. Check the modified example.

Attachments:
Sweep_twist_X.hipnc (80.8 KB)

User Avatar
Member
20 posts
Joined: Aug. 2015
Offline
Aizatulin
Hi,

if you want the curves to converge you can blend them to an target curve. Check the modified example.

Thanks sir!
I read example, I still have questions that I can not understand.

@pscale = chramp('scale',@curveu);

float r = chramp('converge',@curveu);
// Q (from second input) has same curveu value like P
vector Q = primuv(@OpInput2, “P”, 0, @curveu);

// linear interpolation between P and Q
@P = lerp(@P, Q, 1-r);

'primuv' function is i knowed can get the value specified by the attribute name from the specified geometry and attribute name, primitive number and uv.
Is this correct to invoke one att for exactly one prim?
I thought I was going to carry only one specified attribute (target : input2 + P + primnum 0 + have @curveu).
In fact, Q did not understand that it had loaded different values at every point.

@curveu is variable But, primnum(0) is fixed. So I thought that it would fetch only one specified value.
I do not understand the third item properly on primuv function.
Please let me know if I have a misunderstanding. SideFX-primuv doc too harsh..


And additional primitive questions, ‘primuv’ is How does it work in the point class? In the explanation, we understood that primitive data was loaded, but all the operations were point classes.




>Addition
Oh god.. I understand this function. zero(0) is a single curve prim count…
Thx sir!!
Edited by Dsharp K - July 30, 2017 23:30:30
User Avatar
Member
480 posts
Joined: July 2005
Offline
Hi,

sorry it was a bit confusing from my side. primuv evaluates a vector for the ‘P’ attribute (for the corresponding input), but I named the vector as Q, because the vector where the main loop is running over is named P (@P) already, which is not necessarily the same (here Q is the parametrized curve point with u-value is @curveu).
The prim integer of primuv can be set to zero, if you have only one curve as (2nd) input. If you evaluate the first input by primuv instead, than each curve of the bundle has its own prim number.
Another thing is, that the last input of primuv should be a vector uv, but if you put in a float it will accepted as the first component (u-component). The second component will be interesting for surfaces.
primuv is an overloaded function, so it can have different output/input types.
  • Quick Links