Human - Maintaining Layers when baking

Hi all, I’m trying to figure out the Human plugin for Grasshopper and want to know how I can bake a whole bunch of geometry which have layers in Rhino so that they go into a new series of layers like ‘Option 1’ with the same sub-layers of the original… so if the original geometries are:

Parent Layer - ‘3D’

  • Glass
  • Brick
  • Metal
  • Roof

I want to be able to bake new geometries into a new Parent Layer like:
Parent Layer - ‘Option 1’

  • Glass
  • Brick
  • Metal
  • Roof

With my script it involves working with a whole bunch of houses all of which have different layers (glass, brick, roof clad etc), I want to maintain the layers through Human so that when I bake everything goes onto their appropriate layer for quick rendering at the end. I’m yet to figure out what I’m meant to do. I’ve attached an image here to show you how I’m using the Object Attributes to group parts of the house together (so a window and wall move together).

This alternative way of baking to layers might be helpful?

Human components dealing with layers have “Full Path” mode, which lets you both read and describe nested layer hierarchies. So in your example, the desired new layers would have full path Option 1::Glass, Option1::Brick, etc. The FP output of the Object Attributes component in your screenshot also shows this for the layers of your referenced objects.

You can create new layers with this syntax with the “Create/Modify Layers” component. Right click and check “Use Full Paths.” Connect that to Create Attributes, and that in turn to Bake, and it should do what you’re after.


bake to nested layers.gh (9.2 KB)

3 Likes

Is there a way to do this that allows me to control the top level layer color while still baking it with no content?

You can use another “Create/Modify Layers” for the top-level layer and set its color that way.

Hi,

Many thanks!
This works perfectly with geometries.

However, do you also have an solution for ‘Tags’?
As they have no output, it is not possible to connect to the Bake component of Human…

Any suggestions?
image

many thanks!