Installing shader nodes for Grasshopper / Raytraced (Cycles)

I’m surprised that this works for people because I didn’t see you removing the mark of the Internet from those files before you tried to load them into Rhino/Grasshopper.

When I download files from t’Internet, the files are given a file attribute that marks them as having come from t’Internet and dotnet will NOT load them with that mark (they are cursed and have the mark of the devil upon them).

If I haven’t opened the zip file with the Windows File Explorer yet then I can right click it in Explorer and select properties and check the unblock checkbox. I can then use Windows File Explorer to open the zip and its contents wont be cursed with the mark of the Internet.

Files in a cursed zip, if opened via the file explorer, are themselves marked as being from the Internet.

If you have already unzipped them and copied them to an other folder then either: select each file individually in explorer and uncurse them. Or… delete them all, uncurse the zip then copy them again from the uncursed zip.

@nathanletwory, you warlock! Why are you cursing the files? :smiley:

Hi Nathan,
I’m trying to replicate exactly the same of the video, all it works here until I put the procedural texture. when I do this, rhino crash. I’m using Rhino 7 and installed the plugin from the package manager.

What procedural texture are placing? It may be that the GhShaderNodes package is out of sync with Rhino 7, I haven’t used the plug-in myself in a long time, nor made sure it still works.

Why did u do it so…? Lol

Hi Nathan, I installed the shader nodes for Grasshopper v0.0.9 in Rhino7; all OK except this message under the Principled BSDF component saying “couldn’t read vector”. Also, transmission slider 0<1 has no effect whatsoever… the object stays totally opaque.
Any clue?

Glass component works OK though, although no colored shadows.

Many thanks


I haven’t maintained the ghShaderNodes in a long time - there has been an update to Cycles in Rhino 7 as well, most likely Cycles API changed and ghShaderNodes fell out of sync.

Thank you, I see… In any case the glass in ghShaderNodes works better than its Rhino equivalent, at least as shadows are concerned.
Cheers!
:+1:

Yes, because Glass BSDF functions as an opaque material when it comes to shadows. You will see that you won’t be able to light objects behind objects with a glass BSDF (or principled BSDF that works like a glass BSDF).

edit: try creating a box with a glass side and an object inside, then have a light in the scene that you want to light the contained object with from outside the box:

Yes it has a strange effect… the sphere is not totally in the dark, but the glass is dark grey and has very little reflection, either with BSDF principled or BSDF glass

It would be really good to have full control over shaders through Grasshopper though. In principle it’s a great idea.

Thing is that in Cycles the glass BSDF and principled BSDF transmission are opaque from shadow rays point of view.

To be able to light through glassy materials you need to throw in a mix shader and a transparent BSDF shader and a light paths node and drive the mixer with Is Shadow Ray to select the transparent BSDF.

This is how Rhino glass and transmissive shaders are set up.

Something similar to this in Blender, right?
(This is rendered with Eevee, not Cycles btw, as with Cycles in Blender you do get transparency with Principled BSDF)

In Blender Cycles even current 4 you don’t get such for free. Here a setup with the top box that has a glass panel on the top - a thin box with a principled bsdf on which transmission is set to 1.0 and roughness to 0.0. You see no lighting through the transmission material:

You could use a mixer node to mix in transparent bsdf with fresnel, problem is that it doesn’t work that well on flat glass panels. Back in 2014 when I worked on the first integration of Cycles into Rhino this was the first way I tried to solve this problem, but it didn’t work well for all situations as you can see in the screenshot below:

The terminator is a big problem.

Instead, this is the (simplified) solution we use:

If you want to know how our shader graphs look like you can in the advanced settings search for DumpMaterialShaderGraph. Set it to true and restart Rhino 8. Now every time a session is rendered (preview, raytraced, render) all materials that are seen are dumped to user profile folder to .dot (graphviz) files. With the dot tool from graphviz you can then get a PNG with the shader graph.

I would recommend to not leave it on for too long, since it can generate a lot of files over time, and these aren’t cleaned up automatically. I use them here to figure out when something broke with materials for instance and makes it much easier for me to reason about needed changes.

For instance a Physically Based material with opacity and roughness set to 0.0 looks like this:

It gets more interesting when you add decals in the mix.

1 Like

That is very interesting indeed! Thank you. Does it work with Rhino 7 as well?

No, I introduced that setting only in Rhino 8.0 to help me debug shader issues. This is something we didn’t have in our older Cycles version.

And shaders between Rhino 7 and Rhino 8 changed quite a bit, especially since we introduce native Rhino procedural textures into Cycles in Rhino 8. As in implemented Cycles native versions of those, so that we don’t have to bake textures anymore.

@nathanletwory I’m sure I’ve missed this information if it’s somewhere in this thread. Is it possible to install the Shader nodes in Rhino 8?

No, I have not maintained it for Rhino 8.

Ok. Thanks for the swift response.