Why some materials don't preview on rendered mode in RH6?

Hi everyone,

I’m just testing new functions on rh6 and suddenly I’ve got this problem when trying to connect some of the materials used in the rhino file and reference them in grasshopper. In fact i was trying to reference all the materials at once and automatize this procedure to avoid charging and define them manually each time…

Hope you have some idea about this!

Thanks a lot!


problem with materials.gh (6.9 KB)
problem with materials.gh (6.9 KB)


Just an observation for correctness: For a metal you should set the diffuse color to black (Color), and set the Reflection color to what you want.

Similarly for glass/transparent objects Color is black, but now Transparency color should be set to what you want.

I haven’t looked at your files yet, though.


Thanks Nathan, you’re right, I can’t upload the rhino file, in which the material appears referenced like that, I upload through this link:

The problem is that I have created several materials in rhino for another file in gh and then, open this same gh in a rhino file with the same materials and doesn’t work…

The .3dm file you attached doesn’t contain the GO_1 material your .gh file references. But when I change to any of the materials that do exist it all works just fine:

right, I don’t know what happened with that file, it erased the material, here you are:


Hmm indeed, not all materials appear in the list that pops up when RMB the material port.

I have created https://mcneel.myjetbrains.com/youtrack/issue/RH-43961 for this issue, and it is on the list of @DavidRutten to further investigate (and probably fix).

I had also some problems with this component : see this

thanks a lot Nathan!!

any news?

Was about to start on this one, but the files are gone.
Can you upload them to discourse so they aren’t on an automatic deletion schedule?

This may not be related (or even specific to R6?) but I discovered that a Group component inserted in a geometry flow prevented the grouped objects from appearing in R6 ‘Rendered’ or ‘Raytraced’ modes. The custom Preview ignored the contents of the group, unlike ‘Shaded’ or ‘Ghosted’ where the same objects appear colored as expected. Problem solved by skipping the Group, which wasn’t needed anyway.

On the plus side, I have to say that the integration of an UNBAKED GH model (the steps in the foreground below) into ‘Rendered’ and ‘Raytraced’ modes with Rhino geometry (someone else did the boat) is stunning!! Will be even more so with true materials applied to the GH model surfaces, not just colors.


Ah thanks. Groups are indeed skipped when adding render meshes. Logged under RH-45900 (round number!).

Hoping to get around to this soon, as I’m rewriting the custom display -> rendered content logic now.

Try some (: just add them to the Rhino document, then select them as input to the preview component.

I’ll get around to that, and may well revisit your GhShaderNodes plugin when rendering becomes my highest priority. Speaking of that, let me suggest (again?) that to make an impressive demo, the GH file needs to show some rendered geometry. Seeing it work is to understand the possibilities instantly. It provides motivation to seek out the details of “how to”.

I love R6 but… there is a lot of trepidation and anxiety exploring the new ground. Concern about R5 compatibility is chief among them, but many other distracting issues too.

RH-45900 is fixed in the latest Service Release Candidate

I’m interested now in understanding this better and have questions.

When I right-click the ‘M’ (Material) input of Custom Preview, the “Set one material” option is disabled unless I have defined materials in the Rhino file. So in Rhino, I define a material corresponding (and assigned to) each layer where I intend to bake the parts and set that material on each of the custom preview components in GH. Later, if I open the GH file without also opening the Rhino file where I created the materials, “Set one material” is disabled but all modes of the rendered preview still look correct? How/why does that work?
Q1: Are the materials assigned to Custom Preview components saved in the GH file?

Q2: This thread (above) and others show a text panel connected to the ‘M’ (Material) input of Custom Preview but that fails for me, every possible which way, whether or not the Rhino file has the material defined, giving a rather nasty error message:


It doesn’t matter whether or not geometry is supplied:


How is the ‘M’ input supposed to be used?

The name should be exactly as in the Rhino document. Not sure why you’d get that exception. That is something for @DavidRutten to know. When setting a material through the Set One Material, I guess the component essentially internalizes a ‘simulated’ version of the material. You’ll find that those that have a textual input through say a Value List don’t retain the (simulated) material info. Exactly how and why it works like that is also something @DavidRutten can tell you more about.

IOW for Q1 it depends how the assignment is made.

Q2, I don’t know.

Are you on latest Rhino 6 when playing with this?

Yes I am. Portability of the GH file is the critical issue for me, preferably without sending a Rhino file with it. I’ve tried everything with a text panel connected to the ‘M’ input and can’t get it to work at all??? Is that input nothing more than a well hidden right-click feature?

Hacking still required to make R6 useful after all these years?

Please attach a GH with definition that fails in your case, along with 3dm with materials you are trying to reference.

The contents of the .3dm file were baked Custom Preview components with the ‘M’ inputs right-clicked and set to materials created in the Rhino file. The materials persist in the GH file that created them (not attached) and render correctly with or without the .3dm file.

I have never seen a text panel with a material name work.

I have connected panels to Preview without getting the ‘Component Exception’ error.
AHA! Just noticed that the exception is caused by having parentheses in the text panel. If the .3dm file is open, the error persists regardless of which panel is connected. When the .3dm file is closed, the exception goes away until the .3dm file is reopened or the “gasket (Plastic)” panel is connected. Very confusing because again, “dogs” and “gasket” without “(Plastic)” should work when the .3dm file is open?

custom_preview_2020Jan12a.gh (10.1 KB)
custom_preview_2020Jan12a.3dm (1.4 MB)