3
$\begingroup$

The following situation (simplified for easier explanation)

There's a library with a lot of book shelves that I modeled. All the shelves are empty.

I want to create a geo node setup that first detects all shelving space (not relevant how right now, maybe by material etc), giving me back corresponding planes for each of the shelving boards.

Then I want to use this pre-compiled selection to scatter books on there (the easy part once I got the planes).

Another possible application of this paradigm would be dynamically scattering props/debris over non joined geometry without having to apply a geonode network and weight painting on each of them, instead defining the scattering area with a volume.

My question is, since always I have only seen geo nodes applied directly to an object, or generating an object themselves, if it is possible to instead create this sort of "detection boundary" that can work with the geometry contained within it's volume and do calculations, etc with that?

In my mind, it should iterate over all the faces within it's bounds and do its calculations on those.

I am a novice so excuse me if this is a baseless question or really simply solved.

Scene setup with shelves, ground, box, and "volume"(orange) Scene setup with shelves, ground, box, and "volume"(orange) marked in green is what my geo nodes on the volume should detect as "shelving" marked in green is what my geo nodes on the volume should detect as "shelving". The specific method to decide whether to detect it is arbitrary, I just care about the volume being able to access the surrounding geometry.

$\endgroup$
6
  • $\begingroup$ It's not clear what you are asking. What are you talking about? $\endgroup$ Commented Nov 12 at 15:54
  • $\begingroup$ I think the title describes it quite succinctly, but I'm gonna add a screenshot to illustrate. $\endgroup$ Commented Nov 12 at 15:57
  • $\begingroup$ The answer to the title is no. But you can access geometry from collections, so if you put everything in a collection, then yes. $\endgroup$ Commented Nov 12 at 16:01
  • $\begingroup$ I added an image to illustrate. Worst case, would I be able to access my scene collection in that way? $\endgroup$ Commented Nov 12 at 16:05
  • $\begingroup$ I guess, much more annoying, but possible, I could pull in a user defined volume to the geo nodes on one of my shelves, so I get control where the items will be scattered, at least within the specific shelf? $\endgroup$ Commented Nov 12 at 16:07

2 Answers 2

3
$\begingroup$

And here's the solution using your idea to discriminate by assigned material:

Imgur mirror (SE image hosting has problems)

The books somewhat fortunately look somewhat realistically without overhanging too much and overhanging a little might be an effect you're going for - if not, you need to inset the faces (either at the stage of assigning materials, so manually, or inside Geometry Nodes - though there's no "Inset" node, you need to program insetting yourself or find a custom group on the Internet). You may notice I temporarily squeeze the geometry so that the Poisson distribution is biased according to the book dimensions.

$\endgroup$
3
$\begingroup$

It's not too complicated.

You just need to have all your target objects inside a collection and use this collection in the nodes. (Remembering you can have the same object in multiple collections if you don't want to lose some organization you have)

In the image below, cube 005 will be the geonodes object, the "volume".
While the collection "TargetObjects" will contain the walls, shelves, and anything else.

Collection and volume

Detection methods

As for detection, there could be a big variety of methods.

Two of the most obvious being "all faces that normal points up" and "raycast". Another one pretty useful is to weight paint target regions, as long as all the objects have the same vertex group name.

Example using all faces that point up:

Result

Nodes for faces pointing up

Where the group "Is outside box" is just a boring comparizon of every coordinate of the points against the bounding box limits of the volume:

Comparison

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.