From 1718b113cd59b8fcf562bfa2bf22b1ac5cb49fa1 Mon Sep 17 00:00:00 2001 From: "georgiy.m.markelov@gmail.com" Date: Mon, 22 May 2023 17:39:23 +0300 Subject: [PATCH 1/7] fix review comments --- hydra_storm/__init__.py | 7 +++--- hydra_storm/engine.py | 9 ++++--- hydra_storm/plugin/plugInfo.json | 3 --- .../usd/hdStorm/resources/plugInfo.json | 22 ---------------- hydra_storm/plugin/usd/plugInfo.json | 3 --- hydra_storm/properties.py | 22 ++++++++++------ hydra_storm/ui.py | 25 ++++++++++++++++--- 7 files changed, 43 insertions(+), 48 deletions(-) delete mode 100644 hydra_storm/plugin/plugInfo.json delete mode 100644 hydra_storm/plugin/usd/hdStorm/resources/plugInfo.json delete mode 100644 hydra_storm/plugin/usd/plugInfo.json diff --git a/hydra_storm/__init__.py b/hydra_storm/__init__.py index f75a59b2c..4241b5845 100644 --- a/hydra_storm/__init__.py +++ b/hydra_storm/__init__.py @@ -5,18 +5,17 @@ bl_info = { - "name": "Hydra render engine: Storm", + "name": "Hydra Storm render engine", "author": "AMD", "version": (1, 0, 0), "blender": (3, 5, 0), - "location": "Info header > Render engine menu", - "description": "Storm GL delegate for Hydra render engine", + "description": "USD’s high performance rasterizing renderer", "tracker_url": "", "doc_url": "", "community": "", "downloads": "", "main_web": "", - "support": 'TESTING', + "support": 'OFFICIAL', "category": "Render" } diff --git a/hydra_storm/engine.py b/hydra_storm/engine.py index a93925ba0..b58c025ea 100644 --- a/hydra_storm/engine.py +++ b/hydra_storm/engine.py @@ -11,8 +11,8 @@ import bpy_hydra class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine): bl_idname = 'StormHydraRenderEngine' - bl_label = "Hydra: Storm" - bl_info = "Hydra Storm (OpenGL) render delegate" + bl_label = "Hydra Storm" + bl_info = "USD’s high performance rasterizing renderer" bl_use_preview = False bl_use_gpu_context = True @@ -25,8 +25,9 @@ class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine): bpy_hydra.register_plugins([str(Path(__file__).parent / "plugin")]) - def get_delegate_settings(self, engine_type): - settings = bpy.context.scene.hydra_storm + def get_render_settings(self, engine_type): + settings = bpy.context.scene.hydra_storm.viewport if engine_type == 'VIEWPORT' else \ + bpy.context.scene.hydra_storm.final return { 'enableTinyPrimCulling': settings.enable_tiny_prim_culling, 'volumeRaymarchingStepSize': settings.volume_raymarching_step_size, diff --git a/hydra_storm/plugin/plugInfo.json b/hydra_storm/plugin/plugInfo.json deleted file mode 100644 index 45968d6c1..000000000 --- a/hydra_storm/plugin/plugInfo.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Includes": [ "usd/*/resources/" ] -} \ No newline at end of file diff --git a/hydra_storm/plugin/usd/hdStorm/resources/plugInfo.json b/hydra_storm/plugin/usd/hdStorm/resources/plugInfo.json deleted file mode 100644 index cd4ab743d..000000000 --- a/hydra_storm/plugin/usd/hdStorm/resources/plugInfo.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Plugins": [ - { - "Info": { - "Types": { - "HdStormRendererPlugin": { - "bases": [ - "HdRendererPlugin" - ], - "displayName": "GL", - "priority": 0 - } - } - }, - "LibraryPath": "", - "Name": "hdStorm", - "ResourcePath": "resources", - "Root": "..", - "Type": "library" - } - ] -} diff --git a/hydra_storm/plugin/usd/plugInfo.json b/hydra_storm/plugin/usd/plugInfo.json deleted file mode 100644 index 2e20f3d66..000000000 --- a/hydra_storm/plugin/usd/plugInfo.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Includes": [ "*/resources/" ] -} diff --git a/hydra_storm/properties.py b/hydra_storm/properties.py index 1200a5ec1..121f80618 100644 --- a/hydra_storm/properties.py +++ b/hydra_storm/properties.py @@ -7,11 +7,11 @@ import bpy class Properties(bpy.types.PropertyGroup): - bl_type = None + type = None @classmethod def register(cls): - cls.bl_type.hydra_storm = bpy.props.PointerProperty( + cls.type.hydra_storm = bpy.props.PointerProperty( name="Hydra Storm", description="Hydra Storm properties", type=cls, @@ -19,12 +19,10 @@ class Properties(bpy.types.PropertyGroup): @classmethod def unregister(cls): - del cls.bl_type.hydra_storm + del cls.type.hydra_storm -class SceneProperties(Properties): - bl_type = bpy.types.Scene - +class RenderSettings(bpy.types.PropertyGroup): enable_tiny_prim_culling: bpy.props.BoolProperty( name="Tiny Prim Culling", description="Enable Tiny Prim Culling", @@ -36,7 +34,7 @@ class SceneProperties(Properties): default=1.0, ) volume_raymarching_step_size_lighting: bpy.props.FloatProperty( - name="Volume Raymarching Step Size", + name="Volume Raymarching Step Size Lighting", description="Step size when raymarching volume for lighting computation", default=10.0, ) @@ -48,10 +46,18 @@ class SceneProperties(Properties): max_lights: bpy.props.IntProperty( name="Max Lights", description="Maximum number of lights", - default=16, min=0, + default=16, min=0, max=16, ) +class SceneProperties(Properties): + type = bpy.types.Scene + + final: bpy.props.PointerProperty(type=RenderSettings) + viewport: bpy.props.PointerProperty(type=RenderSettings) + + register, unregister = bpy.utils.register_classes_factory(( + RenderSettings, SceneProperties, )) diff --git a/hydra_storm/ui.py b/hydra_storm/ui.py index 7051079d3..e5a0cc232 100644 --- a/hydra_storm/ui.py +++ b/hydra_storm/ui.py @@ -19,16 +19,32 @@ class Panel(bpy.types.Panel): return context.engine in cls.COMPAT_ENGINES -class STORM_HYDRA_RENDER_PT_render_settings(Panel): +class STORM_HYDRA_RENDER_PT_final(Panel): """Final render delegate and settings""" - bl_label = "Storm Render Settings" + bl_idname = 'STORM_HYDRA_RENDER_PT_final' + bl_label = "Storm Final Settings" def draw(self, context): layout = self.layout layout.use_property_split = True layout.use_property_decorate = False - settings = context.scene.hydra_storm + settings = context.scene.hydra_storm.final + layout.prop(settings, 'enable_tiny_prim_culling') + layout.prop(settings, 'max_lights') + + +class STORM_HYDRA_RENDER_PT_viewport(Panel): + """Viewport render delegate and settings""" + bl_idname = 'STORM_HYDRA_RENDER_PT_viewport' + bl_label = "Storm Viewport Settings" + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + settings = context.scene.hydra_storm.viewport layout.prop(settings, 'enable_tiny_prim_culling') layout.prop(settings, 'max_lights') @@ -89,7 +105,8 @@ class STORM_HYDRA_LIGHT_PT_light(Panel): register_classes, unregister_classes = bpy.utils.register_classes_factory(( - STORM_HYDRA_RENDER_PT_render_settings, + STORM_HYDRA_RENDER_PT_final, + STORM_HYDRA_RENDER_PT_viewport, STORM_HYDRA_LIGHT_PT_light, )) -- 2.30.2 From 82711959af26f12f566bae46b0b7502389e49500 Mon Sep 17 00:00:00 2001 From: "georgiy.m.markelov@gmail.com" Date: Mon, 22 May 2023 18:14:49 +0300 Subject: [PATCH 2/7] added properties to UI --- hydra_storm/properties.py | 8 +++--- hydra_storm/ui.py | 60 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/hydra_storm/properties.py b/hydra_storm/properties.py index 121f80618..0ea993f53 100644 --- a/hydra_storm/properties.py +++ b/hydra_storm/properties.py @@ -29,23 +29,23 @@ class RenderSettings(bpy.types.PropertyGroup): default=False, ) volume_raymarching_step_size: bpy.props.FloatProperty( - name="Volume Raymarching Step Size", + name="Step Size", description="Step size when raymarching volume", default=1.0, ) volume_raymarching_step_size_lighting: bpy.props.FloatProperty( - name="Volume Raymarching Step Size Lighting", + name="Step Size Lighting", description="Step size when raymarching volume for lighting computation", default=10.0, ) volume_max_texture_memory_per_field: bpy.props.FloatProperty( - name="Volume Max Texture Memory Per Field", + name="Max Texture Memory Per Field", description="Maximum memory for a volume field texture in Mb (unless overridden by field prim)", default=128.0, ) max_lights: bpy.props.IntProperty( name="Max Lights", - description="Maximum number of lights", + description="Limit maximum number of lights", default=16, min=0, max=16, ) diff --git a/hydra_storm/ui.py b/hydra_storm/ui.py index e5a0cc232..fd56a6ed0 100644 --- a/hydra_storm/ui.py +++ b/hydra_storm/ui.py @@ -19,6 +19,9 @@ class Panel(bpy.types.Panel): return context.engine in cls.COMPAT_ENGINES +# +# FINAL RENDER SETTINGS +# class STORM_HYDRA_RENDER_PT_final(Panel): """Final render delegate and settings""" bl_idname = 'STORM_HYDRA_RENDER_PT_final' @@ -34,6 +37,35 @@ class STORM_HYDRA_RENDER_PT_final(Panel): layout.prop(settings, 'max_lights') +class FinalPanel(bpy.types.Panel): + bl_parent_id = STORM_HYDRA_RENDER_PT_final.bl_idname + bl_space_type = 'PROPERTIES' + bl_region_type = 'WINDOW' + bl_options = {'DEFAULT_CLOSED'} + + def settings(self, context): + return context.scene.hydra_storm.final + + +class STORM_HYDRA_RENDER_PT_volume_final(FinalPanel): + bl_label = "Volume Raymarching" + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + settings = self.settings(context) + + col = layout.column(align=True) + col.prop(settings, "volume_raymarching_step_size") + col.prop(settings, "volume_raymarching_step_size_lighting") + col.prop(settings, "volume_max_texture_memory_per_field") + + +# +# VIEWPORT RENDER SETTINGS +# class STORM_HYDRA_RENDER_PT_viewport(Panel): """Viewport render delegate and settings""" bl_idname = 'STORM_HYDRA_RENDER_PT_viewport' @@ -49,6 +81,32 @@ class STORM_HYDRA_RENDER_PT_viewport(Panel): layout.prop(settings, 'max_lights') +class ViewportPanel(bpy.types.Panel): + bl_parent_id = STORM_HYDRA_RENDER_PT_viewport.bl_idname + bl_space_type = 'PROPERTIES' + bl_region_type = 'WINDOW' + bl_options = {'DEFAULT_CLOSED'} + + def settings(self, context): + return context.scene.hydra_storm.viewport + + +class STORM_HYDRA_RENDER_PT_volume_viewport(ViewportPanel): + bl_label = "Volume Raymarching" + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + layout.use_property_decorate = False + + settings = self.settings(context) + + col = layout.column(align=True) + col.prop(settings, "volume_raymarching_step_size") + col.prop(settings, "volume_raymarching_step_size_lighting") + col.prop(settings, "volume_max_texture_memory_per_field") + + class STORM_HYDRA_LIGHT_PT_light(Panel): """ Physical light sources @@ -106,7 +164,9 @@ class STORM_HYDRA_LIGHT_PT_light(Panel): register_classes, unregister_classes = bpy.utils.register_classes_factory(( STORM_HYDRA_RENDER_PT_final, + STORM_HYDRA_RENDER_PT_volume_final, STORM_HYDRA_RENDER_PT_viewport, + STORM_HYDRA_RENDER_PT_volume_viewport, STORM_HYDRA_LIGHT_PT_light, )) -- 2.30.2 From 7d430d930e2cae5dec258617a3007c49e8b34a60 Mon Sep 17 00:00:00 2001 From: "georgiy.m.markelov@gmail.com" Date: Mon, 22 May 2023 18:16:55 +0300 Subject: [PATCH 3/7] fix character --- hydra_storm/__init__.py | 2 +- hydra_storm/engine.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hydra_storm/__init__.py b/hydra_storm/__init__.py index 4241b5845..41fcbee99 100644 --- a/hydra_storm/__init__.py +++ b/hydra_storm/__init__.py @@ -9,7 +9,7 @@ bl_info = { "author": "AMD", "version": (1, 0, 0), "blender": (3, 5, 0), - "description": "USD’s high performance rasterizing renderer", + "description": "USD's high performance rasterizing renderer", "tracker_url": "", "doc_url": "", "community": "", diff --git a/hydra_storm/engine.py b/hydra_storm/engine.py index b58c025ea..b308b84e6 100644 --- a/hydra_storm/engine.py +++ b/hydra_storm/engine.py @@ -12,7 +12,7 @@ import bpy_hydra class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine): bl_idname = 'StormHydraRenderEngine' bl_label = "Hydra Storm" - bl_info = "USD’s high performance rasterizing renderer" + bl_info = "USD's high performance rasterizing renderer" bl_use_preview = False bl_use_gpu_context = True -- 2.30.2 From 3226dbbd15a8d707f043f0217bf0867934d93533 Mon Sep 17 00:00:00 2001 From: "georgiy.m.markelov@gmail.com" Date: Wed, 24 May 2023 12:11:20 +0300 Subject: [PATCH 4/7] remove def register(cls) --- hydra_storm/engine.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/hydra_storm/engine.py b/hydra_storm/engine.py index b308b84e6..99dd764ec 100644 --- a/hydra_storm/engine.py +++ b/hydra_storm/engine.py @@ -19,12 +19,6 @@ class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine): delegate_id = 'HdStormRendererPlugin' - @classmethod - def register(cls): - super().register() - - bpy_hydra.register_plugins([str(Path(__file__).parent / "plugin")]) - def get_render_settings(self, engine_type): settings = bpy.context.scene.hydra_storm.viewport if engine_type == 'VIEWPORT' else \ bpy.context.scene.hydra_storm.final -- 2.30.2 From b5c4e8ff9cc120f5b0db554cbb83f2b1ef00120a Mon Sep 17 00:00:00 2001 From: "georgiy.m.markelov@gmail.com" Date: Wed, 24 May 2023 13:53:21 +0300 Subject: [PATCH 5/7] removed outdated panels --- hydra_storm/ui.py | 51 +++++++---------------------------------------- 1 file changed, 7 insertions(+), 44 deletions(-) diff --git a/hydra_storm/ui.py b/hydra_storm/ui.py index fd56a6ed0..40677a4bd 100644 --- a/hydra_storm/ui.py +++ b/hydra_storm/ui.py @@ -175,52 +175,15 @@ register_classes, unregister_classes = bpy.utils.register_classes_factory(( def get_panels(): # follow the Cycles model of excluding panels we don't want exclude_panels = { - 'DATA_PT_area', - 'DATA_PT_falloff_curve', - 'DATA_PT_shadow', - 'DATA_PT_spot', - 'DATA_PT_sunsky', - 'DATA_PT_light', - 'MATERIAL_PT_diffuse', - 'MATERIAL_PT_flare', - 'MATERIAL_PT_halo', - 'MATERIAL_PT_mirror', - 'MATERIAL_PT_options', - 'MATERIAL_PT_pipeline', - 'MATERIAL_PT_shading', - 'MATERIAL_PT_shadow', - 'MATERIAL_PT_specular', - 'MATERIAL_PT_sss', - 'MATERIAL_PT_strand', - 'MATERIAL_PT_transp', - 'MATERIAL_PT_volume_density', - 'MATERIAL_PT_volume_integration', - 'MATERIAL_PT_volume_lighting', - 'MATERIAL_PT_volume_options', - 'MATERIAL_PT_volume_shading', - 'MATERIAL_PT_volume_transp', - 'RENDERLAYER_PT_layer_options', - 'RENDERLAYER_PT_layer_passes', - 'RENDERLAYER_PT_views', - 'RENDER_PT_antialiasing', - 'RENDER_PT_bake', - 'RENDER_PT_motion_blur', - 'RENDER_PT_performance', - 'RENDER_PT_freestyle', - 'RENDER_PT_post_processing', - 'RENDER_PT_shading', - 'RENDER_PT_simplify', 'RENDER_PT_stamp', - 'SCENE_PT_simplify', - 'SCENE_PT_audio', - 'WORLD_PT_ambient_occlusion', - 'WORLD_PT_environment_lighting', - 'WORLD_PT_gather', - 'WORLD_PT_indirect_lighting', - 'WORLD_PT_mist', - 'WORLD_PT_preview', - 'WORLD_PT_world', + 'DATA_PT_light', + 'DATA_PT_spot', 'NODE_DATA_PT_light', + 'DATA_PT_falloff_curve', + 'RENDER_PT_post_processing', + 'RENDER_PT_simplify', + 'SCENE_PT_audio', + 'RENDER_PT_freestyle' } include_eevee_panels = { 'MATERIAL_PT_preview', -- 2.30.2 From 9bba3160e5e1210cb0993caa10816f761cfc9b6c Mon Sep 17 00:00:00 2001 From: "georgiy.m.markelov@gmail.com" Date: Thu, 25 May 2023 14:51:43 +0300 Subject: [PATCH 6/7] fix review comments --- hydra_storm/properties.py | 4 ++-- hydra_storm/ui.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hydra_storm/properties.py b/hydra_storm/properties.py index 0ea993f53..4e4ef40ae 100644 --- a/hydra_storm/properties.py +++ b/hydra_storm/properties.py @@ -29,12 +29,12 @@ class RenderSettings(bpy.types.PropertyGroup): default=False, ) volume_raymarching_step_size: bpy.props.FloatProperty( - name="Step Size", + name="Volume Raymarching Step Size", description="Step size when raymarching volume", default=1.0, ) volume_raymarching_step_size_lighting: bpy.props.FloatProperty( - name="Step Size Lighting", + name="Volume Raymarching Step Size Lighting", description="Step size when raymarching volume for lighting computation", default=10.0, ) diff --git a/hydra_storm/ui.py b/hydra_storm/ui.py index 40677a4bd..68ce9d1e9 100644 --- a/hydra_storm/ui.py +++ b/hydra_storm/ui.py @@ -58,8 +58,8 @@ class STORM_HYDRA_RENDER_PT_volume_final(FinalPanel): settings = self.settings(context) col = layout.column(align=True) - col.prop(settings, "volume_raymarching_step_size") - col.prop(settings, "volume_raymarching_step_size_lighting") + col.prop(settings, "volume_raymarching_step_size", text="Step Size") + col.prop(settings, "volume_raymarching_step_size_lighting", text="Step Size Lightning") col.prop(settings, "volume_max_texture_memory_per_field") @@ -102,8 +102,8 @@ class STORM_HYDRA_RENDER_PT_volume_viewport(ViewportPanel): settings = self.settings(context) col = layout.column(align=True) - col.prop(settings, "volume_raymarching_step_size") - col.prop(settings, "volume_raymarching_step_size_lighting") + col.prop(settings, "volume_raymarching_step_size", text="Step Size") + col.prop(settings, "volume_raymarching_step_size_lighting", text="Step Size Lightning") col.prop(settings, "volume_max_texture_memory_per_field") -- 2.30.2 From fb8f186cd0be0ba672173d0f82cfd9af336ea267 Mon Sep 17 00:00:00 2001 From: Bogdan Nagirniak Date: Thu, 1 Jun 2023 03:35:38 +0300 Subject: [PATCH 7/7] Renamed RenderSettings->RenderProperties as more related --- hydra_storm/properties.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hydra_storm/properties.py b/hydra_storm/properties.py index 4e4ef40ae..ad29a5c40 100644 --- a/hydra_storm/properties.py +++ b/hydra_storm/properties.py @@ -22,7 +22,7 @@ class Properties(bpy.types.PropertyGroup): del cls.type.hydra_storm -class RenderSettings(bpy.types.PropertyGroup): +class RenderProperties(bpy.types.PropertyGroup): enable_tiny_prim_culling: bpy.props.BoolProperty( name="Tiny Prim Culling", description="Enable Tiny Prim Culling", @@ -53,11 +53,11 @@ class RenderSettings(bpy.types.PropertyGroup): class SceneProperties(Properties): type = bpy.types.Scene - final: bpy.props.PointerProperty(type=RenderSettings) - viewport: bpy.props.PointerProperty(type=RenderSettings) + final: bpy.props.PointerProperty(type=RenderProperties) + viewport: bpy.props.PointerProperty(type=RenderProperties) register, unregister = bpy.utils.register_classes_factory(( - RenderSettings, + RenderProperties, SceneProperties, )) -- 2.30.2