Jump to content
Valent

odd behavior of carve / pscale

Recommended Posts

Greetings, 
I made a set of lines, assigned a random pscale attribute to points on one side of the lines. I copied spheres to the points, then I promoted pscale to the lines as a new attribute, then used that attribute to drive carve_SOP. But when I modify the attribute driving carve it modifies not only carve(first U) but the scale of these spheres as well.

carve_q.hipnc

Share this post


Link to post
Share on other sites
Posted (edited)

That is correct, the CopyToPoint is interpolating that random pscale assigned at the end of each line. When you copy to the line, you inherit that interpolated pscale value. You can use an attributedelete, placed before the CopyToPoints, to remove pscale and the spheres won't change size anymore.

Edited by Atom

Share this post


Link to post
Share on other sites

@Atom But I need that pscale :), the spheres should be of different sizes, what's odd and what I was asking about is, if I try to change the attribute which drives carve_SOP it also changes pscale of these points 
If you have time, please look at the attached file. Try using a slider in the Null node named "CONTROLS".

Share this post


Link to post
Share on other sites

I generally add pscale at the end of the loop. As long as pscale exists on the line, you'll have your problem.

ap_carve_q.hipnc

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

@Atom Thanks!

Could you please explain why it works this way

Looks like "carve" somehow messes with point numbers, I've remade it but instead of using @ptnum for pscale I used @primnum, and promoted it to points. And it worked.

carve_q2.hipnc

Edited by Valent

Share this post


Link to post
Share on other sites

carve will interpolate the attributes

so if one point has pscale of 1 and second 2, then if you carve in the middle the new point will have interpolated value in the middle of 1 and 2 so 1.5

then if you base your random on @primnum both points will have the same value so even interpolated value will be the same

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

@animThank you! You saved me from the sleepless night:)

Edited by Valent

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×