Page MenuHome

Shading Modes: Material and Render Preview
ClosedPublic

Authored by Jeroen Bakker (jbakker) on Aug 28 2019, 12:14 PM.

Details

Summary

This change implements the basics as described in T68312: LookDev & Eevee Preview.

Material Preview

  • LookDev shading mode is renamed to Material Preview. It always uses Eevee as the renderer, and is intended to provide a fast material preview suitable for texture painting, and texture and material setup.

Rendered

  • Rendered shading gains "Use Scene Lights" and "Use Scene World" options similar to current LookDev. These will be enabled by default. When Use Scene World is turned off, HDRIs will be used for lighting instead. These options are available for EEVEE and Cycles.
  • Renderers will be able to customize the shading settings panel and add additional settings.

Known Issues

Currently there seems to be an issue with EEVEE where buffers are not correctly cleared. The issue is not be introduced by this change but makes it more prominent.

Diff Detail

Repository
rB Blender

Event Timeline

Jeroen Bakker (jbakker) retitled this revision from View3D: Material Preview Mode to [WIP] View3D: Material Preview Mode.Aug 28 2019, 12:17 PM
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)
intern/cycles/blender/blender_viewport.h
18

Needs to be renamed to __BLENDER_VIEWPORT_H__

Jeroen Bakker (jbakker) retitled this revision from [WIP] View3D: Material Preview Mode to [WIP] Viewport shading modes: Material Preview Mode + rendered preview.Aug 28 2019, 12:45 PM
Jeroen Bakker (jbakker) retitled this revision from [WIP] Viewport shading modes: Material Preview Mode + rendered preview to [WIP] Shading Modes: Material and Render Preview.Aug 28 2019, 1:17 PM
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)Aug 28 2019, 2:25 PM
Jeroen Bakker (jbakker) retitled this revision from [WIP] Shading Modes: Material and Render Preview to Shading Modes: Material and Render Preview.Aug 28 2019, 2:28 PM
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)
release/scripts/startup/bl_ui/space_view3d.py
5157

Remove to many empty lines

source/blender/editors/space_view3d/view3d_draw.c
1862

We should select the default World HDRI

Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)

Small changes (own review)

Solved DNA deprecation for workbench for the world rotation

intern/cycles/blender/blender_object.cpp
314–316

Slightly more efficient:

if (!motion && object_is_light(b_ob)) {
  if (!show_lights) {
    return NULL;
  }

  ..
}
intern/cycles/blender/blender_viewport.h
30

Define as class to avoid:

intern/cycles/blender/blender_sync.h:40:1: warning: class 'BlenderViewportParameters' was previously declared as a struct
Brecht Van Lommel (brecht) requested changes to this revision.Sep 2 2019, 7:02 PM

In terms of user level interaction, there are two things I'm not sure about:

  • The choice of studio light and its settings are currently decoupled between lookdev and rendered mode. I think most of the time when you're doing lookdev, you actually want those to be in sync. Then you can easily see the preview, and then same thing more accurately under the same lighting. Having to keep these in sync manually would get annoying. I think it would be similar for Eevee once we add more settings to lookdev to reduce preview quality.
  • For the availability of "Scene Lights" and "Scene World" settings in material preview mode, I'm going back and forth on that a bit. It can be useful to preview lighting with Eevee when using Cycles as the render engine. But in general this doesn't work so well, not to the level that you can for materials, and it's not something I want to prioritize for development either. Just the materials is already challenging. If we limit the lighting we can expose a smaller set of Eevee settings when Cycles is the render engine, and make sure those work well. So my opinion here is still to keep that only for rendered as in this patch, and for those would want to use Eevee as a lighting preview there is still the possibility to switch the render engine.

The implementation itself looks good, especially if we can simplify it by not decoupling the studio light settings between the shading modes.

This revision now requires changes to proceed.Sep 2 2019, 7:02 PM
  • combined the settings for material preview and render preview; Actually reverting the DNA changes to keep file compatibility, therefore there is still a field named lookdev_light.
Jeroen Bakker (jbakker) marked 2 inline comments as done.Sep 3 2019, 9:05 AM

IMO the about the use_scene_light and use_scene_world topic is that there are 2 workflows that we need to address

  1. Texturing/Shading: typically done in Material Preview.
  2. Scene Lighting: typically done in Render Preview.

In the later users might still want to switch engines for convenience. With the current setup this is only possible globally (scene setting). By doing so we tend to prioritize towards compartmentalized workflows.
I believe that the combination of EEVEE and Cycles is very strong and give more flexible and creative workflows when we give the possibility to change the render engine per viewport.
That said I also don't know if adding those two check boxes is the right solution at this point and needs more time to evolve.

Clément Foucault (fclem) requested changes to this revision.Sep 3 2019, 1:28 PM

I get a pink world light when doing the following:

  • Start blender with --factory-startup.
  • Switch Render Engine to Cycles.
  • Switch to Rendered Shading mode.

Also maybe the Use Scene Lights & Use Scene World should be enabled by default? Seems to not be the case when opening a file. Missing versionning code?

Otherwise the patch is very minimal (I like that) and I have nothing to say about the implementation.

This revision now requires changes to proceed.Sep 3 2019, 1:28 PM

Updated versioning code

Just a thing, we use "Use Scene Lights" and "Use Scene World" a lot in look&dev.

Implemented HDRI's are not good for many situation, when you are working in just a shader... maybe, but when you are working in a scene having the rendered viewport is not always an option, and Look&Dev helps here, but just if we have the "Use Scene Lights" and "Use Scene World" options.

Please don't remove them.

  • Added settings back to Material Shading menu
  • Enabled eevee viewport settings when cycles is active
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)Sep 4 2019, 3:38 PM
This revision is now accepted and ready to land.Sep 4 2019, 3:54 PM
This revision was automatically updated to reflect the committed changes.