Raytraced (Cycles) shader progress

[quote]Hmm, I don’t quite get that :open_mouth: If you have a Blender Cycles node setup, you could post a screenshot of what you mean. That might help a lot

Sure, i mean something like this should control the backfacing, or make an emission shader cast light only in one direction:

But it does not work in rhino cycles, maybe because i am using the blend component, as there is no shader mix component ?

btw. the color of the transparent component is set to black, if i turn it to white, if still does not show the red of the emission component, but i can see that the backface is colored differently…but no red.

…edit, ok, it seems that the default strength for the emission is set to zero, if i change this to 1, the red color shows up. Is this the correct way to make backfacing materials, in this case make an emission cast only into one direction ?

it does not seem to work using the groundplane feature though, so i added a plane below the half cylindric shape.


Weird, it should all just work. This is what I can get:

Yes, something I need to fix still. Annoys me too :smiley:

For the transparent BSDF to work (be completely transparent) you indeed have to set it to pure white. Any other color = tinted transparency.

Yes, backfacing or frontfacing, depending on what you put into Closure 1, what in Closure 2 :slight_smile: For the Blend node (which is just another name for the Cycles mix closure node) if Fac is 1.0 it will be completely Closure 2, if it is 0.0 it will be completely Closure 1. If a face is viewed from the back the Geometry::Backfacing output will indeed be 1.0

It works with ground-plane, just not that well with the shadow-only version, because well - it is only catching shadows, not light! :slight_smile: If you want to magical ground-plane, make sure it has a material.


Hey @nathanletwory and @clement,

short confirmation: for me, the SSS BSDF works as Nathan describes it…
Weird, that it doesn’t work for you, Clement…

@nathanletwory and @romio82,

i´ve found the reason, it seems to happen only when rendering using GPU (Tahiti), using my CPUs it renders in color instead of black. Hm, does cycles support SSS via GPU ?


Ah right, indeed. OpenCL isn’t feature-complete yet: https://www.blender.org/manual/render/cycles/features.html - so on CUDA and CPU it works.

When I get otherwise Rhino features working on CPU/CUDA rendering I’m sure we’ll make a jab at all those missing stuff as well. OpenCL isn’t the highest priority yet, unfortunately (I do have a Tahiti in my dev machine as well, but it isn’t my default render device)


@nathanletwory, please try to assign a texture to a shaders color slot as well. It fails to render the image over here properly when GH is used, i only get a distorted result with strange banding. This happens with GPU and CPU. Also i do not know how to make it use UV texture coordinates yet.


can it possible to use Cycles in old Rhino release, as Rhino 5?
Regards - Germano Pecoraro - italy

Not with this plug-in. This one is specifically for Rhino WIP, as it relies on the ChangeQueue. The ChangeQueue is a new piece of SDK, which does not exist in Rhino 5.


This is how you use Image Texture (and Environment Texture) node.


@nathanletwory, here is what i get, looks the same using GPU or CPU:

The image texture, how it should look like, is displayed in the lower left. The surface is using surface mapping, it does not change anything if i use “Generated” or change any mapping type. This also happens if i use any other image through GH nodes. The same image appears correctly when used through eg. a custom material but not with GH.


Hi and thank you.
Where can I download Rhino WIP (link please)?


@clement, could you send me the 3dm and gh files? I get correct texture mapping myself, but maybe I’m missing something? Your setup looks correct. The wrong render result looks similar to the HDR loading problem for Environment textures.

Does texture mapping otherwise work correct in Raytraced with the Picture material?


@nathanletwory, it works alright using the picture shader. Attached are the files, you might reassign the path in the image component. grid.zip (135.1 KB)

btw. it would be helpful if we do not need to copy / paste the path into the image component. If i have a path in my clipboard, right click on the image component, then right click on the emty field, then choose “paste” from the context menu, the path is not pasted and the context menu closes. I have to click into the text field, then CTRL+V to get the image path inside that field. If i input an invalid path by hand, or press enter to early, Rhino 6 crashes.

A similar crash i get if i connect a regular color component to a color input. (The litle swatch instead of the large one you used in your demo videos).


I have a small fix for that crash and some others here locally. I’ll send it to you guys tomorrow.

Indeed it would be nice to have a better way to assign the image file path. I intend to add some sort of file dialog here instead, once I’m done with the shader conversions. Will have to figure out how to do that.

Correct, only the few original GH components as I mentioned in my post to you pre-alpha testers are currently supported as inputs: colour picker, number slider. I’m still working on the better shader conversions, so this isn’t the highest priority yet. I need to focus on the shader creation, not the code atm. It will be fixed at some point though.


@clement, if I open your file, it immediately crashes - probably because one of the viewports is set to raytraced and the GH as well as the image aren’t set up correctly for my machine yet…
But if I import your file, open the GH, reassign the path and connect UV from the TC component - everything works as intended. I get the plane painted with the image… :slight_smile:
Again strange that it doesn’t for you!
Could you maybe reupload your Rhino file without the raytraced viewport?

@nathanletwory, some kind of open dialog would be amazing! Or maybe a second input for the filename that can be used with the filepath component (which already has the open dialog included (right click - set one file path))? Could be a bit more flexible…

@romio82, here is the scene set to wireframe. grid.3dm (120.7 KB)

I think this is another bug, if a path is wrong, which likely can happen, it should not crash. btw. +1 for just using the filepath component or adding some file opening mechanism to a custom image component.


Yes, I wrote that I have already a fix for that :slight_smile:


The image sampling is too low, can you fix that please?
The image to the right is open gl, so as you can see the floor isn’t sampled well enough.

I must say that cycles is doing a fine job with simple landscape renderings.
Well done!

1 Like

Nice patio you have there :slight_smile:

@Holo, I am right now working on shaders (except I did a 1,5hr stress/practice test of Raytraced),ensuring good texturing is part of that.

I’ll have to make sure I select good interpolation type so the sampling of textures is better.