V-Ray + Grasshopper Scatter for more than one surface

Hi there!

I already posted this in the V-Ray forum, but later figured out it probably fits here better:

For a landscape architecture project I’m currently working on, I need to picture a hill with different pieces of forest on it. Of course I don’t want to do this manually and use therefore a very nice grasshopper file, that was shown in a Chaos Group webinar (see pic attached). In this file three different instances can be randomly populated on a certain surface! This works pretty good, but with only one surface. As a 100% Grasshopper noob I really don’t know how to make it work otherwise. I tried copy-pasting the whole algorithm, but in that case only the second one would render. I tried reattaching the “Render” node from the copied alglorithm to the “Render in Project” node of the first one, but then none of them renders out. Obviously, I don’t really get the whole thing. And learning Grasshopper is on my To-do list. But right now I don’t really have the time to do it, so I thought I’d ask you guys for help:

  1. how do I get the whole thing to work with several surfaces (the “Set Multiple Surfaces” option form the RMB drop-down menu is not the answer, as the different forest pieces have different tree densities)?
  2. as I’m using the same tree for the Population process, I don’t really need three “Open file” slots; when I delete two of them however, it only renders one third of the trees - does it have to do with the “Cull” node?
  3. is it some how possible, by adding one or more nodes, to manage the population concentration a bit - I’d really like to have more trees in the center regions of my surface and less - around the edge areas?

Thanks in advance!
Hell

Later, I found a somehow straightforward solution. You, people with good grasshopper knowledge, will probably have to facepalm, but “if it looks stupid, but it works it probably isn’t that stupid”, right? I copy-pasted the algorithm up to the import part five more times (as I have alltogether six surfaces to differently populate) and connected all the Importers (18 nodes) to the flattened V Geo Input of the Render Node. Now it works just right.
Of course, I’ll still be vary thankful, if you would propose a better solution.

Greetz
Hell

I don’t have your plugins (i suppose), so I can’t help you directly.
But, as point 3 here: How to ask effective questions , having to rebuild your definition (from a picture) surely decrease your chance to get an answer.
Your def + internalized data and/or anything to have the same situation as in your pc; linked files, etc…

Even in your pic there are missing references, so someone can’t even help you by looking at the wire types (item, list, tree)…

1 Like

Thanks for the response, Riccardo. As I’m very new to Grasshopper, I though that only by looking at the algorithm, someone would be able to tell me what to do. In order to make it easier, I created three diffrent coloured vrscene objects (for the GH import section) and also a Rhino 6 file with my landscape surfaces. The Grasshopper file is also included.
The ZIP is approx. 3 Mb,

Once again, thanks in advance to all of you, who’ll take a bit of your time to help!

Greetz
Hell

Grasshopper ZIP.zip (2.9 MB)

Hey there grasshopper experts and fans,

is there something else you’d need as an input on the way to the answers, I’m looking for? In case you’re generally not interested in answering, would you be so kind and redirect me to another forum, where I can ask my question.

Thanks in advance once again!

Hi again.
Sorry I didn’t check back as I was sure I haven’t those plugins…

but… just today for my other stuff I randomly installed a vray trial, so now i have them (for some time).

Yes, something is not working as it should.
Importer seems to not handle tree data structure: only 1 vray scene per importer and a vlean list of “transform” (planes). (each importer is loading only first branch of the tree, so only the first surface)
I’ve changed the sampling method, now it do a per-area method.
Changed also random scale data management so it is not repeated for each importer component.

See this:
Test_re.gh (1.7 MB)

1 Like

Hi there Riccardo,

thank you for the file. I really appreciate your help, as you seem to be the only one eager to lend me a hand with this issue. I tested your file and here is the feedback:

  • [+] The multi-surface support works now! (check rendering)
  • The algorithm only renders one of the tree types (maybe because of the merging?) (check rendering)
  • [?] How do I get to have different densities on the different surfaces - for example, I need lots of trees on the red surface, but only a few on the green one?
  • [?] How do I get to have different densities on the different tree types - for example, I need a lot more blue trees than red and green ones?
  • [?] Is there any possibility to control where the populated trees get scattered - I needed more in the central zones of the surfaces and less around the edges?

Thanks in advance once again.

PS_ a ZIP with the new ‘trees’ as vrscene is attached

ThingsUpdate.zip (539.5 KB)

It really depends on various things.
Your first post was “strange” and with no attachments (just a pic of a canvas with already missing data).

With more concise and specific questions you will likely get answers from more people.

Anyhow,

  • good
  • in my previous definition all types were used… strange…
  • set a list of values (one value for each surface)
  • again, with a value per type of tree
  • with a function based of distance (sample point to perimeter)
    (dist=0 means 0% chance of “survival” ; dist=yourvalue(or more) means 100% chance of survival)
    (this is just an example, you can build a different method to achieve “more in the central zones of the surfaces and less around the edges” … you have do build up a logic first, then translating into an algorithm…)

(you’ll understand better by looking inside script)

Test_re2.gh (871.5 KB)

It works now, thank you very much! I must admit, that at the moment it’s pretty overwhelming to look at this complex algorithm, but I’ll study it very thoroughly, in order to understand the logic behind it. My goal is, to build a reliable and somehow understandable grass/foliage/plants gh-scatterer in the end. The RhinoGrow plugin works fine for the most part, but it bakes the geometry into the model and makes it heavy to work with. Here is where Grasshopper’s big advantage must be used.

As for the answering part - well, the thread was visited approximately 90 times since you advised me to provide all the missing data and I did. Still, you were the only one to answer. Maybe the topic isn’t interesting enough for most of the people. It doesn’t matter now - what matters is, that I got lots of answers to open questions.

Thank you once again!
Wish you all the best!