Use External Render Engines for Look Development #66746

Closed
opened 2019-07-12 10:59:27 +02:00 by Jeroen Bakker · 3 comments
Member

Currently the look dev mode uses only EEVEE as render engine. Users are requesting to use the render engine of the scene for look dev. Basically this means that any external render engine should be able to be used in look dev mode.

Functional Changes

This section describes the functional changes for when selecting Cycles. As other external engines can use the same API they can also use it, but they need to update their plugin.
In the UX this change is really small. There will be a ''Scene Render Engine'' option in the shading popover when a viewport is in lookdev mode. This option by default is unset.

Example how this might look like. (This is an example that was copied paste together, not actual code :-) )

lookdev.jpg

The benefit for the user is to be able to quickly switch different lighting models when using the actual render engine that they want to use.

Approach

The project is not difficult, fits well with the current architecture. Would tag this as a small to medium project.

Phase 1: Preparation existing code-base
When implementing I would start with the small fixes in Blender as separate patches. For example

  • the introduction of the utility functions to detect if an external engine is being used.
  • the consistency inside ''view3d_duplicate''

Phase 2: Enable external engines to be used for look dev

During this phase we implement the changes into the codebase of Blender (not yet cycles) to
For testing we can add the ''bl_use_lookdev'' setting to ''cycles/blender/addon/init.py''. It won't show the right result, but we can detect that everything is working as expected.

Phase 3: Enable Cycles to be used as render engine for look dev

Changes to Cycles to support rendering of the look dev mode. Cycles will not be able to render the look dev spheres.

Phase 4: Update documentation

  • RenderEngine Python API
  • Manual
    ** /editors/3dviewport/
    ** /editors/sequencer/
  • Release notes

Impact on the code-base

This change fits in the current architecture. There are areas that we can improve (and fix) in the existing code base during this project.

  • Add an option to ''RenderEngine'' to detect if the Look Dev is supported (''bl_use_look_dev''). Together with ''bl_use_eevee_viewport'' this will control the availability of the look dev mode.
    ** ''bl_use_look_dev'': This configuration setting is used to determine if the render engine can render the look dev mode by it self.
    ** ''bl_use_eevee_viewport'': when this option is available in the shading option a button will appear for ''Scene Render Engine''.
    When any of ''bl_use_lookdev'' or ''bl_use_eevee_viewport'' is set to ''true'' the Look Dev option will appear in any 3d viewport. When both ''bl_use_look_dev'' or ''bl_use_eevee_viewport'' are set to ''true'' the Shading Pop-over will display the ''Scene Render Engine'' setting. By default this setting is unset so EEVEE is being used.
  • Look Dev Overlay: If the external engine supports ''bl_use_preview'' we will trigger preview rendering to generate the look dev previews. They will then be composited on the 3d view by the draw manager. When the external engine does not support ''bl_use_preview'' the look dev overlay will be deactivated (greyed out).
    ** We will need to add a RE_USE_LOOK_DEV_SPHERES for render engines to take over the rendering of the look dev spheres. This is needed to support the current way how EEVEE renders the spheres.
  • Cycles
    Blender Sync: detect if we are in Look Dev. When in Look Dev mode the world and lights are constructed based on the settings of the viewport. Also the background mixing will be done in the world material that is being created. The HDRI's in LookDev are not loaded in memory theu
    ** Pause Preview should appear in the 3d viewport
  • Viewport
    ** ''check_rendered_viewport_visible''
    ** ''view3d_duplicate'': When duplicating a view with an active external engine we should switch to workbench. We should replace the current implementation as it also switched for EEVEE, but only when in Rendered mode.
    ** ''ED_view3d_calc_render_border'': should also take into account the OB_MATERIAL + external engine. or remove this at all when there are no occurances.
    ** ''ED_view3d_engine_type'': add test to use external engine in look dev
    Viewport Render Image/Animation poll method should check if the render engine is an internal (RE_INTERNAL). ''ED_view3d_smooth_view_ex'': Skip when external engine is being used.
  • Sequencer
    ** ''seq_render_scene_strip'': Add special case for OB_MATERIAL for ''bl_use_eevee_viewport = False''
    ** There are more edge cases here as the current implementation does not check the engine capabilities. For example an external render engine could not support Material mode, but still the sequencer strip preview can be set to material mode. We should check the capabilities of the scene engine and force the scene strip renderer to solid mode or rendered mode.
  • We should add a central utility functions if an external engine is currently used to draw a Viewport or will be used for a certain configuration. Currently this check is decentralized and implemented differently due to history (see Sequencer vs Viewport). There is no location that fits well (due to the dependency with BKE_sequencer, editors/view3d, draw and render library) my proposed location would be in (/source/blender/draw/).
