Internalise PBR materials in Grasshopper for rhino.compute

Is it possible to internalise PBR-materials (Normal, Texture, Bump) in a script for rhino compute with the native components or is there a workarround?

Maybe with a C# component? How to read PBR material data in GH in Python based on a GUID - #2 by maje90

Thanks!

Iā€™m not sure, but what is the use case here?

The use case is to get it in a native Rhino.Compute web 3d calculation tool without using extra plugins or other known services.

You could return a doc instead of geometry. A doc can contain anything you can save in a Rhino model of course, including materials.

This example has a gh definition that creates a doc, adds geometry and materials (in a C# script) and returns the doc as a string that is then deserialized with rhino3dm.js. rhino3dm does support reading PBR materials from a Rhino file.

1 Like

Hi all,

I am using PBR materials as well by first creating them all in Rhino and then I capture them into a shader component into Grasshopper where once they are internalized they are kept stored as xml material.
Working fine till now for me. I can have that shader component in any of my scripts and call one of the stored materials in the collection.

2 Likes