Grasshopper will notify that some components couldn’t be found. Note the Install button in the bottom of that dialog. Click it to install GhShaderNodes
Restart Rhino
Reopen Grasshopper
Create a shader graph with the components under the Shader tab, add at least an Output node
In Rhino run _TestShowPrivateContent
Add a Cycles XML material
Select the Cycles XML material in the Grasshopper definition through the context menu of the Output node
Assign the material to an object in Rhino
Switch viewport to Raytraced
Tweak shader graph
And one how to combine the GhShaderNodes material with GH geometry in the Raytraced viewport
Make sure you have done the above
Create some GH geometry
Add Custom Preview component
Pipe your GH geometry into the Custom Preview component
Limited accepted/understood GH component inputs: number slider, colour picker object
Only beginnings of multi-shadergraph-with-one-output-definition (i.e. connect two different colour picker objects into the same BSDF color input resulting in two different materials)
Not all Cycles nodes have been wrapped. If you really, really, really need one that isn’t there yet, request it
Hahahaha, applied several materials without previewing and then switched to RT. BOOM, Rhino crashed.
Now I have another question. Is there possibility to get Cycles XML material to preview in Renderred mode? Default Rhino materials works in both modes, but Cycles specific only in RT.
In Blender 2.8 it’s great to have same material in Cycles and Eevee (with small tweaking, especially for glass material).
There’s totally unlogical thing. Why not to connect material input in previewer node, just link material by node’s RMB menu?
There is a reason why it is still behind a test command. Please find the RhinoCrashDump.dmp file on your desktop and upload to Rhino - Upload to Support with nathan@mcneel.com as recipient.
In the future, at some point I’ll create a translation to GLSL.
Historically GhShaderNodes came before the bottlenecked Custom Preview for Rendered, Arctic and Raytraced. Since this tool was created initially to help me create the conversion graph from Rhino materials to Cycles shaders, therefor there was no need to make the output of Output into anything other than Panel. No doubt eventually integration and workflow will be improved. But that is for v7.
@nathanletwory I detected what seems a little bug in Principled BSDF component: Subsurface Radius and Subsurface Color seems to have the names “truncated”
@LukaszKosciesza, can you recreate the materials as you did prior to the crash, save the GH and send it to me? Did you use any polish language characters in your naming of components?
The message I see here is Podczas analizowania elementu Name nastąpił nieoczekiwany koniec pliku=An unexpected end of the file occurred while parsing the Name element. It’d be good to have the file that caused to create bad XML.
The component works as it should. Subsurface takes a number [0.0..1.0] (from fully off to fully enabled).
Subsurface Radius takes a vector \overrightarrow{v}, but a color will do to. The constituents of \overrightarrow{v} each control how much the Subsurface Color gets applied essentially, again each with a domain of [0.0..1.0].
Subsurface Color takes just a color (but a vector will do, too).
This video might be helpful to everyone that isn’t already familiar with shaders in cycles. At a glance it looks like @nathanletwory has the majority of this stuff implemented, so hopefully any minor differences don’t create more confusion for everyone.
indeed it does! thanks.
but not quite there jet. what about the “couldn’t read verctor” warning, which vector? the normal from the surface? what if it is not a flat surface?
I’m not sure what that warning is referring to, the surface normal or maybe something to do with the mapping maybe? I can’t think of a reason that it would be effecting the output though since there’s no texture image or displacement.
Hmm, I’m not having any luck with bump or displacement for some reason. I was able to make something that looked decent, until the rendering cleared up and made it look perfectly smooth. Most likely user error