Jump to content

Randomly choose between multiple source geos for copyTo


art3mis

Recommended Posts

Not sure how to do this but I need to randomly choose between multiple source objects in a copyTo point SOP.

Imagine a Sphere with Scattered points on the surface.

Now using a copyTo SOP imagine having to copy not just 1 object to these points, but randomly choose between multiple.

ie For 3 objects instead of copying just a green colored grid, randomly choose either a red, green or blur grid for the copyTo operation.

Edited by art3mis
  • Like 1
Link to comment
Share on other sites

Thanks Atom. Just getting comfortable with copy stamp, now I understand its been deprecated in favor of For Each loops?  At least according to Jeff in the recent H16 new geometry workflow webinar. Not intuitive!

Link to comment
Share on other sites

Stamping is fine for a few thousand points. After that you may see some lag on an animated multi-stamp geometry generator. But hey, you can always cache that stuff out and regain your speed.

I would like to see the above example file implemented in a loop. I'm not quite sure how to do that.

Edited by Atom
Link to comment
Share on other sites

didn't Jeff provide craploads of sample files to go with the webinar video ?

here's one I whipped up...and yes other might have seen this in various forms already...because I'm forcing myself to do this repeatedly so it sinks is...

RandomCopyLoop.hipnc

(if you check my Opus Grid file...there's random rotate thrown in)

Edited by Noobini
Link to comment
Share on other sites

Thanks for the alternate example. It makes sense to me, the loop iteration index takes the place of @ptnum as a unique value for the random seed. I guess I don't understand what the outer compile loop is used for?

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...