Rhino.Render.AsyncRenderContext Questions


#1

Hello,

I noticed the presence of the following 3 APIs in the above named class:

    public virtual void PauseRendering();
    public virtual void ResumeRendering();
    public virtual bool SupportsPause();

I have overridden them, returning true in SupportsPause, but this method is never called, in my tests. Is there something else which needs doing to get this to work?

Is there some way to set the default gamma for the Render window? At the moment it is defaulting to 0.455, whereas I want either 1.0 or 2.2.


(Brian James) #3

This bug was fixed on the 9th and I just confirmed the fix in https://mcneel.myjetbrains.com/youtrack/issue/RH-37141 so now you should get 2.2 again in the next WIP.

I messaged @andy to help with the other question.


#4

Thanks Brian!


(Nathan 'jesterKing' Letwory) #5

These are used only for the RenderWindow that represents the actual render window in a system window, i.e. production rendering. It is not used when RenderWindow is used through RealtimeDisplayMode.

If you’re looking to pause and resume rendering in the viewport you should registered handlers for

RealtimeDisplayMode.HudPlayButtonPressed
RealtimeDisplayMode.HudPauseButtonPressed
RealtimeDisplayMode.HudLockButtonPressed
RealtimeDisplayMode.HudUnlockButtonPressed

/Nathan


#6

This is for production rendering. We already have the viewport working separately. In the rendering window, I see the pause button, but it is disabled. I thought that by overriding these methods, and returning true from SupportsPause, I could get this to work, but so far no luck.


(Nathan 'jesterKing' Letwory) #7

Ah, my bad. A bit of a mess in this area. You should override functions on RenderPipeline:

I have opened RH-37210 to address this confusing part.


#8

This worked, thanks!


#9

Hi @nathanletwory,

latest Rhino WIP class AsyncRenderContext is apparently missing:

PauseRendering()
ResumeRendering()
SupportsPause()

I understand we need to adapt our code to remove the override modifier? We do implement Rhino.Render.RenderPipeline… Will check
Am I missing something?


(Nathan 'jesterKing' Letwory) #10

Correct, this is RH-37210, as I mentioned to @CarstenW