Blender Git Commit Log

Git Commits -> Revision 2bae11d

Revision 2bae11d by Jeroen Bakker (master)
December 4, 2020, 07:14 (GMT)
EEVEE: Arbitrary Output Variables

This patch adds support for AOVs in EEVEE. AOV Outputs can be defined in the
render pass tab and used in shader materials. Both Object and World based
shaders are supported. The AOV can be previewed in the viewport using the
renderpass selector in the shading popover.

AOV names that conflict with other AOVs are automatically corrected. AOV
conflicts with render passes get a warning icon. The reason behind this is that
changing render engines/passes can change the conflict, but you might not notice
it. Changing this automatically would also make the materials incorrect, so best
to leave this to the user.

**Implementation**

The patch adds a copies the AOV structures of Cycles into Blender. The goal is
that the Cycles will use Blenders AOV defintions. In the Blender kernel
(`layer.c`) the logic of these structures are implemented.

The GLSL shader of any GPUMaterial can hold multiple outputs (the main output
and the AOV outputs) based on the renderPassUBO the right output is selected.
This selection uses an hash that encodes the AOV structure. The full AOV needed
to be encoded when actually drawing the material pass as the AOV type changes
the behavior of the AOV. This isn't known yet when the GLSL is compiled.

**Future Developments**

* The AOV definitions in the render layer panel isn't shared with Cycles.
Cycles should be migrated to use the same viewlayer aovs. During a previous
attempt this failed as the AOV validation in cycles and in Blender have
implementation differences what made it crash when an aov name was invalid.
This could be fixed by extending the external render engine API.
* Add support to Cycles to render AOVs in the 3d viewport.
* Use a drop down list for selecting AOVs in the AOV Output node.
* Give user feedback when multiple AOV output nodes with the same AOV name
exists in the same shader.
* Fix viewing single channel images in the image editor [T83314]
* Reduce viewport render time by only render needed draw passes. [T83316]

Reviewed By: Brecht van Lommel, Cl�ment Foucault

Differential Revision: https://developer.blender.org/D7010

Commit Details:

Full Hash: 2bae11d5c08a9095f2c8ec5e465e73ada9840ed1
Parent Commit: 2bd0263
Lines Changed: +1106, -77

2 Added Paths:

/source/blender/blenkernel/intern/layer_test.cc (+177, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_output_aov.glsl (+13, -0) (View)

37 Modified Paths:

/release/scripts/startup/bl_ui/properties_view_layer.py (+44, -6) (Diff)
/release/scripts/startup/nodeitems_builtins.py (+1, -6) (Diff)
/source/blender/blenkernel/BKE_appdir.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_layer.h (+10, -0) (Diff)
/source/blender/blenkernel/CMakeLists.txt (+1, -0) (Diff)
/source/blender/blenkernel/intern/appdir.c (+8, -0) (Diff)
/source/blender/blenkernel/intern/layer.c (+162, -0) (Diff)
/source/blender/blenloader/tests/blendfile_loading_base_test.cc (+1, -1) (Diff)
/source/blender/draw/engines/eevee/eevee_data.c (+3, -0) (Diff)
/source/blender/draw/engines/eevee/eevee_materials.c (+102, -17) (Diff)
/source/blender/draw/engines/eevee/eevee_private.h (+15, -4) (Diff)
/source/blender/draw/engines/eevee/eevee_render.c (+53, -7) (Diff)
/source/blender/draw/engines/eevee/eevee_renderpasses.c (+44, -9) (Diff)
/source/blender/draw/engines/eevee/shaders/renderpass_lib.glsl (+13, -0) (Diff)
/source/blender/draw/engines/eevee/shaders/renderpass_postprocess_frag.glsl (+21, -16) (Diff)
/source/blender/editors/render/render_intern.h (+2, -0) (Diff)
/source/blender/editors/render/render_ops.c (+2, -0) (Diff)
/source/blender/editors/render/render_shading.c (+88, -0) (Diff)
/source/blender/gpu/CMakeLists.txt (+1, -0) (Diff)
/source/blender/gpu/GPU_material.h (+1, -0) (Diff)
/source/blender/gpu/intern/gpu_codegen.c (+34, -3) (Diff)
/source/blender/gpu/intern/gpu_material.c (+8, -0) (Diff)
/source/blender/gpu/intern/gpu_material_library.c (+7, -0) (Diff)
/source/blender/gpu/intern/gpu_node_graph.c (+4, -0) (Diff)
/source/blender/gpu/intern/gpu_node_graph.h (+9, -1) (Diff)
/source/blender/makesdna/DNA_layer_types.h (+28, -1) (Diff)
/source/blender/makesdna/DNA_view3d_types.h (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+4, -0) (Diff)
/source/blender/makesrna/intern/rna_layer.c (+12, -1) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+95, -0) (Diff)
/source/blender/makesrna/intern/rna_space.c (+91, -5) (Diff)
/source/blender/makesrna/RNA_access.h (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_output_aov.c (+19, -0) (Diff)
/source/blender/nodes/shader/node_shader_tree.c (+15, -0) (Diff)
/source/blender/windowmanager/intern/wm_init_exit.c (+1, -0) (Diff)
/source/blender/windowmanager/intern/wm_window.c (+11, -0) (Diff)
/source/blender/windowmanager/WM_api.h (+3, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021