add a Cycles XML material in the material editor - give it a useful name
add an object, assign the Cycles XML material to it
switch your view of choice to Raytraced
start Grasshopper
add an Output node
add a Diffuse BSDF node
add a colour swatch - give it a dandy colour of your chosing
wire swatch to Diffuse BSDF colour input
wire Diffuse BSDF output to Output node Surface input
Right-click Output node icon, select the name of your Cycles XML material
force recalculation of your shader solution.
admire your handy work in the Raytraced viewport.
edit:
You use the custom display component when you want to assign materials to GH created geometry. You’ll still have to add that Cycles XML material in Rhino material editor, and hook it up to the Output node before you can chose it in the custom display component.
Can you point me out to a website similar to “Rendering for complete idiots”?
What’s what like what is BSDF and what does Volume mean as a rendering term. What is Closure? Displacement? Fac? IOR?
That is the Cycles engine documentation. Not all is directly available like that, but it should give you a good starting point of understanding the engine and integration as Raytraced.
Cycles XML material, not Raytraced Blend Material. You get the Cycles XML material by giving TestShowPrivateContent.
Obviously Raytraced Blend Material should not crash. Did you send in the report? Are you on the latest version of the Raytraced Blend Material (check in TestPackageManager)?
The blend material is exactly that - you can blend Rhino materials.
In the material add a Metal and a Plaster. Give the Plaster some distinct color. Orange is great. Now assign the materials to the two material channels in the blend material.
The fun part is when you add a texture in the factor channel. Put for instance a 2D checker texture. You’ll get a great effect. That is seperate from the Grasshopper Raytraced shader stuff, though.
GhShaderNodes isn’t playing that nicely with the rest of GH yet. Really only GH_NumberSlider, GH_Color are understood - and the GhShaderNodes components don’t do anything useful in the rest of GH. They are there (currently) to give you a way to manipulate the shader graph of materials.
I suppose one could possibly hack something like that. I have to think about that in the near future. It might work, or it might not, with the current way the plug-in does its thing. You may want to peak at what the Output component generates though, pipe it to a Panel…
HAHA, usually every question that I ask should be considered penultimate.
Also I was thinking about making use of NodeInCode library ;), but how do I create new material from python (you know so I can create cycles.xml for each object in my scene).
You’ll have to read the GhShaderNodes code to see if you could replicate that with a Python script. The most interesting part starts in the SolveInstance of the Output node: