Cycles + Grasshopper | recreating a plastic shader


(Nathan 'jesterKing' Letwory) #1

I started he Cycles integration into Grasshopper to allow me working more quickly on better shader definition conversions for the basic Rhino materials.

Today I’ve been chipping away at a plastic shader that I’m pretty happy with.

I’ll still be tweaking the definition, so don’t expect it to be in before the week-end (and I’ll be working next week on RhinoCycles viewport integration), but I wanted to show how nice it is now to work on these materials :slight_smile:

And tease a bit


Rendering in Grasshopper
RhinoRender vs OpenGl vs Cycles
Rendering and Material Improvements(?) in Rhino

Amazing Nathan! Congrats for the nice achievement


Are the shader and render tabs not available in the current GrassHopper WIP? I don’t see them anywhere.

(Wim Dekeyser) #4

No, they are not available yet.

(Nathan 'jesterKing' Letwory) #5

Indeed those aren’t available yet.

The plug-ins that add those live for now on my machine as I develop them for my RhinoCycles integration work - I use them to interactively work on shaders and to see interaction of changes to shader definitions as I go.

Currently Rhino WIP has pretty good converted shaders (rhino -> cycles), except for reflection. Doing it the old method takes way too much time. These plug-ins help me iterate in a much improved cycle.

The old way of doing shaders entailed: trying to understand how Rhino Render renders a specific material, say plastic, recreate that in Blender, tweak until it looks in Blender Cycles similar to that in Rhino Render. Then look at the nodes and write that manually as C#. Compile RhinoCycles, start Rhino, load a test scene, switch to Raytraced mode. So, Grasshopper helps me a lot. When I am done with those conversions and the integration of Cycles in Rhino is in the very least awesome (it is getting close, but I can still improve…) I think we’re ready to also get those shader components to the public. So, until then I’ll let you enjoy the potential through videos and through the shader conversions I am working on :slight_smile:




@nathanletwory, i’m looking forward to some gloss, especially with translucent materials :wink: :slight_smile:

happy coding,

(Nathan 'jesterKing' Letwory) #7

Gloss as in the “old” glossy finish is a bit problematic. But something that simulates essentially coating is possible. That said, I’ll probably be working on ‘tinted’ bsdfs - way to color the specular highlight through the bsdf

(Andrew le Bihan) #8


Can you specify what you mean by “gloss”?

  • Andy


@andy, i mean the fake highlight:

that does nothing yet, including the color change. Not sure if it is possible.

@nathanletwory, what kind of Glossy BSDF is cycles in rhino using ? (Ashikhmin-Shirley, GGX, Beckmann or a mixture ?)



Gloss is specular highlight.

(Nathan 'jesterKing' Letwory) #11

@clement , the Glossy BSDF does Sharp, GGX, Beckmann or Asihkmin-Shirley (see source code).

Problem with using a Glossy BSDF mixed in is that the specular highlight still doesn’t behave as the Gloss in Rhino custom material. The Rhino custom material gloss is a coloring of the highlight, essentially tinting, which doesn’t exist (yet) in Cycles nodes.

I’d be happy to mix in a Glossy BSDF to simulate Rhino custom material gloss, but it won’t get close to how Rhino Render handles it - or the Rendered viewport mode. When I get to it I should continue with my tinted BSDF patch that should give better control over specular highlight color in the BSDF.



@nathanletwory, thanks for the link. Will it be possible to mix the shader types and control the factor eg. with a UV gradient or procedural noise to blend between eg. plastic and metal ?

btw. i´ve tested some colored procedurals with OpenCL and been surprised that it worked :wink:


(Nathan 'jesterKing' Letwory) #13

@clement, I don’t think such advanced mixing of existing Rhino basic materials will be in any time soon, but I could tag @andy so we can discuss this later. Somehow stacking those materials and mix them in some way controlled by textures may be an interesting thing in general.

For node-based material definitions, you may have seen:

That is to say it is technically possible to have something like that, but it isn’t high priority yet.



Thanks, that is very close to what i had in mind with blending.



hi nathan,
i’m a rhino mac user but i can’t wait to try grasshopper-cycles so i’m planning to buy a win license to use it inside rhino WIP (i’ve seen in the forum that waiting for cycles for mac could be a long waiting).
all the features you showed in this videos are available if i purchase also a win license?
what about the texture mapping? could i drive its directly from grasshopper?
thank you for your wonderful work,

(Nathan 'jesterKing' Letwory) #16

Cycles is available in Rhino WIP as the Raytraced viewport mode. At this moment the GH components are very much pre-alpha state, and in use mostly by myself to iterate through the conversion materials. I do plan to have it one way or another available to the public at some point, but I haven’t made any roadmap for that. Finalising great integration of Cycles as Raytraced viewport mode (i.e. “button free” rendering) is now main focus point.

Keep following these forums, I’ll be posting news regarding these things here (and on my twitter and youtube accounts)



ok, thank you for your message,


Nathan, could you please drop some example files?
that would be the fastest way to learn your cycles shader tool

(Nathan 'jesterKing' Letwory) #19

Does work for you as example? It is the current conversion graph.

You’ll find a ‘debug’ group with an output node. This is what you should use to attach a Cycles XML material to.


This is what you should use to attach a Cycles XML material to. >>>> thats the tricky part i think > could u explain how pls

thnx for the example link