Commit Graph

93572 Commits

Author SHA1 Message Date
Jeroen Bakker
be2bc97eba EEVEE: Render Passes
This patch adds new render passes to EEVEE. These passes include:

* Emission
* Diffuse Light
* Diffuse Color
* Glossy Light
* Glossy Color
* Environment
* Volume Scattering
* Volume Transmission
* Bloom
* Shadow

With these passes it will be possible to use EEVEE effectively for
compositing. During development we kept a close eye on how to get similar
results compared to cycles render passes there are some differences that
are related to how EEVEE works. For EEVEE we combined the passes to
`Diffuse` and `Specular`. There are no transmittance or sss passes anymore.
Cycles will be changed accordingly.

Cycles volume transmittance is added to multiple surface col passes. For
EEVEE we left the volume transmittance as a separate pass.

Known Limitations

* All materials that use alpha blending will not be rendered in the render
  passes. Other transparency modes are supported.
* More GPU memory is required to store the render passes. When rendering
  a HD image with all render passes enabled at max extra 570MB GPU memory is
  required.

Implementation Details

An overview of render passes have been described in
https://wiki.blender.org/wiki/Source/Render/EEVEE/RenderPasses

Future Developments

* In this implementation the materials are re-rendered for Diffuse/Glossy
  and Emission passes. We could use multi target rendering to improve the
  render speed.
* Other passes can be added later
* Don't render material based passes when only requesting AO or Shadow.
* Add more passes to the system. These could include Cryptomatte, AOV's, Vector,
  ObjectID, MaterialID, UV.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D6331
2020-02-21 11:13:43 +01:00
Sergey Sharybin
1f8f4c8cfe Codesign: Make file watcher robust for network errors 2020-02-21 11:00:11 +01:00
Sergey Sharybin
973982a8e5 Cleanup: Spelling in a comment 2020-02-21 10:49:58 +01:00
Sergey Sharybin
20b47d77e1 Codesign: Remove archive with files after they were copied 2020-02-21 09:31:55 +01:00
Germano Cavalcante
b56957f0af Fix transform 'center_override' not being flagged
Problem introduced by rBa33b261473e9
2020-02-20 22:21:21 -03:00
William Reynish
ee7f307c9a Fix T73841: Pressing 3 doesn't go to Pose mode
Just changing the order in the keymap seems to fix this
2020-02-20 22:50:19 +01:00
Ray Molenkamp
a9b184bbc4 windows: Add some more verbose logging to make.bat 2020-02-20 10:34:15 -07:00
Philipp Oeser
282e8499b1 Fix T73871: improve assignement of material to selection in multi object
editmode

This was already supported in "Select" & "Deselect" but not in "Assign".
So similar to rB6b39dc7672eb, we now check if the material corresponding
to the currently selected material slot is found in other objects
materials and assign this (instead of always assigning their 'own'
actcol).

Maniphest Tasks: T73871

Differential Revision: https://developer.blender.org/D6869
2020-02-20 14:02:18 +01:00
Philipp Oeser
d95e9c7cf8 Fix T63892: Tools cannot be registered into some contexts (e.g.
PAINT_TEXTURE)

This fails because some tool contexts define their tools with functions
[see the following list for context that fail]:

- PARTICLE (_defs_particle.generate_from_brushes)
- SCULPT (_defs_sculpt.generate_from_brushes)
- PAINT_TEXTURE (_defs_texture_paint.generate_from_brushes)
- PAINT_VERTEX (_defs_vertex_paint.generate_from_brushes)
- PAINT_WEIGHT (_defs_weight_paint.generate_from_brushes)
- PAINT_GPENCIL (_defs_gpencil_paint.generate_from_brushes)
- SCULPT_GPENCIL (_defs_gpencil_sculpt.generate_from_brushes)
- WEIGHT_GPENCIL (_defs_gpencil_weight.generate_from_brushes)

