Cycles for Rhino

RhinoCycles

Since Rhino WIP of February 3rd, 2015 the Cycles render engine is included. The engine is a GPU-accelerated renderer. If you have a (fairly recent) NVidia graphics card RhinoCycles will use that to accelerate the render process.

This plugin is a work-in-progress with as goal is to achieve feature parity with the default Rhino renderer for Rhino V6 basic material and basic environment. As such changes in render output and the way the plugin works are to be expected.

Currently RhinoCycles is a Rhino-Renderer style renderer, but eventually viewport rendering will be supported as well.

Usage

From the Render > Current Renderer menu select RhinoCycles. Select Render > Render to initiate a render session. Once the render window for RhinoCycles is opened one should be able to continue using the Rhino UI. Multiple render sessions can be started, but beware that this can bog down your machine easily.

When a render session is started Cycles will automatically select the first CUDA device it finds. During development RhinoCycles is tested on NVidia GT 420 and NVidia GeForce GTX 760. CUDA cards with kernel versions from 2.0 to 5.2 are supported.

RhinoCycles supports Rhino V6 basic materials. Refer to the list at the end of this post to see what currently is and is not supported.

Quality settings

Changing quality settings in the render options dialog will instruct Cycles to render at different sample counts. Currently these are:

  • Low 5 samples
  • Draft 20 samples
  • Good 100 samples
  • Final Render until stopped. This will go on essentially indefinitely. Stop the render session when you’re happy with the result.

There’s not much control yet over other settings that can influence quality.

Development / issues

If you find a bug and want to report it, please refer to the issue tracker to see if it already has been reported, and if it is already fixed. This thread is to solicit feedback from you users and to get more testing done than I currently do on my own cards :smile: Feedback includes bugs or weird behavior, but also any (good) result (for improving developer morale :wink: )

Generally fixes will be available in the next WIP release.

Note (2015.02.11) Currently I’m working on adding support for the recently added ChangeQueue, which paves the way for interactive rendering.

Render plugin status

  • [available] The plugin offers Cycles rendering as off-line rendering. The render process is a-synchronous, meaning that one can use the UI while a document is being rendered.
  • [todo] Real-time preview (AKA viewport rendering)
  • [todo] Select render device (CPU, CUDA)

Environment and lighting

  • [available] basic indirect lighting
  • [available] sun (shadow needs tweaking)
  • [available] skylight / HDR lighting
  • [available / issues found] spot light (constant, no fall-off)
  • [available] Solid color background
  • [available] Separate reflection and background environments

Status of Basic Material

  • [available] Diffuse color
  • [available] Diffuse texture
  • [available] Diffuse texture alpha channel
  • [available] Reflectivity
  • [todo] polish
  • [available] Transparency
  • [available] amount
  • [available] color
  • [todo] texture
  • [available] Bump map
  • [available] Self-illumination (shadeless)
  • [available] Emission
  • [todo] Gloss finish
  • [todo] Transparency frost
6 Likes

Today I managed to get part of the ChangeQueue working in such a way that interactive render sessions with Rhino and Cycles are possible. A tech demo can be seen in this video.

Much obviously needs to be done still, but I’m quite excited myself!

Thanks for that video!
I understand it’s a crude test but I wonder if a direction has been picked (or technicalities dictate a particular solution) with regards to having the interactive renderer work in an ‘external’ window as shown in the video (and as Maxwell Fire and probably others) versus the way Neon worked in a Rhino viewport. Personally I prefer it the Neon way.

Hi Wim,

It is in a separate window for now as not all necessary plumbing for C# plugins have been completed. There are still parts that need to be wrapped for viewport rendering to work from a C# plugin. With the current path I can work on the interactive part which is necessary also for viewport rendering.

1 Like

Just tried Cycles in the latest wip and it works fine on my laptops CPU, (two core i5) but it doesn’t work on the GeForce330M. I didn’t expect it to be fast on that GPU, but it seems to calculate, but the image stays black even when done.
Edit: There is no GPU load when it runs.

