Baking objects with groups

I am migrating my definitions to work with Rhino 6. Actually I had a script for baking which no longer works in rhino6. So I am trying to use Lunchbox’s bake. I cannot figure out how to bake grouped objects with it. I misses the group input which existed in my former script. Any idea how to do that? If I am trying to use the group widget nothing is baked. Or are there any other bake solutions stuff with groups?lunchbox bake

Try this:

1 Like

Try right clicking on the ‘quick baker’ from Heteroptera. That will give you the option to group upon bake.

Thank you. Actually I see neither color nor group input on the Bake widget. I cant figure out how it works.

Use the standard GH Group component, of course, as shown in the example provided.


mMaterial_bake_to_layer_2020Jan30a.gh (39.5 KB)

Color is a property of material which is set using the provided mMaterial component, as demonstrated in the same code example. It’s all there, try harder. Much harder.

I am trying to use your mMaterial_bake_to_layer_2020Jan30a.gh example. Alas the generated cones are colorless.

Colors are only visible in ‘Rendered’ mode, not ‘Shaded’ mode. Works for me.

mMaterial_bake_to_layer_2020Dec6a22

What is the error message on the red Output component?

P.S. Wait a second, there is no Output component in mMaterial_bake_to_layer_2020Jan30a, only in STEP1_mMaterial_bake_to_layer_2020Jan30a.gh. It should work either way. Please be accurate.

Joseph, Thanks for you help. Actually in my version 5 script I could generate objects colors which worked in shaded mode. See attached image. Is it possible with your script? Usually I dont work in rendered mode if not really necessary to save computing power.

The color (and other material properties) you see in shaded mode is a “preview color” that will disappear when you close the GH file or move the baked geometry away from the GH preview. The image I posted above is ‘Rendered’ mode showing baked geometry with the GH file closed.

Start with a new empty Rhino file and look at the Layers panel when you click ‘Bake’. You will see materials being assigned to each of the new named layers. My old laptop running R5 is broken so I can’t verify what happens in R5 anymore but there is nothing about this that is unique to my Python bake component, the same things would be true if you baked objects and assigned materials to layers the old manual way (one at a time) .

I don’t know what more to say. The thread I referred you to discusses all the issues extensively.

I dont understand. The color does not disappear in shaded mode without Grasshopper. Here is the file. color.3dm (112.2 KB)

In R6 Shaded mode I see your blue box:

It’s blue because you’ve set the box’s ‘Display Color Property’ to ‘Other’ instead of the default ‘By Layer’. That might be equivalent to the ‘Material Source’ (;mSrc) input of my Bake component but there is this line 18 in the Python that limits possible values:

if (mSrc < 0) or (mSrc > 3): mSrc = 0 #must be 0=layer, 1=object or 2=parent

I’m not going to dig any deeper into this. Every moment I spent writing it in the first place was painful. Sorry if it doesn’t work for you, others have found it useful. Good luck.

P.S. Preview colors appear very different (dull) in your R5 file than what I see in a new R6 Rhino file.

Thanks anyway. I am not a programmer. I am just an architect.

Neither of us should have to mess with programming this at all, the capability ought be built into standard GH - many years ago!