How to copy different geometry randomly to a group of points?

   9561   8   2
User Avatar
Member
833 posts
Joined: Jan. 2018
Offline
Coming from C4D, there's this neat little trick that basically allows the Cloner Object to randomize the clones if two or more geometry objects are nested in the Cloner Object. This comes in incredibly handy when, for instance, one wants to build a quick Cityscape by throwing a handful of Buildings geometry into the Cloner Object. The same would come in handy when wanting to do something like an Asteroid field, or even a Forest with a few different trees.

What would be the simplest way to achieve this in Houdini? Basically what I'm looking to do is to group (somehow) a series of Geometry nodes, and tell Houdini to randomly copy them across a set of points (say a Grid with a Mountain node to add deformation)?

Here's a screenshot of what I'm talking about in C4D:

Attachments:
Screen Shot 2018-03-11 at 1.43.47 PM.png (494.1 KB)

>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
User Avatar
Member
13 posts
Joined: Feb. 2017
Offline
Hi Midphase,

Sidefx has a walk through tutorial [www.sidefx.com] on how to do this sort of thing.

Cheers,
Richard.
User Avatar
Member
670 posts
Joined: Sept. 2013
Offline
Look into copy stamping a switch node.

Or pack your objects first, count them with opninputs(“../merge1”), number them with a connectivity sop, give your grid random numbers for distribution control, copytopoints and delete surplus objects afterwards.

Attachments:
copy_packed_geo.hipnc (317.7 KB)

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
833 posts
Joined: Jan. 2018
Offline
Thank you both.

Konstantin, I was hoping to find a method that wouldn't involve scripting. I can see how your method is working, but is there any way to achieve a similar result without any coding even if it involves additional nodes? For instance, by utilizing the Attribute Random node?
>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
User Avatar
Member
7741 posts
Joined: Sept. 2011
Offline
http://orbolt.com/asset/SideFX::copy

It's meant to be used from within maya, but it should work in houdini too. The only way I know of that uses zero scripting is to ask someone to build a tool for you. In this case, sidefx has built a simple tool for copying a set of objects onto the points of another.

It's in your best interest to learn some of the scripting tools in houdini. Rudimentary functions such as getting how may points an object has, the name of a node connected to an input, or getting the value of a point attribute. Without the will to help yourself you are left at the whim of those that might build tools for you.
User Avatar
Member
833 posts
Joined: Jan. 2018
Offline
jWithout the will to help yourself you are left at the whim of those that might build tools for you.[/quote
Thank you, maybe with a tad more condescension next time?


I've been doing nothing other than learn and feed myself information about how to use this application for months, and in and day out without pause. There is a lot to love in Houdini, but trying to keep things artist-friendly is tricky to say the least. I don't know of a single creative artist who is eager to start typing code just to do something simple as randomizing some objects on a plane. If that is the only way to accomplish that task in Houdini, so be it. However if there is a node-based way to accomplish it, I would love to know.

Thank you for the link and for taking the time.
>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
User Avatar
Member
14 posts
Joined: March 2014
Offline
Hello Midphase,

you've probably found a solution for your question in the meantime already, but if not, here's a tutorial that explains more or less exactly what you're looking for:

https://www.youtube.com/watch?v=SVRk3sxzpLU [www.youtube.com]

I've recently found this video when I was searching for the same method you hoped to find. You need two little scripts, but it's totally easy.

Best regards
User Avatar
Member
833 posts
Joined: Jan. 2018
Offline
Thank you, yeah I saw that tutorial a while back and it worked well. Nowadays I'm using MOPs for any of these type of things. It's an art-directable fast solution that gives me what I wanted (i.e. an intuitive workflow to get the results I need without needing to code in VEX).

If you don't know about MOPs, here's a link:

https://www.motionoperators.com [www.motionoperators.com]
>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
User Avatar
Member
14 posts
Joined: March 2014
Offline
Hello Kays, thank you very much for the link! I think I've seen it a while ago while I was watching one of the great Entagma tutorials, but forgot it about somehow. Since I'm getting more used to Houdini day by day I think I'll give it a try soon.
Best regards
  • Quick Links