Just toying around with this right now and very pleased with the results.

1 Like

I know this is early going, but so far, the difference in quality between Draft and Good is not very great - in my current example file anyway - I had to use ‘Final quality’ and go to 300 samples to see a useful (as opposed to noticeable…) difference from Draft.

-Pascal

Am I right that your scene has many light sources, possibly together with sky- and sunlight? In the case of skylight with a texture http://mcneel.myjetbrains.com/youtrack/issue/RH-29511 and http://mcneel.myjetbrains.com/youtrack/issue/RH-29619 will help when implemented. Still, with a lot of light sources convergence will be slower.

But indeed, the current settings are in place mostly for testing. We’ll try to come up with a good set of default settings that can work in many cases. For when those don’t suffice there’ll be eventually a way to control more of the settings that influence quality and speed.

Could you please paste the device info as printed by RhinoCycles in the command-line?

I will when I am back on the laptop.

Now I tried it with my old Quadro 4000, and it is 4x faster than my i7, but the i7 only runs at 50-60% load. Do you know why? Also some white fireflies appear in the rendering.

Here is the test:
First image is GOOD quality on the GPU, took 30.6 seconds
Second image is GOOD quality on the CPU, took 1minute 18 seconds
Third image is FINAL quality on the GPU, stopped after 1 minute 18 seconds.

Probably due to the fact that i7 has 2 cores, and currently the core amount is checked to automatically determine threads. I’ve logged a YouTrack item for this: RH-29642

There are several things you can try to minimize fireflies already. Note though that some of the settings are currently there in a developer-y way and will likely change over time to something more sensible.

  • Manually blur HDR skylight texture, especially if it contains small, bright areas.
  • Fewer light sources - from your particular image I’m guessing you’re only having the sun on though. Disabling the sun will result in fewer fireflies, but obviously you’d be lacking the sun :wink:

Then there is the command RhinoCycles_SetRenderOptions

  • play with the filter_glossy setting, put in larger values
  • Toggle no_caustics toNoCaustics - this will result in transparent surfaces not transporting light, meaning that a light source on one side won’t light objects on the other side. But it will also quite a lot decrease fireflies
  • Change sample_clamp_direct and sample_clamp_indirect - start with higher values like 10, then decrease until you’re happy
  • Remember that this command and how it looks etc is temporary

One also can still let a render progress longer. As some would say: one needs to sleep on average 8 hours per day. Just start your render and go to bed! :wink:

Anyway, I hope some of these pointers help in decreasing fireflies.

1 Like

Also from me Cycles does not work with GeForce GT330M:

Command: _SetCurrentRenderPlugin
Plug-in name or ID ( Rhinoceros ): 9bc28e9e-7a6c-4b8f-a0c6-3d05e02d1b97
Current render plug-in set to “RhinoCycles”
Command: _Render
Processing light table
Processing geometry table
Using device CUDA_0 GeForce GT 330M
Rendering time: 0d 00h 00m 00s
Rendering started!
Session 0
Session 0 start
Session 0 finished in 00:00:00.4450000
Slowest 0, fastest 0, average 0
Command: _CommandHistory

The picture show the panel of material with Rhino Cycles

Ciao Vittorio

Hi Vittorio,

Thanks for the paste. If you could, please look further back in command history. You should find a piece of text similar to:

Looking for .cubins in .\Plug-ins\RhinoCycles\lib    
We have 2 devices
----------
	Device 0: CPU > Intel Core i5-2500 CPU @ 3.30GHz > 0 | False | True | False | CPU
	Device 1: CUDA_0 > GeForce GT 420 > 0 | False | True | False | CUDA
----------

edit

For some reason the material panel screenshot wasn’t showing, but if your GPU doesn’t render then your materials will stay blank too. If you want to test RhinoCycles on CPU then you can switch by using the RhinoCycles_SetDebugOptions command. Toggle use_cpu to CPU

