USD Hydra render engine #100892
Open
opened 2022-09-07 23:13:22 +02:00 by Brian Savery (AMD)
·
21 comments
No Branch/Tag Specified
main
blender-v3.6-release
asset-shelf
brush-assets-project
temp-sculpt-dyntopo
temp-sculpt-dyntopo-hive-alloc
tmp-usd-python-mtl
asset-browser-frontend-split
node-group-operators
blender-v2.93-release
blender-v3.3-release
universal-scene-description
temp-sculpt-attr-api
blender-v3.5-release
realtime-clock
sculpt-dev
gpencil-next
bevelv2
microfacet_hair
blender-projects-basics
principled-v2
v3.3.7
v2.93.18
v3.5.1
v3.3.6
v2.93.17
v3.5.0
v2.93.16
v3.3.5
v3.3.4
v2.93.15
v2.93.14
v3.3.3
v2.93.13
v2.93.12
v3.4.1
v3.3.2
v3.4.0
v3.3.1
v2.93.11
v3.3.0
v3.2.2
v2.93.10
v3.2.1
v3.2.0
v2.83.20
v2.93.9
v3.1.2
v3.1.1
v3.1.0
v2.83.19
v2.93.8
v3.0.1
v2.93.7
v3.0.0
v2.93.6
v2.93.5
v2.83.18
v2.93.4
v2.93.3
v2.83.17
v2.93.2
v2.93.1
v2.83.16
v2.93.0
v2.83.15
v2.83.14
v2.83.13
v2.92.0
v2.83.12
v2.91.2
v2.83.10
v2.91.0
v2.83.9
v2.83.8
v2.83.7
v2.90.1
v2.83.6.1
v2.83.6
v2.90.0
v2.83.5
v2.83.4
v2.83.3
v2.83.2
v2.83.1
v2.83
v2.82a
v2.82
v2.81a
v2.81
v2.80
v2.80-rc3
v2.80-rc2
v2.80-rc1
v2.79b
v2.79a
v2.79
v2.79-rc2
v2.79-rc1
v2.78c
v2.78b
v2.78a
v2.78
v2.78-rc2
v2.78-rc1
v2.77a
v2.77
v2.77-rc2
v2.77-rc1
v2.76b
v2.76a
v2.76
v2.76-rc3
v2.76-rc2
v2.76-rc1
v2.75a
v2.75
v2.75-rc2
v2.75-rc1
v2.74
v2.74-rc4
v2.74-rc3
v2.74-rc2
v2.74-rc1
v2.73a
v2.73
v2.73-rc1
v2.72b
2.72b
v2.72a
v2.72
v2.72-rc1
v2.71
v2.71-rc2
v2.71-rc1
v2.70a
v2.70
v2.70-rc2
v2.70-rc
v2.69
v2.68a
v2.68
v2.67b
v2.67a
v2.67
v2.66a
v2.66
v2.65a
v2.65
v2.64a
v2.64
v2.63a
v2.63
v2.61
v2.60a
v2.60
v2.59
v2.58a
v2.58
v2.57b
v2.57a
v2.57
v2.56a
v2.56
v2.55
v2.54
v2.53
v2.52
v2.51
v2.50
v2.49b
v2.49a
v2.49
v2.48a
v2.48
v2.47
v2.46
v2.45
v2.44
v2.43
v2.42a
v2.42
v2.41
v2.40
v2.37a
v2.37
v2.36
v2.35a
v2.35
v2.34
v2.33a
v2.33
v2.32
v2.31a
v2.31
v2.30
v2.28c
v2.28a
v2.28
v2.27
v2.26
v2.25
Labels
Clear labels
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
Apply labels
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
Eevee & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest/Import
Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest: Wayland
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Eevee & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
Eevee & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest/Import
Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest: Wayland
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Eevee & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Set Project
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
10 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#100892
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Details on the design for the Hydra render engine enablement:
This system will include a system for using the [USD Hydra render engine ]] inside of Blender. This will allowed simplified render addons, by renderers compiling a Hydra Render Delegate against the USD libs which will be included with Blender in [ https:*developer.blender.org/T99618 | 3.5 . Additionally, render export will be done on the C++ side, so it should be better export performance than using python.
Render Delegates will install like a normal render engine add-on (via python), but will subclass the
HydraRenderEngine
class instead ofRender Engine
. This will do a few things, but mainly point the Hydra system (on the C++ side) where to load a compiled Hydra render delegate from. Then at render time, that render delegate will be used for rendering.Addons can specify UI and settings. An overridable method on HydraRenderEngine will allow engines to send USD settings to the Render Delegate.
Blender to Hydra data export will happen on the C++ side using a Hydra Scene Delegate object.
Pieces to make this work:
Hydra Engine (C++) when a Hydra renderer is selected, ties together the Scene Delegate and Render Delegate and executes the render.
Added subscribers: @BrianSavery, @SonnyCampbell_Unity, @AlexeyAdamitsky, @DagerD, @Peine_Perdue, @Plyro, @EstebanCovo, @satishgoda1, @ianhsieh, @ahmed.hindy96, @JulianEisel, @Zhen-Dai, @paulgolter, @Scaredyfish, @JamesBarrie, @lichtwerk, @platerytter, @Yuro, @Roggii-4, @Alaska, @makowalski, @LazyDodo, @brecht, @dr.sybren
Added subscriber: @silex
From the user point of view I think it would be better not to have these two levels where you first select the Hydra render engine, and then select the delegate.
Another better approach could be to register each Hydra delegate as a render engine. With Python it should be possible to dynamically generate a subclass of a
HydraRenderEngine
class. Renderers that want to more closely integrate with Blender could have an add-on that subclassesHydraRenderEngine
manually.That would simplify the UI for users, make the
-E
command line option work, use the same mechanism for panel visibility as existing engines, etc.One potential downside is that scanning the delegates may be expensive and negatively affect startup time. But I would hope that this involves USD just scanning a few
plugInfo.json
files without loading the actual shared libraries.It's an interesting thought. Two potential issues I see:
Installing a Hydra render delegate is somewhat different than installing a "normal" Blender Addon in that where things go and what it manages is different. Right now we have it that in the Hydra add-on preferences you can install a render delegate with a dialog.
It's somewhat nice to allow one render engine for viewport and another for final rendering. with Hydra you should get similar results, but this is somewhat similar to the material preview mode in the current blender viewport vs rendered viewport mode.
Actually the way I could see this working would be that an Render Delegate "Add-on" could be similar to a normal blender add-on (but more minimal) and include in a zip file:
| - plugInfo.json
| - hydra_delegate_directory / - to be installed when MyHydraRenderEngine is registered.
The potential downside here is that you're making a new system for developers to add render engines, BUT there are two upsides:
This would also answer the question @ianhsieh had about renderers wanting to handle UI of settings and put the settings into the USD stream.
Added subscribers: @fclem, @Jeroen-Bakker
I think the installation procedure being the same as any other add-on would be a benefit, especially if in the future we have an official add-ons repository, update mechanism, etc. It's something users are already familiar with. I think it would be useful if render delegates get registered automatically if they are available in the USD plugin paths, but for a nice user interface an actual add-on seems best.
More control over which engine to use for the viewport makes sense, I don't think it's tied to using add-ons or not. But the design for that is not obvious. Up to now render engines other than Workbench/Eevee are only used in the Rendered shading mode, aimed at the use case of shading and lighting. GLStorm would be useful for more use cases, I guess mainly in object mode setting up scenes, doing procedural modeling, etc. Modeling, sculpting and painting are probably not so practical. But even if we consider just object mode, you still need overlays and selection to work, which at the moment means loading the full scene into Blender.
So I'm not sure if those kinds of use cases are something you already want to address, or if it's just about having GLStorm used in Rendered shading mode
Added subscriber: @GeorgiaPacific
@brecht and @Jeroen-Bakker updated the design description. Let me know if you have questions.
The design described in the task sounds good.
How exactly the scene delegate will work is not obvious to me. I assume that's using the code
source/blender/io/usd
module to avoid duplication, but some design changes are probably needed to make that work well? Particularly for doing incremental updates by tracking changes in the Blender scene depsgraph.The Hydra Engine implementation I assume will be an implementation of a
RenderEngineType
, inrender/intern/hydra_engine.cc
or something like that?Added subscriber: @kevindietrich
Added subscriber: @pmoursnv
Added subscriber: @sarazinjean-francois
I think hydra should be chosen as the render engine first, to avoid ambiguity where Cycles will be used without and with Hydra. From my past experiences, a render engine with Hydra could sometimes met issue and not be as up to date as a direct renderer. The user should be able to use Hydra or not. If your concern is more about Hydra not being really a render engine, we could have a "Hydra" checkbox, and then update the render engines list
I don't think it would be ambiguous to select Cycles, and then have an option to use Hydra or not? Not sure why it would have to be the other way around.
In my experience is better an more clear to first go to a Hydra context and then have a list of render delegates, it seems a bit unpractical to go render engine by render engine and tick a Hydra check if available.
Also as previously mentioned, the delegate might be a different version.
It seems just cleaner to have a different context for everything hydra related.
This logic seems backwards to me.
I also support what Esteban suggests. First you should be able to choose whether you want to work with “classic” render engine or Hydra context. If you decide to work with Hydra then you should have an option to choose which delegate exactly you want since there will be more than one available to you.
I expect that over time, most engines add-ons will become either Hydra only, or not use Hydra. Engine support for both is likely to be temporary while Hydra support is incomplete and being stabilized, so making both prominently available is not needed, when only one is well supported.
When referring to "Hydra context", I guess you are referring to something like Solaris in Houdini? Where not only the render engine changes, but you have a different workspace with different editors, viewports and nodes.
But that is not being proposed here, nor is it the direction I think we should go in. One of the strengths of Blender is that you don't have to switch between applications or contexts to do different tasks. You can be sculpting or tweaking geometry nodes while an interactive Cycles preview is running, texture painting, using the viewport compositor, etc. And we are moving even further into this kind of thing with plans for the viewport compositor to be able to combine e.g. grease pencil and other renders, and proposals for interactively working with multiple scenes in the sequencer. And in that view a "Hydra context" does not seem like a good fit.
I agree with you, Blender is a flexible and well designed tool, I appreciate the effort that goes into keeping it that way. I don't think that going as far as Solaris is where efforts should go, for that we have Solaris after all :), what I do think is that there are ways to expose, read and write USD data that is not only friendly to the artist but also robust in scene management and more important interoperability. This is something where Blender, as much as I love it, needs to improve.
One of such ways has already (as far as I can remember) being explored by Brian in his addon, which is a node based scene flow which would be amazing to read, combine, manage, maintain a live reference and finally write USD, this is not Solaris, I can't stress this enough, but it seems to adapt to blender's ethos very well, and if the geometry can be red natively by blender it can conform to everything you are describing, going as far as to maybe breaking reference, caching the geometry on file, sculpting on top and then writing back to USD, it would open up so many exciting possibilities and allow for multi file worflows with real references that can be integreted to many pipelines. At least modifying a pipeline to fit blender would be easy, and switching to blender on a pipeline that already has other Tool would be a breeze. Also It would ligthen some of the burden that blender and cycles have to do it all, since we can just cheaply switch delegatesto render massive scenes and use cycles for what it does best.
I want to use Blender more, my team loves the tool, every animator we bring is a Maya user that gets converted practically and philosolycally to blender in less than 2 weeks and I can certianly see why. I wish we had the tools to really integrate blender to a standarized workflow and not have to bend over backwards to adapt the workflow to blender which often is just not possible.
Regarding your first point and returning to the topic at hand, I see what you are saying, although I think the time frame for this to happen would be speculative at best, maybe we can have the option in each render to use it as hydra or native.
This might get weird rather quickly though, since all Hydra delegates are standarized in a way that natives don't have to conform to.
Maybe a better way is to flag renderers when a delegate is encountered, and maybe have a global hydra switch that sill only show delegates, but in practice averything looks and feels the same you just have a different set of renderers when hydra is activated and another when disabled.
Having said all that, let me thank you for all the effort and care you and the team put into the tool's development, it's a large community and it must be a nightmare to keep everyone satisfied.
Hi all, good feedback. Let me throw in a few thoughts:
When you select a different render engine in Blender other than Cycles (like any 3rd party engine, ProRender, RenderMan, etc) you do have the expectation that it does not function or give exactly the same picture as Cycles. I think users are pretty used to this.
Brecht gave the feedback that having Hydra engines work like any render engine in blender was useful and I agree with him here. You could imagine in the add-on preferences a render engine could label itself as being Hydra based, but that shouldn't change the users workflow.
There ARE advantages like @EstebanCovo mentioned we have explored with the Hydra workflow for referencing USD files etc. But, that is slightly extraneous to the render engine discussion, and can happen later. There is already a mechanism in Blender for marking / disabling features not working with certain render engines, and that could be used for all Hydra based engines. But ideally any things added will work as much as possible across Blender, regardless of engine.
Added subscriber: @matthewlow-dwa