Copy Stamp Help
1737 4 2-
- DerekK
- Member
- 6 posts
- Joined: Dec. 2018
- Offline
Hello, I am working on a project that creates a flower using the copy stamp node. I have the it working well for the most part, but I want to create better usability.
In the copy stamp node, Rotate X. I have “fit01($CY/$NCY,-30,+65)”. Is there a way for me to have the “-30” and “+65”, reference that number from somewhere else, like a wrangle node or something?
I am would like to have it so I can have a slider to control those numbers, and not having me manually type in those numbers when I want to change them.
I attached the file! Thanks for your help!
In the copy stamp node, Rotate X. I have “fit01($CY/$NCY,-30,+65)”. Is there a way for me to have the “-30” and “+65”, reference that number from somewhere else, like a wrangle node or something?
I am would like to have it so I can have a slider to control those numbers, and not having me manually type in those numbers when I want to change them.
I attached the file! Thanks for your help!
-
- Aizatulin
- Member
- 504 posts
- Joined: July 2005
- Offline
-
- toadstorm
- Member
- 405 posts
- Joined: April 2017
- Offline
This is not a great workflow for this stuff… you don't want to copy stamp at all, really, but especially not if the shape of each petal is identical. If it's the same petal being copied to multiple points, you want to use the Copy to Points SOP with template attributes that determine the position, orientation and scale of each copy. This is much, much faster than stamping, and makes all the petals identical references in memory, which keeps things lightweight.
There can be a little bit of math involved in getting these template attributes right for rotations. Unfortunately there's no easy answer there. I'm attaching an example file with some notes that will hopefully explain some of the thought process here. Basically you start with two vectors (generally these are N/forward and up) and then rotate them around using whatever methods are at your disposal… often this involves using matrices. I have a write-up that describes this in a little more detail here [www.toadstorm.com].
If you really prefer thinking in terms of Euler rotations, I suppose you could use the eulertoquaternion() VEX function to define your rotations per-point and then bind that to the p@orient point attribute on your template points. Personally I think familiarizing yourself with how to control and rotate vectors is going to be a better approach in the long run.
There can be a little bit of math involved in getting these template attributes right for rotations. Unfortunately there's no easy answer there. I'm attaching an example file with some notes that will hopefully explain some of the thought process here. Basically you start with two vectors (generally these are N/forward and up) and then rotate them around using whatever methods are at your disposal… often this involves using matrices. I have a write-up that describes this in a little more detail here [www.toadstorm.com].
If you really prefer thinking in terms of Euler rotations, I suppose you could use the eulertoquaternion() VEX function to define your rotations per-point and then bind that to the p@orient point attribute on your template points. Personally I think familiarizing yourself with how to control and rotate vectors is going to be a better approach in the long run.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
-
- Aizatulin
- Member
- 504 posts
- Joined: July 2005
- Offline
-
- DerekK
- Member
- 6 posts
- Joined: Dec. 2018
- Offline
Thank you all so much! After looking through each of your files it makes much more sense to use the copy to points SOP. Thanks for linking that info on further understanding instancing toadstorm. Such a great resource!
I am still semi-early in learning Houdini, so I definitely want to learn the what not to do's now, and hopefully learn VEX to the degree you all showed in your files.
Thank you!
I am still semi-early in learning Houdini, so I definitely want to learn the what not to do's now, and hopefully learn VEX to the degree you all showed in your files.
Thank you!
-
- Quick Links


