Masoud Posted May 30, 2020 Share Posted May 30, 2020 Hi; In a “Copy Stamp SOP”, I tried to create a random integer attribute ranged from 0 to 10, but it creates values from 2 to 9. How can I fix this? Thanks for helping. CopyFit.hip Quote Link to comment Share on other sites More sharing options...
fencer Posted May 30, 2020 Share Posted May 30, 2020 @ptnum this is VEX, you must use Expressions. In your case - rand($PT) or rand($CY) Alwasys check help first https://www.sidefx.com/docs/houdini/nodes/sop/copy.html Quote Link to comment Share on other sites More sharing options...
chrbir Posted May 30, 2020 Share Posted May 30, 2020 (edited) To be sure to always fit a 0-10 range, you need to know the min and max value of your random values. You can do something like this: example_fit_random.hip Edited May 30, 2020 by chrbir Quote Link to comment Share on other sites More sharing options...
toadstorm Posted May 30, 2020 Share Posted May 30, 2020 A better question is, why are you copy stamping? Just put this attribute on your template points and have the copies inherit it. Copy stamping is a deprecated workflow and shouldn't be used anymore except for backwards compatibility. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.