Help Rhino Materials and bake to layer created In GH

"Hello all. I am trying to bake an object with materials from the Rhino Render library onto a new layer created in Grasshopper.

I have tried Human, FabTools and vanilla Rhino 7.

I also found some scripts, one made by @Zhuangjia777 (Now you can select rhino material in grasshopper) (Profile - zhuangjia777 - McNeel Forum). This helps with getting a Rhino library material into GH. But that material text output does not seem to work with either FabTools or Human.

The definition/script made by Joseph_Oster does not allow material to be put on a new layer.

I do need a NURB output, not a mesh, since the objects will be totally created in .gh. I am not sure if UV mapping is an issue. Objects would be flat, kitchen cupboards etc.
thanks all


RenderMaterialtoLayer.gh (247.4 KB)

Good evening @seanSpace
Elefront maybe?
It has different baking options (Attributes) that may work for you. I would have to try it to be sure that it would work for you.
eleFront | Food4Rhino

Hi Ryan, thanks for replying on a Saturday !

Elefront did it, thanks so much!!!

I was focused on materials I created rather than using “materials from the Rhino Render library”, if that’s what you mean? Otherwise, it certainly does implement assigning materials to new layers.

That code (open source Python) could use an update, preferably by someone who knows Rhino APIs better than I do. Ideally, bake functionality would be included in Grasshopper… :roll_eyes:

No problem! Happy I could help! :grinning:

Yes, thats defintally what I mean.

Your definition works perfectly, just not for my particular sitaion where I need to access Rhino render materials. In fact its overkill for my use case.
I dont think its necessary to update it as its running quite well, I am running Py 3.10.9.

My another plugin surface relief has component which supports texture bake and raytrace in grasshopper. Although this plugin is charging, most components are free to use.

material_with_image_texture.gh (18.0 KB)

@zhuangjia777 This is amazing! I have been looing at this in blender and wondering if we could do it in rhino with the shrink wrap.
I have started to set up a point e in the local and create a python to activate it. Love this.
Its a bit pricey for me at the moment. But Ill deffinitally play with the trial and perhapds convince someone to but it for me down the line.

Urg!!! It was wall working last night, but then I fiddeled to get make it more “user friendly” and now its no longer baking the material to layer. I apprciate any help. Here is the definion.

It all works up untill the point where @zhuangjia777 script meets elefront.

The materials chosen works in custom preview but not in EleFront.

Thanks all, when you have a moment, I know its sunday, its not life or death urgent.

thank you
ChooseRenderMaterialtoAndBake.gh (20.5 KB)


explain material.gh (13.2 KB)

Ok thank you but ideally I would like to use a path not set up a PBR.
Although a PBR will probably work better for my overall goal of exporting straight to unreal / twinmotion because rhino materials dont seem to work well using datasmith, when transferring to TM oir UE5
But I believe that might be to do with the UV mapping
(Twin Motion Texture Mapping: Is it really this bad?) so I planned to use a csv file substitution file to convert materials to unreal (Twinmotion) This might save me that step, if the PBD can go directly though. But this might be another subject
I think the big thing is to set a material (rhino or PBR) via its path and bake it to a layer. It does not seem like I can input the path to the PBR material creator. That I can see ?
Thanks @zhuangjia777

I will add a new component for this

That would be fantastic! Ill