V8 changes in RealtimeDisplayMode behavior

I am seeing what seem like some recent changes in behavior in the RealtimeDisplayMode, regarding how updates from SignalRedraw are processed; usually it is no problem because the user is navigating in a viewport, or otherwise making changes that cause the change queue to update, but when changes occur outside that context, leading to new pixels being available for display without the model or viewport being disturbed, it seems the current v8 (8.3.24009.15001) is being lazy about redrawing the view

apparently related, I also find apparently new behavior in the IsCompleted override; my renderer allows various types of changes after it is “done” rendering, and where I previously returned true if my engine was no longer actively rendering, I must now return false in all cases, since I have new pixels to show, but have no way of knowing if/when they have been shown, since we just call SignalRedraw and don’t know if/when it applies them. Not saying if this is more or less correct, but it is a change in behavior from the past, where as long as I called SignalRedraw, Rhino would redraw my view, with my current pixels, in a fairly prompt manner

to demonstrate this, first I will show a vid of my own interface adjusting lighting contribution after the render has finished:

this behaves in rhino 7 like so:

but in rhino 8, though we can see when I am calling SignalRedraw, which is only done directly after having received new pixels, we can see that the viewport does not promptly respond – sometimes it takes a second or more, and sometimes it seems it never will until I grab the viewport and force it to repaint (without restarting my renderer):

I tried various hacks just to see, e.g. calling Redraw on the view after SignalRedraw, and this appears to guarantee that the update will occur at some point, though it may still take a second or two. Trying to call SignalRedraw and/or Redraw from InvokeOnUiThread or InvokeAndWait will end up with some updates never occurring

back in the old Rhino_DotNet days I remember there were arguments to Redraw, and I believe I was able to get rhino to draw views immediately if I needed it to (though maybe not, since I was doing it to show materials I’d updated), but haven’t yet found a way of doing that now

@andy, @nathanletwory - is this something you can help with?

I already notified @andy if this thread earlier, he’ll have the best view on this part of the integration. Personally I am not aware of any changes in this part, but lots has changed under the hood as well.

2 Likes