How can I map the Seed value of an SOP to an other as an Attribute?

   2293   3   1
User Avatar
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?

Attachments:
ColoredBalls.hipnc (139.2 KB)
Screen Shot 2017-11-03 at 16.31.58.png (1.0 MB)
Screen Shot 2017-11-03 at 16.17.47.png (72.3 KB)

User Avatar
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 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 copyptattribute, 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]
User Avatar
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.

Attachments:
Screen Shot 2017-11-03 at 18.25.48.png (98.3 KB)
Screen Shot 2017-11-03 at 18.26.07.png (45.8 KB)

User Avatar
Member
14 posts
Joined: Dec. 2016
Offline
sorry, forgot one screenshot:

if you look at my geometry spreadsheet, you can see that I have the copypt and mySeed accordingly. They seem to work fine in numbers. I don't know how to copy those to that seed input.

Attachments:
Screen Shot 2017-11-03 at 18.27.30.png (107.1 KB)

  • Quick Links