ToolSelectPanelHelper._tools_flatten() is usually called with
cls.tools_from_context(context) [that already yields from the function].
But when registering a tool, _tools_flatten() will still give back this
function, not a ToolDef - and we cannot get a bl_idname from that.
Now check for this and yield None in that case.

Also share logic across all tool_flatten functions:
- _tools_flatten
- _tools_flatten_with_tool_index
- _tools_flatten_with_keymap

Maniphest Tasks: T63892

Differential Revision: https://developer.blender.org/D6763
2020-02-20 13:28:53 +01:00
Stefan Werner
b4ae962447 Cycles: Switched Embree to use Catmull-Rom curves.
The latest versions of Embree support Catmull-Rom splines
which use less memory than the previously used Hermite splines.
The representation is also much closer to Cycles own data structures
and can hopefully be unified in the future for more memory savings.

Memory savings using Victor benchmark scene:
Compared to previous Embree: ~400MB
Compared to Cycles' native BVH: ~1GB
2020-02-20 13:05:27 +01:00
Bastien Montagne
0d8a8ce03b Fix some issues with versionning of older files.
Consequences of own refactor of usercount handling in readfile.c
(rB367ecff15d74).

Not super happy to have to call that function twice, but that should be
OK (not a real overhead here anyway).
2020-02-20 11:37:03 +01:00
Sergey Sharybin
a2febb8d91 CMake: Suppress strict warnings for extern on macOS
Silences a lot of noise from Mantaflow.
2020-02-20 11:06:40 +01:00
Antonio Vazquez
e2722aec6b Fix ushort compiler errors in Windows
ushort is not supported
2020-02-20 10:28:32 +01:00
Jacques Lucke
0e48bb26af Modifiers: Refactor Mask modifier
The functionality of the mask modifier remains unchanged.

This patch updates the mask modifier so that it uses C++.
The manual memory management has been replaced with proper containers.
The large `applyModifier` function has been splitup into multiple smaller functions.
A large speedup is achieved by using simple arrays instead of hash tables in multiple places.

In my performance test file the playback speed increased from 1.1 to 5.1 fps on my laptop.

Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D6779
2020-02-20 10:05:47 +01:00
Campbell Barton
2a6df7dfe5 Cleanup: use named unsigned types in the Python API 2020-02-20 15:40:05 +11:00
Campbell Barton
1e3ffd1f87 mathutils: support for to_2x2 as well as non-square matrices 2020-02-20 15:17:22 +11:00
Tiago Chaves
bc86eb1780 mathutils: support Vector.rotate for 2D vectors 2020-02-20 13:58:46 +11:00
Tiago Chaves
0115568ca6 BLI_math: add 2x2 matrix utilities 2020-02-20 13:58:46 +11:00
Campbell Barton
e233e492df Cleanup: rename mul_m2v2 to mul_m2_v2
Matches mul_m3_v3
2020-02-20 13:58:46 +11:00
Campbell Barton
71d6fbcd51 Fix missing error message on convex hull failure
Also remove unused errors.
2020-02-20 12:21:05 +11:00
Campbell Barton
146fe1decf Cleanup: remove use of 'register'
This isn't needed with modern compilers.
2020-02-20 12:21:05 +11:00
Campbell Barton
60e877bb78 Cleanup: unused structs 2020-02-20 12:21:01 +11:00
Campbell Barton
5dcb6fb22f Cleanup: unused enums 2020-02-20 12:19:55 +11:00
Campbell Barton
a74f0dc0e3 Cleanup: declatatuons for functions that don't exist 2020-02-20 11:22:14 +11:00
Germano Cavalcante
6f5ef60f1b Fix T65640: Axis of Custom Shape Bones are drawn in a wrong position.
The problem is that Custom Shape Bones can also have a custom size.
So the pchan->disp_mat doesn't always consider the actual length of the bone.
The proposed solution is to calculate the axes matrix at the drawing pass.

Ref T65640