Thanks!

Hi
I do not find the piece of text similar but:

Command: _SetCurrentRenderPlugin
Plug-in name or ID ( Rhinoceros ): 9bc28e9e-7a6c-4b8f-a0c6-3d05e02d1b97
Current render plug-in set to "RhinoCycles"
Command: _Render
Processing light table
Processing geometry table
Using device CUDA_0 GeForce GT 330M
Rendering time: 0d 00h 00m 00s
Rendering started!
Session 0
Session 0 start
Session 0 finished in 00:00:00.4450000
Slowest 0, fastest 0, average 0
Command: _CommandHistory
Rendering stopped. The render window can be closed safely.
Command: _Render
Processing light table
Processing geometry table
Using device CUDA_0 GeForce GT 330M
Rendering time: 0d 00h 00m 01s
Rendering started!
Session 0
Session 0 start
Session 0 finished in 00:00:00.4770000
Slowest 0, fastest 0, average 0
Command: _CommandHistory
Rendering stopped. The render window can be closed safely.
Command: _SetCurrentRenderPlugin
Plug-in name or ID ( Rhinoceros ): 5dc0192d-73dc-44f5-9141-8e72542e792d
Current render plug-in set to "Rhino Render"
Command: _SetCurrentRenderPlugin
Plug-in name or ID ( Rhinoceros ): 9bc28e9e-7a6c-4b8f-a0c6-3d05e02d1b97
Current render plug-in set to "RhinoCycles"
Command: _SetCurrentRenderPlugin
Plug-in name or ID ( Rhinoceros ): 5dc0192d-73dc-44f5-9141-8e72542e792d
Current render plug-in set to "Rhino Render"
Command: _CommandHistory
Command: _SetCurrentRenderPlugin
Plug-in name or ID ( Rhinoceros ): 9bc28e9e-7a6c-4b8f-a0c6-3d05e02d1b97
Current render plug-in set to "RhinoCycles"
Command: _SetCurrentRenderPlugin
Plug-in name or ID ( Rhinoceros ): 5dc0192d-73dc-44f5-9141-8e72542e792d
Current render plug-in set to "Rhino Render"
Command: _CommandHistory

My driver is uptodate
Ciao Vittorio

Hmm, if you close Rhino with Cycles as default renderer, then restart Rhino you should see this in the command-line printed. This is printed on very first initialisation of the plug-in, not on subsequent runs.

The scene has maybe four lights, BUT, two of these are rectangular lights - I tried with skylight on and off, and there was not a huge difference - I’ll try making the rectangular lights into spotlights, I imagine that will clean things up.

I did not get anything even remotely close to that quality in my test - I guess the extra sampling for rectangular lights is likely the culprit, I’ll test some more.

thanks,

-Pascal

These I havent tested much yet. Once the changequeue work stabilizes, probably next week or two I’ll get back to these for sure. My biggest problems are with point lights though. I seem to have made somewhere a change that makes those always work on full intensity. In theory rectangular lights will be much better…

Nathan, While we are on lights, one other thing I noticed is that light intensity is much, much greater in Cycles than in Rhinorender - basically the intensity is very much higher than RhinoRender’s 100% setting and the intensity does not pay any attention to the number - it’s always full blast, and can only be changed by making the color darker.

-Pascal

This is exactly what i meant :slight_smile: I am aware of the problem, and will be working on it once I’m through changequeue work (for interactive rendering, ultimate goal in viewport).

Basically I’m trying to find a good emission shader to use for lights. The biggest issue I’m having is that some light sources in RhinoRender don’t have a fall-off. There is a way to simulate this in Cycles, but as you can see, something is not right with the current emission shader.

On the left is the image calculated by the CPU and on the right is the GPU version.
The CPU on the laptop is used at 80% on average over all four threads (two cores)
((PS! The i7 workstation that only gets a 50% load has 4 cores, not two as you stated))