Currently the look dev mode uses only EEVEE as render engine. Users are requesting to use the render engine of the scene for look dev. Basically this means that any external render engine should be able to be used in look dev mode. ### Functional Changes This section describes the functional changes for when selecting Cycles. As other external engines can use the same API they can also use it, but they need to update their plugin. In the UX this change is really small. There will be a ''Scene Render Engine'' option in the shading popover when a viewport is in lookdev mode. This option by default is unset. Example how this might look like. (This is an example that was copied paste together, not actual code :-) ) ![lookdev.jpg](https://archive.blender.org/developer/F7602092/lookdev.jpg) The benefit for the user is to be able to quickly switch different lighting models when using the actual render engine that they want to use. ### Approach The project is not difficult, fits well with the current architecture. Would tag this as a small to medium project. **Phase 1**: Preparation existing code-base When implementing I would start with the small fixes in Blender as separate patches. For example * the introduction of the utility functions to detect if an external engine is being used. * the consistency inside ''view3d_duplicate'' **Phase 2**: Enable external engines to be used for look dev During this phase we implement the changes into the codebase of Blender (not yet cycles) to For testing we can add the ''bl_use_lookdev'' setting to ''cycles/blender/addon/__init__.py''. It won't show the right result, but we can detect that everything is working as expected. **Phase 3**: Enable Cycles to be used as render engine for look dev Changes to Cycles to support rendering of the look dev mode. Cycles will not be able to render the look dev spheres. **Phase 4**: Update documentation * RenderEngine Python API * Manual ** /editors/3dviewport/ ** /editors/sequencer/ * Release notes ### Impact on the code-base This change fits in the current architecture. There are areas that we can improve (and fix) in the existing code base during this project. * Add an option to ''RenderEngine'' to detect if the Look Dev is supported (''bl_use_look_dev''). Together with ''bl_use_eevee_viewport'' this will control the availability of the look dev mode. ** ''bl_use_look_dev'': This configuration setting is used to determine if the render engine can render the look dev mode by it self. ** ''bl_use_eevee_viewport'': when this option is available in the shading option a button will appear for ''Scene Render Engine''. **When any of ''bl_use_lookdev'' or ''bl_use_eevee_viewport'' is set to ''true'' the Look Dev option will appear in any 3d viewport.** When both ''bl_use_look_dev'' or ''bl_use_eevee_viewport'' are set to ''true'' the Shading Pop-over will display the ''Scene Render Engine'' setting. By default this setting is unset so EEVEE is being used. * Look Dev Overlay: If the external engine supports ''bl_use_preview'' we will trigger preview rendering to generate the look dev previews. They will then be composited on the 3d view by the draw manager. When the external engine does not support ''bl_use_preview'' the look dev overlay will be deactivated (greyed out). ** We will need to add a RE_USE_LOOK_DEV_SPHERES for render engines to take over the rendering of the look dev spheres. This is needed to support the current way how EEVEE renders the spheres. * Cycles **Blender Sync: detect if we are in Look Dev. When in Look Dev mode the world and lights are constructed based on the settings of the viewport. Also the background mixing will be done in the world material that is being created.** The HDRI's in LookDev are not loaded in memory theu ** Pause Preview should appear in the 3d viewport * Viewport ** ''check_rendered_viewport_visible'' ** ''view3d_duplicate'': When duplicating a view with an active external engine we should switch to workbench. We should replace the current implementation as it also switched for EEVEE, but only when in Rendered mode. ** ''ED_view3d_calc_render_border'': should also take into account the OB_MATERIAL + external engine. or remove this at all when there are no occurances. ** ''ED_view3d_engine_type'': add test to use external engine in look dev **Viewport Render Image/Animation poll method should check if the render engine is an internal (RE_INTERNAL).** ''ED_view3d_smooth_view_ex'': Skip when external engine is being used. * Sequencer ** ''seq_render_scene_strip'': Add special case for OB_MATERIAL for ''bl_use_eevee_viewport = False'' ** There are more edge cases here as the current implementation does not check the engine capabilities. For example an external render engine could not support Material mode, but still the sequencer strip preview can be set to material mode. We should check the capabilities of the scene engine and force the scene strip renderer to solid mode or rendered mode. * We should add a central utility functions if an external engine is currently used to draw a Viewport or will be used for a certain configuration. Currently this check is decentralized and implemented differently due to history (see Sequencer vs Viewport). There is no location that fits well (due to the dependency with BKE_sequencer, editors/view3d, draw and render library) my proposed location would be in (/source/blender/draw/).
Author
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Jeroen Bakker changed title from Design to Using External Engines As Render for Look Development 2019-07-12 11:05:24 +02:00
Jeroen Bakker self-assigned this 2019-07-12 11:05:24 +02:00
Jeroen Bakker changed title from Using External Engines As Render for Look Development to Using External Engines As Renderer for Look Development 2019-07-12 11:18:40 +02:00
Jeroen Bakker changed title from Using External Engines As Renderer for Look Development to Use External Render Engines for Look Development 2019-07-12 11:22:35 +02:00
Author
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Author
Member

Due to a new proposal EEVEE Preview Shading Mode this task became obsolete. Closing

Due to a new proposal `EEVEE Preview Shading Mode` this task became obsolete. Closing
Sign in to join this conversation.
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
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Overlay
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
Interest
Workbench
Interest: X11
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
No Milestone
No project
No Assignees
1 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#66746
No description provided.