Reviewed By: fclem

Differential Revision: http://developer.blender.org/D5049
2020-02-20 00:53:07 +01:00
Clément Foucault
0c01ad9300 Fix T74019 Eevee High Quality Normals causing pitch black faces
Was due to a mistake when removing previous code...
2020-02-20 00:13:48 +01:00
Clément Foucault
67cbce0b02 DRW: Fix facing reset when drawing with inverted camera 2020-02-20 00:03:26 +01:00
Julian Eisel
03a4d3c33f RNA: Fail makesrna if enum identifiers contain spaces
We could of course always add checks for more invalid characters, but
I'd say they are more unlikely to happen.
2020-02-19 20:45:58 +01:00
Julian Eisel
e37988fa21 Fix compile error when building with Cycles 2020-02-19 20:14:30 +01:00
Clément Foucault
f972a3c314 DRW: Support inverted view matrix
We detect the case where we need to invert the facing directly inside the
DRWView update and do the appropriate GL calls at draw time.

Fix T63047 Camera with negative scale works only in Cycles Rendered view
Fix T71352 Negative scale camera causes BLI_assert
2020-02-19 19:36:48 +01:00
Sebastián Barschkis
bda8076d35 Fluid: Temporary fix for gzopen on windows
Needs more consideration. This fixes compilation for now.
2020-02-19 19:34:23 +01:00
Pablo Dobarro
05fd2acf89 Theme: Radial gradient background and enum for gradient type
This commit replaces the "Use Gradient" checkbox theme option with an
enum and implements a radial background.

Whith this change, it should be easier to implemet other types of more
complex background types, like a world space oriented gradient.

Reviewed By: billreynish, fclem, brecht

Differential Revision: https://developer.blender.org/D6825
2020-02-19 19:12:46 +01:00
Pablo Dobarro
2df040ed58 Fix T54270: Reset last_hit and last_location when reading the file
It does not make sense to read those values when loading a file and they can crash the cursor if they contain invalid coordinates.

Reviewed By: brecht

Maniphest Tasks: T54270

Differential Revision: https://developer.blender.org/D6754
2020-02-19 19:08:08 +01:00
Sebastián Barschkis
888d180164 Fluid: Updated manta pp files
Updates in the files include:
- New manta files now use an platform independent gzopen function
- Adjusted argument name for vorticity
2020-02-19 18:58:48 +01:00
Sebastián Barschkis
04b7f052e1 Fluid: Updated Manta updater script
Minor adjustments for the build directory location.
2020-02-19 18:58:48 +01:00
Dalai Felinto
213b4f76ee Cleanup: make format 2020-02-19 18:44:22 +01:00
Sebastián Barschkis
19f3a93e22 Fluid: More cleanup in fluid rna code
Removed scientific variable names from UI.
2020-02-19 18:42:14 +01:00
Brecht Van Lommel
f0a22f5dd0 Fix T73932: modifying keyframes in nodes fails when there is an image sequence
Image animation should not be an depsgraph node of type ANIMATION, there is
no need for it to be affected by the special casing for that.
2020-02-19 18:13:05 +01:00
Pablo Dobarro
ee5c13c45c Sculpt: Pinch only in the direction perpendicular to the stroke
By pinching this way, we can fix some artifacts when sculpting following
the topology direction. It does not make much difference with dyntopo/
remesher, but I think this should improve the quality of the brush when
working with Multires.

Reviewed By: JulienKaspar, jbakker

Differential Revision: https://developer.blender.org/D6587
2020-02-19 18:08:37 +01:00
Sebastián Barschkis
e77e6ba308 Fluid: Cleanup in fluid rna code
More descriptive names for secondary particle options.
2020-02-19 17:35:15 +01:00
Bastien Montagne
d772c6ea31 Fix T74009: bpy.ops.outliner.orphans_purge() poll being too restrictive.
There is no reason to even require an editor at all here, for now just
kept the 'orphan view needed' condition for the outliner case only.
2020-02-19 17:08:58 +01:00
Bastien Montagne
1c0230b573 Fix for Fix (c) : Normals Edit modifier using unititialized array of normals...
Own mistake in recent rBcfdb5b9a8b07.
2020-02-19 16:35:45 +01:00
Bastien Montagne
e317e9f6c7 Fix T72751: Timeline crash from overridden scene.
Depsgraph RNA pointer would generate infinite loop in override comparisons.

