Raytraced mode slowness

So what is the actual change/fix to look for here ?

The linked YT item RH-42000 is about giving macro/scripting support to pause and unpause Raytraced. This discourse topic was linked to the YT item.

This release candidate though also has speed improvement for ViewCapture* commands that need to rerender. Instead of updating the final result buffer during the rendering it is now done only at the end. This will give a huge performance boost especially for large resolution captures.

There wasn’t a separate YT item when I made the changes, but you can check it here if you feel nerdily inclined: https://github.com/mcneel/RhinoCycles/commits/rhino-6.6 . the commits from May 18th, 2018.

Guys -
What’s the ACTUAL outlook for making RAYTRACED mode WORKABLE ? SPEEEEED and NOISE remain an issue.
Thanks -
-C.

1 Like

Thanks Nathan, good to know! I will take a closer look at these…

_TogglePausedActiveRealtimeViewport you’ll probably like the best. With it you can ensure the VP isn’t running while you’re doing a capture in the case you have settings that require a rerender for the capture = more compute power for the capture.

Performance improvements and bugfixing are always in progress.

interesting… One problem I see with this method for scripting is that there is no way to tell the current toggle state. Maybe there should be a command-line option (Enabled=Yes) or a report printer in command line to parse and see the currently set state ?

Hmm, good point. If you’re scripting with Python you could already do this with RhinoCommon. The commands are implemented in C# as follows:


	public abstract class BaseToggleActiveViewportStateCommand : Command
	{
		public abstract bool ToggleStateFunction(RealtimeDisplayMode dm);

		protected override Result RunCommand(RhinoDoc doc, RunMode mode)
		{
			var dm = doc.Views.ActiveView.RealtimeDisplayMode;
			if (ToggleStateFunction(dm)) return Result.Success;
			RhinoApp.WriteLine(Localization.LocalizeString("Active view isn't in a realtime display mode", 1726));
			return Result.Nothing;
		}
	}
	public class PauseActiveRealtimeViewport : BaseToggleActiveViewportStateCommand
	{
		public override string EnglishName => "TogglePausedActiveRealtimeViewport";
		public override bool ToggleStateFunction(RealtimeDisplayMode dm)
		{
			if(dm != null)
			{
				dm.Paused = !dm.Paused;
				return true;
			}
			return false;
		}

	}
	public class LockActiveRealtimeViewport : BaseToggleActiveViewportStateCommand
	{
		public override string EnglishName => "ToggleLockedActiveRealtimeViewport";

		public override bool ToggleStateFunction(RealtimeDisplayMode dm)
		{
			if(dm != null)
			{
				dm.Locked = !dm.Locked;
				return true;
			}
			return false;
		}
	}

In short you can query the properties RealtimeDisplayMode.Paused and RealtimeDisplayMode.Locked.

Does that work for you?

I’m not doing much in Python yet, and RhinoCommon part of it is way above my head. Doing pretty advanced stuff with RhinoScript though, that includes a lot of view manipulations and visual stuff.
I will look into the above. Need to learn that at some point, too.
But in general, toggle commands are more useful for macros and scripts if the user can tell the current state or the one that its being switched to…

–jarek

Of course: RH-46490. I meant the code bits as a way to do this already before you get a SR or RC with the necessary changes :slight_smile:

1 Like