How can I map the Seed value of an SOP to an other as an Attribute?
2293 3 1-
- omerpekin
- Member
- 14 posts
- Joined: Dec. 2016
- Offline
Hi,
I am quite new in Houdini, so I hope I am asking something simple…
I did a custom geometry; basically scattered 3 points in a bounding box and copied balls on these points.
Then I scaled these balls with an Attribute Randomize SOP.
Now, when I change the seed value of the first Scatter SOP, my geometry changes.
Until this point, it works as I imagined.
Now, I also have a surface(grid) that I am scattering these geometries onto.
I imagine that all the copied geometries would be different if they would have a unique seed number.
So basically, I know I need to give the points that are scattered on a grid an attribute called ‘seed’ and the original Scatter SOP (the one I am creating my geometries with) would look for those numbers and take that as a seed value. But I really don't have a clue how I can do such a thing.
Can you help me?
I am quite new in Houdini, so I hope I am asking something simple…
I did a custom geometry; basically scattered 3 points in a bounding box and copied balls on these points.
Then I scaled these balls with an Attribute Randomize SOP.
Now, when I change the seed value of the first Scatter SOP, my geometry changes.
Until this point, it works as I imagined.
Now, I also have a surface(grid) that I am scattering these geometries onto.
I imagine that all the copied geometries would be different if they would have a unique seed number.
So basically, I know I need to give the points that are scattered on a grid an attribute called ‘seed’ and the original Scatter SOP (the one I am creating my geometries with) would look for those numbers and take that as a seed value. But I really don't have a clue how I can do such a thing.
Can you help me?
-
- neil_math_comp
- Member
- 1743 posts
- Joined: March 2012
- Offline
The first input of Copy To Points only gets cooked once, so variations need to come from the points in the second input. If you add an Attribute Randomize, after transform2, with the attribute name
You can alternatively add an Attribute Wrangle with
If you need maximum flexibility, you can use a For Loop block, instead of Copy To Points, but it sounds like you probably don't need that.
Hopefully that's what you were looking for.
orient
, Dimensions set to 4, Distribution set to “Direction or Orientation”, that will give you uniform random orientations from the points. If you add another Attribute Randomize to randomize Cd on the points, I think that would be transferred, too.You can alternatively add an Attribute Wrangle with
i@copypt = @ptnum;
after transform2, and then vary things using the copypt
attribute, after copytopoints2. That allows more flexibility in how the copies are varied, but can be a bit more complicated.If you need maximum flexibility, you can use a For Loop block, instead of Copy To Points, but it sounds like you probably don't need that.
Hopefully that's what you were looking for.

Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
-
- omerpekin
- Member
- 14 posts
- Joined: Dec. 2016
- Offline
Hi!
Thank you very much for your help. Though I have been trying for a while now and I understand what you mean with the Attribute Wrangle. Both Attribute Wrangle solution and the Attribute randomize solution only ends up in randomly rotating the finished geometry, does not change the seed.
I thought I would need the foreach so I did everything with that. It is way more logical now. But still, the Global Seed input of the Scatter SOP does not get a specific value for each of the copied geometries.
I read something about stamp copy. Do you think stamping would help more?
Thakns a lot.
Thank you very much for your help. Though I have been trying for a while now and I understand what you mean with the Attribute Wrangle. Both Attribute Wrangle solution and the Attribute randomize solution only ends up in randomly rotating the finished geometry, does not change the seed.
I thought I would need the foreach so I did everything with that. It is way more logical now. But still, the Global Seed input of the Scatter SOP does not get a specific value for each of the copied geometries.
I read something about stamp copy. Do you think stamping would help more?
Thakns a lot.
-
- omerpekin
- Member
- 14 posts
- Joined: Dec. 2016
- Offline
-
- Quick Links