Depsgraph pointer should never be considered here anyway, this is purely
runtime data.
2020-02-19 16:10:57 +01:00
Sebastián Barschkis
8c5e36d0a9 Fluid: Fix typo that was made in 4453509d83dc 2020-02-19 15:33:36 +01:00
Sebastián Barschkis
4453509d83 Fix T73770: Mantaflow is unable to bake fluid simulations on non-ASCII file paths
Some fluid cache functions were not using Blender's more secure BLI_gzopen() function. On Windows there are some special cases which this function can handle compared to the plain gzopen().
2020-02-19 15:07:54 +01:00
Bastien Montagne
367ecff15d readfile: Move ID refcounting to libquery.
Having that extra ID users handling at readfile level, besides generic
one ensured by libquery, has been something bothering me for a long time
(had to fix my share of bugs due to mismatches between those two areas).

Further more, work on undo speedup will require even more complex ID
refcount management if we want to keep it in readfile.c area.

So idea is instead to generalize what we did for linked data already
when undoing: recompute properly usercount numbers after liblink step,
for all IDs.

Note that extra time required here is neglectable in a whole .blend file
reading (few extra milliseconds when loading a full production scene
e.g.).

Notes:
* Some deprecated data (IPOs) are not refcounted at all anymore, this
should not be an issue in pratice since the are supposed to get deleted
after doversion anyway.
* Refcounting happens after `do_versions_after_linking`, i.e those
functions won't get valid ID usercounts currently. Again, this is not a
problem in current code, if needed we could recompute refcount before,
and then ensure `do_versions_after_linoiing()` actually handles properly
usercount, which it does not currently.

Differential Revision: https://developer.blender.org/D6881
2020-02-19 12:56:02 +01:00
Germano Cavalcante
bde215a60c Fix T68878: Update shapekeys during transformation
Only use the hack in `key_block_get_data` for the bmesh shapekey.
The remaining shapekeys can use the original offset values.

Differential Revision: https://developer.blender.org/D6516
2020-02-19 08:54:34 -03:00
Bastien Montagne
cfdb5b9a8b Fix T73941: Custom normals from normal edit modifier ignored by further modifiers.
This commit actually fixes several issues in this modifier, but main one
from the report was caused by adding a `CD_NORMAL` layer to loops to
store temp real clnors. Unless we plan on modifying the topology itself,
this is useless, and would require some additional 'dirty normals'
tagging to work properly, so just switched to simpler, cleaner solution
of having a local array of computed clnors.
2020-02-19 12:28:35 +01:00
Philipp Oeser
65ea5020c4 Fix T73938: Cycles Vertex Color wrong if no layer is specified
The node would render black in this case (but should use the
'active_render' layer choosen in the object data properties -- this is
now in line to how this is handled for e.g. UVs)

This introduces ATTR_STD_VERTEX_COLOR and uses this thoughout, if no
particular layer is specified in the node.

Maniphest Tasks: T73938

Differential Revision: https://developer.blender.org/D6887
2020-02-19 12:10:33 +01:00
Sergey Sharybin
3b01dbdeb1 Subdiv: Clarify Subdiv settings
The actual naming might also be a subject to change, especially the one
around `level`. Tricky part here is that at some point in the API there
will be change from Blender modifier's Quality to OpenSubdiv's Level,
but which API level is most suitable for this?

At least now meaning of settings is better documented ans should be
clear what's going on.
2020-02-19 11:49:32 +01:00