From 569d7c98fc7eaed14bb20ea86c5ea78c1d2941d2 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Tue, 21 Jun 2022 16:06:53 +0300 Subject: [PATCH 01/35] Add hardware fog keys to Schema --- .../schemas/schema_maya_capture.json | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index d6b81c86876..a5e1cb45d9b 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -224,6 +224,42 @@ "key": "twoSidedLighting", "label": "Two Sided Lighting" }, + { + "type": "splitter" + }, + { + "type": "boolean", + "key": "hwFogEnable", + "label": "Enable Hardware Fog" + }, + { + "type": "number", + "key": "hwFogStart", + "label": "Hardware Fog Start" + }, + { + "type": "number", + "key": "hwFogEnd", + "label": "Hardware Fog End" + }, + { + "type": "number", + "key": "hwFogAlpha", + "label": "Hardware Fog Alpha" + }, + { + "type": "number", + "key": "hwFogFalloff", + "label": "Hardware Fog Falloff" + }, + { + "type": "number", + "key": "hwFogDensity", + "label": "Hardware Fog Density" + }, + { + "type": "splitter" + }, { "type": "boolean", "key": "ssaoEnable", From cb6e093ee33be1aa9af97dca37e07cad7387b4af Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Tue, 21 Jun 2022 16:25:11 +0300 Subject: [PATCH 02/35] Add SSAO options to schema --- .../schemas/schema_maya_capture.json | 42 ++++++++++++++++++- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index a5e1cb45d9b..919c847a9b6 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -227,6 +227,34 @@ { "type": "splitter" }, + { + "type": "boolean", + "key": "ssaoEnable", + "label": "Screen Space Ambient Occlusion" + }, + { + "type": "number", + "key": "ssaoAmount", + "label": "SSAO Amount" + }, + { + "type": "number", + "key": "ssaoFilterRadius", + "label": "SSAO Filter Radius" + }, + { + "type": "number", + "key": "ssaoRadius", + "label": "SSAO Radius" + }, + { + "type": "number", + "key": "ssaoSamples", + "label": "SSAO Samples" + }, + { + "type": "splitter" + }, { "type": "boolean", "key": "hwFogEnable", @@ -262,8 +290,18 @@ }, { "type": "boolean", - "key": "ssaoEnable", - "label": "Screen Space Ambient Occlusion" + "key": "motionBlurEnable", + "label": "Enable Motion Blur" + }, + { + "type": "number", + "key": "motionBlurShutterOpenFraction", + "label": "Shutter Open Fraction" + }, + { + "type": "number", + "key": "hwFogFalloff", + "label": "Hardware Fog Falloff" }, { "type": "splitter" From 697916c3cdba015b68f0376902422606ac27f9fe Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Tue, 21 Jun 2022 17:03:10 +0300 Subject: [PATCH 03/35] Append enum for fog falloff. --- .../schemas/schema_maya_capture.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index 919c847a9b6..caf001f7e16 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -260,6 +260,16 @@ "key": "hwFogEnable", "label": "Enable Hardware Fog" }, + { + "type": "enum", + "key": "hwFogFalloff", + "label": "Hardware Fog Falloff", + "enum_items": [ + { "0": "Linear"}, + { "1": "Exponential"}, + { "2": "Exponential Squared"} + ] + }, { "type": "number", "key": "hwFogStart", @@ -275,11 +285,6 @@ "key": "hwFogAlpha", "label": "Hardware Fog Alpha" }, - { - "type": "number", - "key": "hwFogFalloff", - "label": "Hardware Fog Falloff" - }, { "type": "number", "key": "hwFogDensity", @@ -298,11 +303,6 @@ "key": "motionBlurShutterOpenFraction", "label": "Shutter Open Fraction" }, - { - "type": "number", - "key": "hwFogFalloff", - "label": "Hardware Fog Falloff" - }, { "type": "splitter" }, From ed0ba7e3ab306f1674def5f7cc69666cb96e8dc6 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Tue, 21 Jun 2022 17:39:46 +0300 Subject: [PATCH 04/35] Append Antialiasing and MotionBlur Sampling --- .../schemas/schema_maya_capture.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index caf001f7e16..fa5be19cda7 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -201,6 +201,14 @@ "label": "Texture Clamp Resolution", "decimal": 0 }, + { + "type": "splitter" + }, + { + "type": "boolean", + "key": "lineAAEnable", + "label": "Smooth Wireframe" + }, { "type": "number", "key": "multiSample", @@ -209,6 +217,9 @@ "minimum": 0, "maximum": 32 }, + { + "type": "splitter" + }, { "type": "boolean", "key": "shadows", @@ -303,6 +314,11 @@ "key": "motionBlurShutterOpenFraction", "label": "Shutter Open Fraction" }, + { + "type": "number", + "key": "motionBlurSampleCount", + "label": "Sample Count" + }, { "type": "splitter" }, From de6bd72c2ed1ef40b3cecfa4a7caed9cf93937ea Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Tue, 21 Jun 2022 18:01:49 +0300 Subject: [PATCH 05/35] Appen defaults. --- .../settings/defaults/project_settings/maya.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 69fbf5bfdfb..67809210016 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -491,11 +491,25 @@ "override_viewport_options": true, "displayLights": "default", "textureMaxResolution": 1024, + "lineAAEnable": true, "multiSample": 4, "shadows": true, "textures": true, "twoSidedLighting": true, "ssaoEnable": true, + "ssaoAmount": 0, + "ssaoFilterRadius": 0, + "ssaoRadius": 0, + "ssaoSamples": 0, + "hwFogEnable": true, + "hwFogFalloff": "0", + "hwFogStart": 0, + "hwFogEnd": 0, + "hwFogAlpha": 0, + "hwFogDensity": 0, + "motionBlurEnable": true, + "motionBlurShutterOpenFraction": 0, + "motionBlurSampleCount": 0, "cameras": false, "clipGhosts": false, "controlVertices": false, From 269c752bfc9ff109b8a75e57b3f78349d7bf1b75 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Tue, 21 Jun 2022 18:01:49 +0300 Subject: [PATCH 06/35] Append settings defaults. --- .../settings/defaults/project_settings/maya.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 69fbf5bfdfb..67809210016 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -491,11 +491,25 @@ "override_viewport_options": true, "displayLights": "default", "textureMaxResolution": 1024, + "lineAAEnable": true, "multiSample": 4, "shadows": true, "textures": true, "twoSidedLighting": true, "ssaoEnable": true, + "ssaoAmount": 0, + "ssaoFilterRadius": 0, + "ssaoRadius": 0, + "ssaoSamples": 0, + "hwFogEnable": true, + "hwFogFalloff": "0", + "hwFogStart": 0, + "hwFogEnd": 0, + "hwFogAlpha": 0, + "hwFogDensity": 0, + "motionBlurEnable": true, + "motionBlurShutterOpenFraction": 0, + "motionBlurSampleCount": 0, "cameras": false, "clipGhosts": false, "controlVertices": false, From 759cea424c30b06960fc7a247055b96c58ab0eea Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Wed, 22 Jun 2022 10:45:14 +0300 Subject: [PATCH 07/35] Start separating "lineAAEnable" --- openpype/vendor/python/common/capture.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/openpype/vendor/python/common/capture.py b/openpype/vendor/python/common/capture.py index 6b4c40a6e8a..ae3a0d5cc1a 100644 --- a/openpype/vendor/python/common/capture.py +++ b/openpype/vendor/python/common/capture.py @@ -361,7 +361,6 @@ def replace(m): "floatingPointRTFormat": 1, "gammaCorrectionEnable": False, "gammaValue": 2.2, - "lineAAEnable": False, "maxHardwareLights": 8, "motionBlurEnable": False, "motionBlurSampleCount": 8, @@ -383,6 +382,10 @@ def replace(m): "vertexAnimationCache": 0 } +Viewport2OAAoption = { + "lineAAenable": False, +} + def apply_view(panel, **options): """Apply options to panel""" @@ -496,6 +499,13 @@ def parse_view(panel): except ValueError: continue + for key in Viewport2OAAoption.keys(): + attr = "hardwareRenderingGlobals.{0}".format(key) + try: + viewport2_options[key] = cmds.getAttr(attr) + except ValueError: + continue + return { "camera": camera, "display_options": display_options, From 277682c03dcdbed093905188def33545f8a9b24a Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Wed, 22 Jun 2022 10:56:49 +0300 Subject: [PATCH 08/35] Revert "Start separating "lineAAEnable"" This reverts commit 759cea424c30b06960fc7a247055b96c58ab0eea. --- openpype/vendor/python/common/capture.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/openpype/vendor/python/common/capture.py b/openpype/vendor/python/common/capture.py index ae3a0d5cc1a..6b4c40a6e8a 100644 --- a/openpype/vendor/python/common/capture.py +++ b/openpype/vendor/python/common/capture.py @@ -361,6 +361,7 @@ def replace(m): "floatingPointRTFormat": 1, "gammaCorrectionEnable": False, "gammaValue": 2.2, + "lineAAEnable": False, "maxHardwareLights": 8, "motionBlurEnable": False, "motionBlurSampleCount": 8, @@ -382,10 +383,6 @@ def replace(m): "vertexAnimationCache": 0 } -Viewport2OAAoption = { - "lineAAenable": False, -} - def apply_view(panel, **options): """Apply options to panel""" @@ -499,13 +496,6 @@ def parse_view(panel): except ValueError: continue - for key in Viewport2OAAoption.keys(): - attr = "hardwareRenderingGlobals.{0}".format(key) - try: - viewport2_options[key] = cmds.getAttr(attr) - except ValueError: - continue - return { "camera": camera, "display_options": display_options, From f43042eb169ad9214ad01511a3c4dee5fe469083 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Wed, 22 Jun 2022 15:12:40 +0300 Subject: [PATCH 09/35] Change hwFogEnable into fogging flag. --- .../projects_schema/schemas/schema_maya_capture.json | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index fa5be19cda7..217aa947fc6 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -268,7 +268,7 @@ }, { "type": "boolean", - "key": "hwFogEnable", + "key": "fogging", "label": "Enable Hardware Fog" }, { @@ -304,21 +304,11 @@ { "type": "splitter" }, - { - "type": "boolean", - "key": "motionBlurEnable", - "label": "Enable Motion Blur" - }, { "type": "number", "key": "motionBlurShutterOpenFraction", "label": "Shutter Open Fraction" }, - { - "type": "number", - "key": "motionBlurSampleCount", - "label": "Sample Count" - }, { "type": "splitter" }, From 38522154e78c22cd0037dbbe91c2ea1f820b057c Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Wed, 22 Jun 2022 16:45:51 +0300 Subject: [PATCH 10/35] Remove flags --- .../defaults/project_settings/maya.json | 9 +------ .../schemas/schema_maya_capture.json | 25 ------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 0f40651c356..f9201286ab5 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -496,25 +496,18 @@ "override_viewport_options": true, "displayLights": "default", "textureMaxResolution": 1024, - "lineAAEnable": true, "multiSample": 4, "shadows": true, "textures": true, "twoSidedLighting": true, "ssaoEnable": true, - "ssaoAmount": 0, "ssaoFilterRadius": 0, - "ssaoRadius": 0, "ssaoSamples": 0, - "hwFogEnable": true, + "fogging": true, "hwFogFalloff": "0", "hwFogStart": 0, "hwFogEnd": 0, "hwFogAlpha": 0, - "hwFogDensity": 0, - "motionBlurEnable": true, - "motionBlurShutterOpenFraction": 0, - "motionBlurSampleCount": 0, "cameras": false, "clipGhosts": false, "controlVertices": false, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index 217aa947fc6..c7842e50311 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -204,11 +204,6 @@ { "type": "splitter" }, - { - "type": "boolean", - "key": "lineAAEnable", - "label": "Smooth Wireframe" - }, { "type": "number", "key": "multiSample", @@ -243,21 +238,11 @@ "key": "ssaoEnable", "label": "Screen Space Ambient Occlusion" }, - { - "type": "number", - "key": "ssaoAmount", - "label": "SSAO Amount" - }, { "type": "number", "key": "ssaoFilterRadius", "label": "SSAO Filter Radius" }, - { - "type": "number", - "key": "ssaoRadius", - "label": "SSAO Radius" - }, { "type": "number", "key": "ssaoSamples", @@ -296,19 +281,9 @@ "key": "hwFogAlpha", "label": "Hardware Fog Alpha" }, - { - "type": "number", - "key": "hwFogDensity", - "label": "Hardware Fog Density" - }, { "type": "splitter" }, - { - "type": "number", - "key": "motionBlurShutterOpenFraction", - "label": "Shutter Open Fraction" - }, { "type": "splitter" }, From 137ef3e22bbe9495e69a4379c3f85f367f3b4a7d Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Wed, 22 Jun 2022 17:35:51 +0300 Subject: [PATCH 11/35] Remove keys that fail. --- .../defaults/project_settings/maya.json | 6 --- .../schemas/schema_maya_capture.json | 38 ------------------- 2 files changed, 44 deletions(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index f9201286ab5..84949895560 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -501,13 +501,7 @@ "textures": true, "twoSidedLighting": true, "ssaoEnable": true, - "ssaoFilterRadius": 0, - "ssaoSamples": 0, "fogging": true, - "hwFogFalloff": "0", - "hwFogStart": 0, - "hwFogEnd": 0, - "hwFogAlpha": 0, "cameras": false, "clipGhosts": false, "controlVertices": false, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index c7842e50311..ace9fc22da2 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -238,16 +238,6 @@ "key": "ssaoEnable", "label": "Screen Space Ambient Occlusion" }, - { - "type": "number", - "key": "ssaoFilterRadius", - "label": "SSAO Filter Radius" - }, - { - "type": "number", - "key": "ssaoSamples", - "label": "SSAO Samples" - }, { "type": "splitter" }, @@ -256,34 +246,6 @@ "key": "fogging", "label": "Enable Hardware Fog" }, - { - "type": "enum", - "key": "hwFogFalloff", - "label": "Hardware Fog Falloff", - "enum_items": [ - { "0": "Linear"}, - { "1": "Exponential"}, - { "2": "Exponential Squared"} - ] - }, - { - "type": "number", - "key": "hwFogStart", - "label": "Hardware Fog Start" - }, - { - "type": "number", - "key": "hwFogEnd", - "label": "Hardware Fog End" - }, - { - "type": "number", - "key": "hwFogAlpha", - "label": "Hardware Fog Alpha" - }, - { - "type": "splitter" - }, { "type": "splitter" }, From 5b037244fe4e43c7a738e9fe2ace5c6f1883e72e Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Thu, 23 Jun 2022 11:36:22 +0300 Subject: [PATCH 12/35] Append capture schema. --- .../schemas/schema_maya_capture.json | 71 ++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index ace9fc22da2..f8dba0be4b8 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -238,14 +238,83 @@ "key": "ssaoEnable", "label": "Screen Space Ambient Occlusion" }, + { + "type": "number", + "key": "ssaoAmount", + "label": "SSAO Amount" + }, + { + "type": "number", + "key": "ssaoRadius", + "label": "SSAO Radius" + }, + { + "type": "number", + "key": "ssaoFilterRadius", + "label": "SSAO Filter Radius" + }, + { + "type": "number", + "key": "ssaoSamples", + "label": "SSAO Samples", + "decimal": 0, + "minimum": 8, + "maximum": 32 + }, { "type": "splitter" }, { "type": "boolean", - "key": "fogging", + "key": "hwFogEnable", "label": "Enable Hardware Fog" }, + { + "type": "enum", + "key": "hwFogFalloff", + "label": "Hardware Falloff", + "enum_items": [ + { "0": "Linear"}, + { "1": "Exponential"}, + { "2": "Exponential Squared"} + ] + }, + { + "type": "number", + "key": "hwFogStart", + "label": "Fog Start" + }, + { + "type": "number", + "key": "hwFogEnd", + "label": "Fog End" + }, + { + "type": "number", + "key": "hwFogAlpha", + "label": "Enable Fog Alpha" + }, + { + "type": "splitter" + }, + { + "type": "boolean", + "key": "motionBlurEnable", + "label": "Enable Motion Blur" + }, + { + "type": "number", + "key": "motionBlurSampleCount", + "label": "Motion Blur Sample Count", + "decimal": 0, + "minimum": 8, + "maximum": 32 + }, + { + "type": "number", + "key": "motionBlurShutterOpenFraction", + "label": "Shutter Open Fraction" + }, { "type": "splitter" }, From 4a521ec081e22b226655f49a41a38dbe31ef8f49 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Thu, 23 Jun 2022 11:39:23 +0300 Subject: [PATCH 13/35] Adjust --- .../settings/defaults/project_settings/maya.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 84949895560..437adbc1f0d 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -501,7 +501,18 @@ "textures": true, "twoSidedLighting": true, "ssaoEnable": true, - "fogging": true, + "ssaoAmount": 0, + "ssaoRadius": 0, + "ssaoFilterRadius": 0, + "ssaoSamples": 8, + "hwFogEnable": true, + "hwFogFalloff": "0", + "hwFogStart": 0, + "hwFogEnd": 0, + "hwFogAlpha": 0, + "motionBlurEnable": true, + "motionBlurSampleCount": 8, + "motionBlurShutterOpenFraction": 0, "cameras": false, "clipGhosts": false, "controlVertices": false, From ea6b098bb2f86d027815e8e685ff5932a85fcc73 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Thu, 23 Jun 2022 11:40:01 +0300 Subject: [PATCH 14/35] Adjust `load_capture_preset()` to work with additional settings. --- openpype/hosts/maya/api/lib.py | 62 +++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index de9a9da9110..bd403ad340c 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -2525,8 +2525,19 @@ def load_capture_preset(data=None): if key == 'ssaoEnable': if preset[id][key] is True: temp_options2['ssaoEnable'] = True + temp_options2['ssaoSamples'] = preset[id][key] else: temp_options2['ssaoEnable'] = False + temp_options2['ssaoSamples'] = preset[id][key] + + if key == 'ssaoAmount': + temp_options2['ssaoAmount'] = preset[id][key] + + if key == 'ssaoRadius': + temp_options2['ssaoRadius'] = preset[id][key] + + if key == 'ssaoFilterRadius': + temp_options2['ssaoFilterRadius'] = preset[id][key] if key == 'alphaCut': temp_options2['transparencyAlgorithm'] = 5 @@ -2535,6 +2546,42 @@ def load_capture_preset(data=None): if key == 'headsUpDisplay': temp_options['headsUpDisplay'] = True + if key == 'hwFogEnable': + if preset[id][key] is True: + temp_options2['hwFogEnable'] = True + else: + temp_options2['hwFogEnable'] = False + + if key == 'hwFogStart': + temp_options2['hwFogStart'] = preset[id][key] + + if key == 'hwFogEnd': + temp_options2['hwFogEnd'] = preset[id][key] + + if key == 'hwFogAlpha': + temp_options2['hwFogAlpha'] = preset[id][key] + + if key == 'hwFogFalloff': + temp_options2['hwFogFalloff'] = preset[id][key] + + if key == 'motionBlurEnable': + if preset[id][key] is True: + temp_options2['motionBlurEnable'] = True + else: + temp_options2['motionBlurEnable'] = False + + if key == 'motionBlurSampleCount': + temp_options2['motionBlurSampleCount'] = preset[id][key] + + if key == 'motionBlurShutterOpenFraction': + temp_options2['motionBlurShutterOpenFraction'] = preset[id][key] + + if key == 'lineAAEnable': + if preset[id][key] is True: + temp_options2['lineAAEnable'] = True + else: + temp_options2['lineAAEnable'] = False + else: temp_options[str(key)] = preset[id][key] @@ -2544,7 +2591,20 @@ def load_capture_preset(data=None): 'gpuCacheDisplayFilter', 'multiSample', 'ssaoEnable', - 'textureMaxResolution' + 'ssaoSamples', + 'ssaoAmount', + 'ssaoFilterRadius', + 'ssaoRadius', + 'hwFogEnable', + 'hwFogStart', + 'hwFogEnd', + 'hwFogAlpha', + 'hwFogFalloff', + 'textureMaxResolution', + 'motionBlurEnable', + 'motionBlurSampleCount', + 'motionBlurShutterOpenFraction', + 'lineAAEnable', ]: temp_options.pop(key, None) From f5e3f56981660fd6131cf80d802cb6ed382a6915 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Thu, 23 Jun 2022 12:31:50 +0300 Subject: [PATCH 15/35] Append AA flag as schema key. --- .../schemas/schema_maya_capture.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index f8dba0be4b8..2c5aed8a67d 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -233,6 +233,14 @@ { "type": "splitter" }, + { + "type": "boolean", + "key": "lineAAEnable", + "label": "Enable Anti-Aliasing" + }, + { + "type": "splitter" + }, { "type": "boolean", "key": "ssaoEnable", @@ -313,7 +321,10 @@ { "type": "number", "key": "motionBlurShutterOpenFraction", - "label": "Shutter Open Fraction" + "label": "Shutter Open Fraction", + "decimal": 3, + "minimum": 0.01, + "maximum": 32 }, { "type": "splitter" From f497956c5fc31657f9798137c303b359004046c9 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Thu, 23 Jun 2022 12:31:58 +0300 Subject: [PATCH 16/35] Adjust schema defaults. --- openpype/settings/defaults/project_settings/maya.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 437adbc1f0d..48a34068dbd 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -500,6 +500,7 @@ "shadows": true, "textures": true, "twoSidedLighting": true, + "lineAAEnable": true, "ssaoEnable": true, "ssaoAmount": 0, "ssaoRadius": 0, @@ -512,7 +513,7 @@ "hwFogAlpha": 0, "motionBlurEnable": true, "motionBlurSampleCount": 8, - "motionBlurShutterOpenFraction": 0, + "motionBlurShutterOpenFraction": 0.01, "cameras": false, "clipGhosts": false, "controlVertices": false, From 98b912f0b36634c345faaf0e617385460a402af1 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Thu, 23 Jun 2022 12:32:15 +0300 Subject: [PATCH 17/35] Change key check placement. --- openpype/hosts/maya/api/lib.py | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index bd403ad340c..12cbac2a32c 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -2525,10 +2525,11 @@ def load_capture_preset(data=None): if key == 'ssaoEnable': if preset[id][key] is True: temp_options2['ssaoEnable'] = True - temp_options2['ssaoSamples'] = preset[id][key] else: temp_options2['ssaoEnable'] = False - temp_options2['ssaoSamples'] = preset[id][key] + + if key == 'ssaoSamples': + temp_options2['ssaoSamples'] = preset[id][key] if key == 'ssaoAmount': temp_options2['ssaoAmount'] = preset[id][key] @@ -2549,20 +2550,16 @@ def load_capture_preset(data=None): if key == 'hwFogEnable': if preset[id][key] is True: temp_options2['hwFogEnable'] = True + temp_options2['hwFogStart'] = preset[id][key] + temp_options2['hwFogEnd'] = preset[id][key] + temp_options2['hwFogAlpha'] = preset[id][key] + temp_options2['hwFogFalloff'] = preset[id][key] else: temp_options2['hwFogEnable'] = False - - if key == 'hwFogStart': - temp_options2['hwFogStart'] = preset[id][key] - - if key == 'hwFogEnd': - temp_options2['hwFogEnd'] = preset[id][key] - - if key == 'hwFogAlpha': - temp_options2['hwFogAlpha'] = preset[id][key] - - if key == 'hwFogFalloff': - temp_options2['hwFogFalloff'] = preset[id][key] + temp_options2['hwFogStart'] = preset[id][key] + temp_options2['hwFogEnd'] = preset[id][key] + temp_options2['hwFogAlpha'] = preset[id][key] + temp_options2['hwFogFalloff'] = preset[id][key] if key == 'motionBlurEnable': if preset[id][key] is True: From ae897ed2901de70da53ff16bfc5a6d3fa1bc1432 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Thu, 23 Jun 2022 13:07:38 +0300 Subject: [PATCH 18/35] Append Fog Color Key to schema. --- .../schemas/projects_schema/schemas/schema_maya_capture.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index 2c5aed8a67d..08207824b13 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -302,6 +302,11 @@ "key": "hwFogAlpha", "label": "Enable Fog Alpha" }, + { + "type": "color", + "key": "hwFogColor", + "label": "Fog Color" + }, { "type": "splitter" }, From 4c1bba042d69bfbc807f2aea81a004fe27593163 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Thu, 23 Jun 2022 13:08:13 +0300 Subject: [PATCH 19/35] Append Fog Color to functionk, fix loop bug. --- openpype/hosts/maya/api/lib.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 12cbac2a32c..4b76757e974 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -2550,16 +2550,24 @@ def load_capture_preset(data=None): if key == 'hwFogEnable': if preset[id][key] is True: temp_options2['hwFogEnable'] = True - temp_options2['hwFogStart'] = preset[id][key] - temp_options2['hwFogEnd'] = preset[id][key] - temp_options2['hwFogAlpha'] = preset[id][key] - temp_options2['hwFogFalloff'] = preset[id][key] + else: temp_options2['hwFogEnable'] = False - temp_options2['hwFogStart'] = preset[id][key] - temp_options2['hwFogEnd'] = preset[id][key] - temp_options2['hwFogAlpha'] = preset[id][key] - temp_options2['hwFogFalloff'] = preset[id][key] + + if key == 'hwFogStart': + temp_options2['hwFogStart'] = preset[id][key] + + if key == 'hwFogEnd': + temp_options2['hwFogEnd'] = preset[id][key] + + if key == 'hwFogAlpha': + temp_options2['hwFogAlpha'] = preset[id][key] + + if key == 'hwFogFalloff': + temp_options2['hwFogFalloff'] = int(preset[id][key]) + + if key == 'hwFogColor': + temp_options2['hwFogColor'] = preset[id][key] if key == 'motionBlurEnable': if preset[id][key] is True: @@ -2597,6 +2605,7 @@ def load_capture_preset(data=None): 'hwFogEnd', 'hwFogAlpha', 'hwFogFalloff', + 'hwFogColor', 'textureMaxResolution', 'motionBlurEnable', 'motionBlurSampleCount', From bb339e0bbd9828a650f213d8839fecf7ca0f3ff7 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Thu, 23 Jun 2022 13:08:26 +0300 Subject: [PATCH 20/35] Append schema default for color. --- openpype/settings/defaults/project_settings/maya.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 48a34068dbd..874e23400e1 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -511,6 +511,12 @@ "hwFogStart": 0, "hwFogEnd": 0, "hwFogAlpha": 0, + "hwFogColor": [ + 158, + 53, + 53, + 255 + ], "motionBlurEnable": true, "motionBlurSampleCount": 8, "motionBlurShutterOpenFraction": 0.01, From f2ef34c1a2b5dc531c476f5661a79bd8dfeb7d15 Mon Sep 17 00:00:00 2001 From: "Allan I. A" <76656700+Allan-I@users.noreply.github.com> Date: Thu, 23 Jun 2022 19:18:28 +0300 Subject: [PATCH 21/35] Update openpype/hosts/maya/api/lib.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simplify key test. Co-authored-by: Ondřej Samohel <33513211+antirotor@users.noreply.github.com> --- openpype/hosts/maya/api/lib.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 4b76757e974..b9f23a2c0ea 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -2548,11 +2548,7 @@ def load_capture_preset(data=None): temp_options['headsUpDisplay'] = True if key == 'hwFogEnable': - if preset[id][key] is True: - temp_options2['hwFogEnable'] = True - - else: - temp_options2['hwFogEnable'] = False + temp_options2['hwFogEnable'] = preset[id][key] or False if key == 'hwFogStart': temp_options2['hwFogStart'] = preset[id][key] From 3af840f8881432634f776a904655be32536de000 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Fri, 24 Jun 2022 04:00:33 +0300 Subject: [PATCH 22/35] Add Color Options --- openpype/hosts/maya/api/lib.py | 14 ++++++++--- .../defaults/project_settings/maya.json | 9 +++---- .../schemas/schema_maya_capture.json | 25 ++++++++++++++++--- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 4b76757e974..c6585f5a8f4 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -2566,8 +2566,14 @@ def load_capture_preset(data=None): if key == 'hwFogFalloff': temp_options2['hwFogFalloff'] = int(preset[id][key]) - if key == 'hwFogColor': - temp_options2['hwFogColor'] = preset[id][key] + if key == 'hwFogColorR': + temp_options2['hwFogColorR'] = preset[id][key] + + if key == 'hwFogColorG': + temp_options2['hwFogColorG'] = preset[id][key] + + if key == 'hwFogColorB': + temp_options2['hwFogColorB'] = preset[id][key] if key == 'motionBlurEnable': if preset[id][key] is True: @@ -2605,7 +2611,9 @@ def load_capture_preset(data=None): 'hwFogEnd', 'hwFogAlpha', 'hwFogFalloff', - 'hwFogColor', + 'hwFogColorR', + 'hwFogColorG', + 'hwFogColorB', 'textureMaxResolution', 'motionBlurEnable', 'motionBlurSampleCount', diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 874e23400e1..7057160a408 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -511,12 +511,9 @@ "hwFogStart": 0, "hwFogEnd": 0, "hwFogAlpha": 0, - "hwFogColor": [ - 158, - 53, - 53, - 255 - ], + "hwFogColorR": 0, + "hwFogColorG": 0, + "hwFogColorB": 0, "motionBlurEnable": true, "motionBlurSampleCount": 8, "motionBlurShutterOpenFraction": 0.01, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index 08207824b13..42685623ced 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -303,9 +303,28 @@ "label": "Enable Fog Alpha" }, { - "type": "color", - "key": "hwFogColor", - "label": "Fog Color" + "type": "number", + "key": "hwFogColorR", + "label": "Fog Color R", + "decimal": 2, + "minimum": 0, + "maximum": 1 + }, + { + "type": "number", + "key": "hwFogColorG", + "label": "Fog Color G", + "decimal": 2, + "minimum": 0, + "maximum": 1 + }, + { + "type": "number", + "key": "hwFogColorB", + "label": "Fog Color B", + "decimal": 2, + "minimum": 0, + "maximum": 1 }, { "type": "splitter" From d0f1f897fcfb67623d21dd87a25e969ab03180a7 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Fri, 24 Jun 2022 11:18:20 +0300 Subject: [PATCH 23/35] Append SSAO Radius minimum. --- .../schemas/projects_schema/schemas/schema_maya_capture.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index 42685623ced..d9d565943f0 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -259,7 +259,10 @@ { "type": "number", "key": "ssaoFilterRadius", - "label": "SSAO Filter Radius" + "label": "SSAO Filter Radius", + "decimal": 0, + "minimum": 1, + "maximum": 32 }, { "type": "number", From 54b8056238250d8699b2c59bfafd13947a88ff4d Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Fri, 24 Jun 2022 11:19:25 +0300 Subject: [PATCH 24/35] Adjust defaults. --- openpype/settings/defaults/project_settings/maya.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 7057160a408..293648385bb 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -504,7 +504,7 @@ "ssaoEnable": true, "ssaoAmount": 0, "ssaoRadius": 0, - "ssaoFilterRadius": 0, + "ssaoFilterRadius": 1, "ssaoSamples": 8, "hwFogEnable": true, "hwFogFalloff": "0", From 96fefa32c039fee52bc2120ab3c8c23bb63d8de6 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Fri, 24 Jun 2022 12:50:20 +0300 Subject: [PATCH 25/35] Add Fog Density --- .../projects_schema/schemas/schema_maya_capture.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index d9d565943f0..6e5eb43dd0c 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -290,6 +290,11 @@ { "2": "Exponential Squared"} ] }, + { + "type": "number", + "key": "hwFogDensity", + "label": "Fog Density" + }, { "type": "number", "key": "hwFogStart", @@ -303,7 +308,7 @@ { "type": "number", "key": "hwFogAlpha", - "label": "Enable Fog Alpha" + "label": "Fog Alpha" }, { "type": "number", From 66cce36da5646553e6ffde4ec278433c47aea202 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Fri, 24 Jun 2022 12:50:30 +0300 Subject: [PATCH 26/35] Adjust defaults to Maya Values --- .../defaults/project_settings/maya.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 293648385bb..bd8d1fecf5f 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -502,21 +502,21 @@ "twoSidedLighting": true, "lineAAEnable": true, "ssaoEnable": true, - "ssaoAmount": 0, - "ssaoRadius": 0, - "ssaoFilterRadius": 1, - "ssaoSamples": 8, + "ssaoAmount": 1, + "ssaoRadius": 16, + "ssaoFilterRadius": 16, + "ssaoSamples": 16, "hwFogEnable": true, "hwFogFalloff": "0", "hwFogStart": 0, - "hwFogEnd": 0, + "hwFogEnd": 100, "hwFogAlpha": 0, - "hwFogColorR": 0, - "hwFogColorG": 0, - "hwFogColorB": 0, + "hwFogColorR": 1.0, + "hwFogColorG": 1.0, + "hwFogColorB": 1.0, "motionBlurEnable": true, "motionBlurSampleCount": 8, - "motionBlurShutterOpenFraction": 0.01, + "motionBlurShutterOpenFraction": 0.2, "cameras": false, "clipGhosts": false, "controlVertices": false, From 5b9168b421ed91870beb11bccc2dc9bf71136370 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Fri, 24 Jun 2022 12:51:54 +0300 Subject: [PATCH 27/35] Append density default --- openpype/settings/defaults/project_settings/maya.json | 1 + 1 file changed, 1 insertion(+) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index bd8d1fecf5f..bf6c18bb951 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -508,6 +508,7 @@ "ssaoSamples": 16, "hwFogEnable": true, "hwFogFalloff": "0", + "hwFogDensity": 0, "hwFogStart": 0, "hwFogEnd": 100, "hwFogAlpha": 0, From 76cf10a61186d38a4dd1f4c3bc33edce7d605e06 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Fri, 24 Jun 2022 13:08:47 +0300 Subject: [PATCH 28/35] Add missing hwFogDensity key. --- openpype/hosts/maya/api/lib.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 166f3483198..924dc037290 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -2537,6 +2537,9 @@ def load_capture_preset(data=None): if key == 'ssaoRadius': temp_options2['ssaoRadius'] = preset[id][key] + if key == 'hwFogDensity': + temp_options2['hwFogDensity'] = preset[id][key] + if key == 'ssaoFilterRadius': temp_options2['ssaoFilterRadius'] = preset[id][key] @@ -2610,6 +2613,7 @@ def load_capture_preset(data=None): 'hwFogColorR', 'hwFogColorG', 'hwFogColorB', + 'hwFogDensity', 'textureMaxResolution', 'motionBlurEnable', 'motionBlurSampleCount', From 0486b99a3438f8b70635e06087a0bbc9f9676b1d Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Fri, 24 Jun 2022 14:14:41 +0300 Subject: [PATCH 29/35] Change hwFogDensity into float key. --- .../schemas/projects_schema/schemas/schema_maya_capture.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index 6e5eb43dd0c..a87918878d7 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -293,7 +293,10 @@ { "type": "number", "key": "hwFogDensity", - "label": "Fog Density" + "label": "Fog Density", + "decimal": 2, + "minimum": 0, + "maximum": 1 }, { "type": "number", From f25c662c37ced86fde5c22764665c55b9268edea Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Sat, 25 Jun 2022 11:21:25 +0300 Subject: [PATCH 30/35] Replace `hwFogEnable` with `fogging` flag. --- openpype/hosts/maya/api/lib.py | 5 ++--- openpype/settings/defaults/project_settings/maya.json | 2 +- .../schemas/projects_schema/schemas/schema_maya_capture.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 924dc037290..cd41ba3ffd8 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -2550,8 +2550,8 @@ def load_capture_preset(data=None): if key == 'headsUpDisplay': temp_options['headsUpDisplay'] = True - if key == 'hwFogEnable': - temp_options2['hwFogEnable'] = preset[id][key] or False + if key == 'fogging': + temp_options['fogging'] = preset[id][key] or False if key == 'hwFogStart': temp_options2['hwFogStart'] = preset[id][key] @@ -2605,7 +2605,6 @@ def load_capture_preset(data=None): 'ssaoAmount', 'ssaoFilterRadius', 'ssaoRadius', - 'hwFogEnable', 'hwFogStart', 'hwFogEnd', 'hwFogAlpha', diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index bf6c18bb951..77bc8118dfd 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -506,7 +506,7 @@ "ssaoRadius": 16, "ssaoFilterRadius": 16, "ssaoSamples": 16, - "hwFogEnable": true, + "fogging": true, "hwFogFalloff": "0", "hwFogDensity": 0, "hwFogStart": 0, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index a87918878d7..2323fbaba06 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -277,7 +277,7 @@ }, { "type": "boolean", - "key": "hwFogEnable", + "key": "fogging", "label": "Enable Hardware Fog" }, { From b74e144dbb6d9fda8ac701d957d7c9fa98005139 Mon Sep 17 00:00:00 2001 From: "Allan I. A" <76656700+Allan-I@users.noreply.github.com> Date: Mon, 27 Jun 2022 12:15:13 +0300 Subject: [PATCH 31/35] Update openpype/settings/defaults/project_settings/maya.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ondřej Samohel <33513211+antirotor@users.noreply.github.com> --- openpype/settings/defaults/project_settings/maya.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 77bc8118dfd..2f1dca69783 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -506,7 +506,7 @@ "ssaoRadius": 16, "ssaoFilterRadius": 16, "ssaoSamples": 16, - "fogging": true, + "fogging": false, "hwFogFalloff": "0", "hwFogDensity": 0, "hwFogStart": 0, From 800a2f90d2baaf59ad662a42a920012fac827931 Mon Sep 17 00:00:00 2001 From: "Allan I. A" <76656700+Allan-I@users.noreply.github.com> Date: Mon, 27 Jun 2022 12:15:21 +0300 Subject: [PATCH 32/35] Update openpype/settings/defaults/project_settings/maya.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ondřej Samohel <33513211+antirotor@users.noreply.github.com> --- openpype/settings/defaults/project_settings/maya.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 2f1dca69783..117b2608537 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -515,7 +515,7 @@ "hwFogColorR": 1.0, "hwFogColorG": 1.0, "hwFogColorB": 1.0, - "motionBlurEnable": true, + "motionBlurEnable": false, "motionBlurSampleCount": 8, "motionBlurShutterOpenFraction": 0.2, "cameras": false, From dd5cef560a44a513ae3395fd84f6c02c1adffff8 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Tue, 28 Jun 2022 05:56:36 +0300 Subject: [PATCH 33/35] Adjust setting position --- .../schemas/schema_maya_capture.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index 2323fbaba06..0a633156223 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -204,14 +204,6 @@ { "type": "splitter" }, - { - "type": "number", - "key": "multiSample", - "label": "Anti Aliasing Samples", - "decimal": 0, - "minimum": 0, - "maximum": 32 - }, { "type": "splitter" }, @@ -238,6 +230,14 @@ "key": "lineAAEnable", "label": "Enable Anti-Aliasing" }, + { + "type": "number", + "key": "multiSample", + "label": "Anti Aliasing Samples", + "decimal": 0, + "minimum": 0, + "maximum": 32 + }, { "type": "splitter" }, From e9f67f8747cad536c591884701fc441f177d3574 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Tue, 28 Jun 2022 05:56:51 +0300 Subject: [PATCH 34/35] Adjust some defaults. --- openpype/settings/defaults/project_settings/maya.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index 117b2608537..bb7719dc30a 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -496,19 +496,19 @@ "override_viewport_options": true, "displayLights": "default", "textureMaxResolution": 1024, - "multiSample": 4, "shadows": true, "textures": true, "twoSidedLighting": true, "lineAAEnable": true, - "ssaoEnable": true, + "multiSample": 8, + "ssaoEnable": false, "ssaoAmount": 1, "ssaoRadius": 16, "ssaoFilterRadius": 16, "ssaoSamples": 16, "fogging": false, "hwFogFalloff": "0", - "hwFogDensity": 0, + "hwFogDensity": 0.0, "hwFogStart": 0, "hwFogEnd": 100, "hwFogAlpha": 0, From f76d84dff177c31f46d369f0ccd97d0a253251a7 Mon Sep 17 00:00:00 2001 From: Allan Ihsan Date: Wed, 6 Jul 2022 22:57:02 +0300 Subject: [PATCH 35/35] Append "Depth of Field" to plablast options and function. --- openpype/hosts/maya/api/lib.py | 4 ++++ openpype/settings/defaults/project_settings/maya.json | 1 + .../schemas/projects_schema/schemas/schema_maya_capture.json | 5 +++++ openpype/vendor/python/common/capture.py | 3 ++- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index cd41ba3ffd8..a159554b549 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -2522,6 +2522,9 @@ def load_capture_preset(data=None): temp_options2['multiSampleEnable'] = False temp_options2['multiSampleCount'] = preset[id][key] + if key == 'renderDepthOfField': + temp_options2['renderDepthOfField'] = preset[id][key] + if key == 'ssaoEnable': if preset[id][key] is True: temp_options2['ssaoEnable'] = True @@ -2618,6 +2621,7 @@ def load_capture_preset(data=None): 'motionBlurSampleCount', 'motionBlurShutterOpenFraction', 'lineAAEnable', + 'renderDepthOfField' ]: temp_options.pop(key, None) diff --git a/openpype/settings/defaults/project_settings/maya.json b/openpype/settings/defaults/project_settings/maya.json index bb7719dc30a..39a86882674 100644 --- a/openpype/settings/defaults/project_settings/maya.json +++ b/openpype/settings/defaults/project_settings/maya.json @@ -496,6 +496,7 @@ "override_viewport_options": true, "displayLights": "default", "textureMaxResolution": 1024, + "renderDepthOfField": true, "shadows": true, "textures": true, "twoSidedLighting": true, diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index 0a633156223..7a40f349ccf 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -204,6 +204,11 @@ { "type": "splitter" }, + { + "type":"boolean", + "key": "renderDepthOfField", + "label": "Depth of Field" + }, { "type": "splitter" }, diff --git a/openpype/vendor/python/common/capture.py b/openpype/vendor/python/common/capture.py index 6b4c40a6e8a..4d9e1da3e42 100644 --- a/openpype/vendor/python/common/capture.py +++ b/openpype/vendor/python/common/capture.py @@ -380,7 +380,8 @@ def replace(m): "transparencyAlgorithm": 1, "transparencyQuality": 0.33, "useMaximumHardwareLights": True, - "vertexAnimationCache": 0 + "vertexAnimationCache": 0, + "renderDepthOfField": 0 }