Cycles Raytraced mode support request for GH Slider Animations

This would be an awesome feature to test in Rhino 8 WIP.

this feature can be achieved on 7

It seems to work for render mode, but not for ray-trace mode.
My title was a bit vague, it should have clarified ray-trace mode (added it to the title).
If the ray-trace mode works, I must be missing something, That would be good :slight_smile:
I’m using 7 and 8wip

            // Capture view.
            var cycles = myView.RealtimeDisplayMode;
            var oldpasses = cycles.MaxPasses;
            cycles.PostEffectsOn = true;
            cycles.MaxPasses = 2;
            cycles.Paused = true;

            var viewCapture = new Rhino.Display.ViewCapture();
            viewCapture.Width = imageWidth;
            viewCapture.Height = imageHeight;
            viewCapture.ScaleScreenItems = false;
            viewCapture.DrawAxes = false;
            viewCapture.DrawGrid = false;
            viewCapture.DrawGridAxes = false;
            viewCapture.TransparentBackground = transBG_ON;
            viewCapture.RealtimeRenderPasses = 10;

            var bitmap = viewCapture.CaptureToBitmap(myView);

            // Save image.
            string filename;
            List<string> images = new List<string>();
            if (!saveSeries_ON)
                filename = string.Format("{0}_{1}.png", fullPath, "Capture");
                bitmap.Save(filename, System.Drawing.Imaging.ImageFormat.Png);
                // Assume index=0 for the first filename.
                filename = string.Format("{0}_0.png", fullPath);
                // Try to increment the index until we find a name which doesn't exist yet.
                if (System.IO.File.Exists(filename))
                    for (int i = 1; i < int.MaxValue; i++)
                        string localName = string.Format("{0}_{1}.png", fullPath, i.ToString());

                        if (localName == filename)

                        if (!System.IO.File.Exists(localName))
                            filename = localName;
                bitmap.Save(filename, System.Drawing.Imaging.ImageFormat.Png);
            cycles.MaxPasses = oldpasses;
            cycles.Paused = false;

            DA.SetDataList(0, images);

try this code, I copied from my plugin. it works in c# component, but need some modification.

Set viewCapture.RealtimeRenderPasses to a higher number to get better converged results.

1 Like

@nathanletwory Something that could be considered for the Rhino 8 WIP Slider Animation feature with the added parameter for viewCapture.RealtimeRenderPasses or inherent that from the render setting? Based on the @zhuangjia777 C# example it may be that most of the elements are there to connect to the slider animation feature. Quite a big functionality gain based on the cycles integration.

This is already logged as RH-64509 Grasshopper animation should support Raytraced.

I’ve added this topic to the issue.