Document Default Render Properties and Linear Workflow

I am trying to better understand the best practice method for a renderer plugin setting Render Properties on a Document. Our rendering plugin would ideally want to set some of the document render properties to a specific value if the document is new or made from a template.

While we could set them on Open, we don’t want to modify the values if the user has specifically changed them to something else, only the default values. Is there a way to differentiate between the EndOpenDocument event on opening a template when New was requested vs a standard open?

Despite our renderer plugin returning false if SupportsFeature is called with LinearWorkflow the document render properties enable Gamma correction, Linear Workflow and set the Gamma to 2.2. When rendering it adds a final pass with the Gamma correction which in our case we don’t want since this is handled internally.

The other properties such as Sun and Sky get correctly removed from the renderer settings when we return false in the SupportsFeature call. Not sure if that is a bug or we are misunderstanding these properties. It seems specific to Rhino 7.

Right now the user would need to edit their templates to change the default, however that would then apply to all renderers. If looks like we can’t prevent Rhino adding the Gamma correction to our plugin renderer.

Any thoughts (besides the fact that ideally we’d support the internal Rhino linear workflow which isn’t an option for now unfortunately)?

Paul

It does appear that we’ve missed something with Linear Workflow. I’ll log a bug and we’ll get to it in the next SR.

  • Andy

@paul14

I have just committed a change into Rhino 7.7 (you’ll be able to get the release candidate next Wednesday) which disables the automatic gamma adjustment post effect when the renderer doesn’t support linear workflow.

In order to remove the UI for the linear workflow, you should override RenderSettingsSections in your CRhRdkRenderPlugIn class, call the base class and remove uuidRenderSettingsSection_ColorAdjustment_Eto and uuidRenderSettingsSection_ColorAdjustment.

1 Like

Thank you, we’ll check it out when available. Regarding the RenderSettingsSections, is there an equivilant for RhinoCommon rendering plugins? Ours is not RDK based, would that be DocumentPropertiesDialogPages?

RhinoCommon rendering plug-in wraps CRhRdkRenderPlugIn. The method in RhinoCommon is:

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_PlugIns_RenderPlugIn_RenderSettingsSections.htm

The two GUIDs are:

UUID uuidRenderSettingsSection_ColorAdjustment_Eto = { 0x5CC91669, 0xFD25, 0x4898, { 0x82, 0x45, 0x89, 0xEF, 0x0D, 0xE9, 0x8F, 0xCE } };
UUID uuidRenderSettingsSection_ColorAdjustment = { 0x26126531, 0x70c2, 0x42bc, { 0xb5, 0x0c, 0x33, 0x68, 0x26, 0x0d, 0xc0, 0xb4 } };

Thanks, I’ve put in the code now to remove that section.

@paul14

Could you get hold of the Rhino 7.7. release candicate let me know if that solves the problem for you?

  • Andy

Sure, where do I obtain the RCs?

In Updates and Statistics in the options dialog, change the Update Frequency to “Service Release Candidate”

I am now getting consistent behaviour between the viewport and production render, without the gamma applied as I would expect. So looks to be working to me.

1 Like