Page MenuHome

Workbench,EEVEE: Viewport Render Samples
ClosedPublic

Authored by Jeroen Bakker (jbakker) on May 1 2019, 9:55 AM.

Details

Summary
  • Add render_aa and viewport_aa sampling setting for workbench. 0 samples means no AA, 1 sample uses FXAA and more samples will use TAA. The viewport gpu_viewport_quality can still limit viewport anti-aliasing method.
  • Use TAA when rendering images. (this used to be CPU based FSAA)
  • Removed R_OSA related settings.

Fix: T60847

When using the view3d -> View -> Viewport Render Animation, Viewport Render Image it now renders quick, but only with a single sample for EEVEE and no AA for workbench. This is because it starts a offscreen render, an offscreen render calls viewport drawing stuff.

When doing Render -> Render Animation, Render Image the draw manager will trigger the render_image of EEVEE and Workbench that does iterate over the samples.

Design question: Is should we connect the offscreen rendering to the image_render part of the draw engines, so it will use the correct settings?

Side note: R_FULL_SAMPLE and V3D_OFSDRAW_USE_FULL_SAMPLE are currently unused and could be removed also. If so, would create a different patch for this as it is not directly related to viewport anti aliasing.

Diff Detail

Repository
rB Blender

Event Timeline

Harbormaster completed remote builds in B3470: Diff 15024.
Jeroen Bakker (jbakker) planned changes to this revision.May 1 2019, 12:24 PM

We need to adapt the draw_scene callbacks of eevee and workbench to do the iteration over its samples if !DRW_state_is_opengl_render

source/blender/blenloader/intern/versioning_280.c
3291

Can just use const int R_OSA = (1 << 0);

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

Workbench AA during viewport rendering

Jeroen Bakker (jbakker) marked an inline comment as done.

Code style

Harbormaster completed remote builds in B3474: Diff 15031.
Jeroen Bakker (jbakker) retitled this revision from Workbench: Anti Aliasing to Workbench,EEVEE: Viewport Render Samples.May 1 2019, 3:19 PM
Brecht Van Lommel (brecht) requested changes to this revision.May 1 2019, 4:33 PM

I think antialiasing for Viewport Render should be set to 0 or 1 by default and for existing .blend files. If users want higher quality playblasts they can change it, but speed is a better default I think.

release/scripts/startup/bl_ui/properties_render.py
561–562

For consistency with Eevee, the labels could just be "Render" and "Viewport".

source/blender/makesrna/intern/rna_scene.c
197

These numbers as labels are not very clear. Can we change them to something like:

  • No Anti-Aliasing
  • Single Pass Anti-Aliasing
  • 5 Samples
  • 8 Samples
  • ...
This revision now requires changes to proceed.May 1 2019, 4:33 PM
release/scripts/startup/bl_ui/properties_render.py
561–562

I didn't like the UI as the header states 'Sampling' but the setting are not.... But I can change it back and so can get some user feedback.

Jeroen Bakker (jbakker) marked 2 inline comments as done.

Code review comments

Minor comment, otherwise looks good.

source/blender/makesrna/intern/rna_scene.c
6594

This label should still contain Anti-Aliasing. Just in the Python UI it can be shortened because of the context in which it is displayed.

Clément Foucault (fclem) requested changes to this revision.May 1 2019, 7:34 PM
Clément Foucault (fclem) added inline comments.
source/blender/draw/engines/eevee/eevee_engine.c
188

scene->eevee.taa_samples can be 0 in which case it may not draw at all.

source/blender/draw/engines/workbench/workbench_private.h
319

aren't we supposed to use BLI_INLINE ?

This revision now requires changes to proceed.May 1 2019, 7:34 PM
Jeroen Bakker (jbakker) marked 2 inline comments as done.May 2 2019, 8:02 AM
Jeroen Bakker (jbakker) marked an inline comment as done.May 2 2019, 8:03 AM
source/blender/draw/engines/eevee/eevee_engine.c
184

I'm not sure about this. This seems arbitrary and opaque to the user. I would just use max_ii(1, scene->eevee.taa_samples) instead.

Jeroen Bakker (jbakker) marked an inline comment as done.May 2 2019, 3:19 PM
This revision is now accepted and ready to land.May 2 2019, 4:14 PM
This revision was automatically updated to reflect the committed changes.