Commit Graph

1020 Commits

Author SHA1 Message Date
Brecht Van Lommel 796683db8e Cycles: add view layer setting to exclude volumes, like hair and surfaces 2020-03-11 11:25:57 +01:00
Antonio Vazquez 29f3af9527 GPencil: Refactor of Draw Engine, Vertex Paint and all internal functions
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes.

Also, a huge code cleanup has been done at all levels.

Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development.

Differential Revision: https://developer.blender.org/D6293
2020-03-09 16:27:24 +01:00
Pablo Dobarro 38d6533f21 Sculpt Face Sets
Face Sets are the new system to control the visibility state of the mesh in sculpt and paint modes. They are designed to work in modes where brushes are the primary way of interaction and they provide much more control when working with meshes with complex shapes and overlapping surfaces.

This initial commit includes:
- Sculpt Face Sets data structures and PBVH rendering.
- Face Set overlay and opacity controls.
- Sculpt Undo support.
- Remesher reprojection support. The visibility state of the mesh is also preserved when remeshing.
- Automasking and Mesh filter support.
- Mask expand operator mode to expand Face Sets (Shift + W) and flood fill areas by connectivity (press Ctrl while expanding).
- Sculpt Mode Face Sets and Visibility API.
- Sculpt Face Sets creation and visibility management operators.
- Operator to randomize the Face Sets colors.
- Draw Face Sets brush tool to create and edit the Face Sets. Drawing on the mesh creates a new Face Set. Pressing Ctrl before drawing modifies the Face Set under the brush at the beginning of the stroke.
- Updated keymap and menu to work with Face Sets from Sculpt Mode (H to toggle visibility, Alt + H to show all, Shit + H to hide).
- Pie menu on the W key with Face common Sets operations.

Know limitations:
- Multires support. The Face Sets and Visibility API needs to be implemented for Multires.

Reviewed By: jbakker, #user_interface, Severin

Differential Revision: https://developer.blender.org/D6070
2020-03-05 21:07:20 +01:00
Campbell Barton 727d430811 Cleanup: move deprecated enum into versioning code 2020-02-25 16:50:06 +11:00
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
Campbell Barton 5dcb6fb22f Cleanup: unused enums 2020-02-20 12:19:55 +11:00
Clément Foucault e82827bf6e DRW: New High Quality Normal & Tangent extract
This patch adds a dedicated path to extract 16bit normals instead of packing them into 10bits/comp.
The tangents are also packed to 10bits/comp if not using the new High Quality Normal option.

Fix T61024 Degraded texture shading on dense meshes

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6614
2020-02-19 01:57:06 +01:00
Campbell Barton f829fefe8a Cleanup: spelling 2020-02-15 15:58:06 +11:00
Campbell Barton fa5837c5e8 Cleanup: remove unused RenderData.displaymode 2020-02-15 15:24:03 +11:00
Lukas Stockner 4af74f453d Freestyle: Add option for rendering Freestyle to a separate pass
This allows for more flexibility in Compositing compared to the
hardcoded alpha-over that is currently used.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6829
2020-02-14 00:33:50 +01:00
Bastien Montagne b841167ee3 Refactor readfile's liblink code.
Liblink specific ID type function was so far running a loop over all IDs
of relevant type, unlike almost any other 'ID-callback-like' functions
in Blender, which usually let the looping controll to calling code.

The latter approach is more convinient when one want to add generic
(i.e. type-agnostic) code, since it typically only has to change code in
one place (caller function) instead of tens of places (all the callback
functions).

This commit also changes/sanitizes a few things that had nothing to do
in main liblink code, like mesh conversion from tessfaces to polys
(which can be done in after-linking versionning code), or scenes' cycles
detection/check regarding background 'set' scenes.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6727
2020-02-05 16:18:17 +01:00
Sergey Sharybin cbbbb9d179 Fix wrong DNA alignment on arm{el,hf} and mipsel
Technically, pointers are to be padded with followup pointer.
2020-01-22 15:34:27 +01:00
Campbell Barton 96ebdbc90f Fix deprecated DNA define checks
Also remove dead code which checked for SPACE_TIME.
2019-12-17 09:49:23 +11:00
Pablo Dobarro 448669a630 Fix T72092: Clay Strips Brush stroke crash with Brush Detail Size
Some other areas in the brush code outside sculpt mode assume that
pressure is multiplied directly on top of the initial size. This patch
calculates the pixel radius correctly using the brush size from sculpt
mode to get the dyntopo detail size.
When the new brush input system is in place, all these values will come
directly from the brush input code with all the custom curves applied
per brush, so all paint modes will have a correct brush behavior and all
this sculpt mode specific code won't be necessary.

Reviewed By: jbakker

Maniphest Tasks: T72092

Differential Revision: https://developer.blender.org/D6339
2019-12-09 16:57:39 +01:00
Campbell Barton 6ffcddc10a Tool System: experimental fallback tool support
Implement T66304 as an experimental option,
available under the preferences "Experimental" section.

- When enabled most tools in the 3D view have a gizmo.
- Dragging outside the gizmo uses the 'fallback' tool.
- The fallback tool can be changed or disabled in the tool options
  or from a pie menu (Alt-W).
2019-12-07 06:03:00 +11:00
Pablo Dobarro 9251b07720 Sculpt/Paint: Remove Unified SIZE_PRESSURE and ALPHA_PRESSURE
The relation between the pressure/size and the pressure/alpha is a
fundamental property that defines the behavior of a brush, so it does
not make sense to have it unified across all brushes. This applies both
for sculpting and painting.

Some of the new 2.82 brushes need pressure/size or pressure/alpha to be
enabled to work propely, while others don't. Users should not be
switching on and off this property manually when changing brushes if they
want to use unified size. This is also causing that some users are using
the brushes with an incorrect configuration.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6291
2019-11-27 17:17:46 +01:00
Jeroen Bakker 7959dcd4f6 RenderViewport: Texture Format
When doing viewport rendering the color management happens on the CPU.
This has overhead in downloading a float texture from the gpu and
performing color management on the CPU.

Based on the scene fileformat bit depth the result will be rendered to
a byte texture where the colormanagement happens on the GPU or a float
texture where the colormanagement happens on the CPU.

This is only done during `Viewport Render Animation` in other
cases a float texture is being used.

Baseline (HD render of wanderer.blend workbench engine no samples) 15.688038 s
After changes: 9.412880s

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6195
2019-11-27 15:54:15 +01:00
Campbell Barton 249f4423ee Cleanup: doxygen comments
Also correct some outdated symbol references,
add missing 'name' commands.
2019-11-25 01:51:11 +11:00
Hans Goudey ba1e9ae473 Bevel: Custom Profile and CurveProfile Widget
Custom profiles in bevel allows the profile curve to be controlled by
manually placed control points. Orientation is regularized along
groups of edges, and the 'pipe case' is updated. This commit includes
many updates to comments and changed variable names as well.

A 'cutoff' vertex mesh method is added to bevel in addition to the
existing grid fill option for replacing vertices.

The UI of the bevel modifier and tool are updated and unified.

Also, a 'CurveProfile' widget is added to BKE for defining the profile
in the interface, which may be useful in other situations.

Many thanks to Howard, my mentor for this GSoC project.

Reviewers: howardt, campbellbarton

Differential Revision: https://developer.blender.org/D5516
2019-11-20 16:25:28 -05:00
mano-wii 44d67b6dc8 Transform: Add option to exclude back facing geometry from snapping
Add new `Backface Culling` option to the snapping properties.
This option has nothing to do with the view3d display or the
workbench `Backface Culling` option.

Limitation:
- In edit mode, this option only affects snap to faces.

Maniphest Tasks: T71217

Differential Revision: https://developer.blender.org/D6155
2019-10-31 14:09:53 -03:00
Campbell Barton 16665ad753 Cleanup: remove unused viewport fx_settings 2019-10-18 19:10:25 +11:00
Dalai Felinto 0812949bbc Local Collections: Allow users to show hidden collections
Users now can turn on in a viewport collections that are temporarily
hidden (eye) in the view layer.

Design task: T61327

As for the implementation, I had to decouple the visibility in the
depsgraph from the visibility in the view layer.

Also there is a "bug" that in a way was there before which is some
operators (e.g., writing a text inside of a text object, tab into edit
mode) run regardless of the visibility of the active object. The bug was
present already (with object type visibility restriction) in 2.80 so if
we decide to tackle it, can be done separately (I have a patch for it
though P1132).

Reviewed by: brecht (thank you)

Differential Revision: D5992
2019-10-08 19:16:05 -03:00
Dalai Felinto 92736a7b75 Per-Viewport Collection Visibility
Support per-viewport collection visibility options.

Note 1: There is no way to show a collection that was not visible before
due to depsgraph. Otherwise we would risk having all the collections in
the depsgraph and I believe this is not the idea.

An alternative would be to have a new depsgraph for viewports that are
not local. Something to keep in mind if we do per-viewport current frame
in the future.

So for now what we do is to only allow collections visibility to be
disabled/hidden in this mode.

Note 2: hide_viewport (the eye icon) doesn't really matter for
depsgraph. So after the merge we can still ignore it to show the
collections locally in a viewport with no problems for the depsgraph.

Reviewers: brecht, sergey
Subscribers: billreynish

Related task: T61327
Differential Revision: https://developer.blender.org/D5611
2019-09-13 12:37:35 -03:00
Antonio Vazquez 0174185e2f GPencil: New Simplify Tint option
This is useful to disable all layers tint in one step and it will be used for future operators.
2019-09-10 17:41:23 +02:00
Campbell Barton 056bb7721e Cleanup: remove unused scene struct members 2019-09-09 22:39:58 +10:00
Charlie Jolly a94bf0e134 GPencil: Guides: Refactor and add new ISO option
+ Simplify code, move into own function and run once rather than on every point
+ Improved snapping when a stroke is between increments
+ Added ISO grid option for lines specified by Angle under guide settings
+ Radial snapping mode uses Angle as an offset

Differential Revision: https://developer.blender.org/D5668
2019-09-06 14:07:26 +01:00
Clément Foucault d8aaf25c23 Eevee: Shadow map refactor
Reviewed By: brecht

Differential Revision: http://developer.blender.org/D5659
2019-09-05 17:37:50 +02:00
Jeroen Bakker fc99297411 Fix T66950: WeightPaint Bone Selection Overlay
In weightpaint it is possible to enable the bone selection mode. During
drawing the overlay was rendered, but during selection this was ignored.
Users needed to double click in order to select bones even when the overlay
was enabled.

This patch makes bone selection possible during weight painting using the pose mode bone
selection overlay with a single click.

Reviewed By: fclem, campbellbarton

Differential Revision: https://developer.blender.org/D5629
2019-09-03 14:09:44 +02:00
Campbell Barton 69a966aca0 Transform: option to transform parent objects without children
Supports parent/child chains with mixed selections.

Currently accessible from the pivot popover
(may be moved along with the other options here).
2019-08-29 01:53:07 +10:00
mano-wii 6b189d2bcf Edit Mesh: New option "Split Edges & Faces" to "AutoMerge"
Ref T66423

Differential revision: https://developer.blender.org/D5562
2019-08-26 14:15:25 -03:00
Campbell Barton 6eadd40597 Cleanup: redundant struct declarations 2019-08-25 16:45:47 +10:00
Campbell Barton acdb14d264 Transform: option to transform origins in object mode
Currently supports mesh, armature, lattice, curve & metaballs.

Access from pivot popover.
2019-08-24 07:34:43 +10:00
mano-wii a244384864 Fix T68969: current value '0' matches no enum in 'ToolSettings', '(null)', 'snap_node_element'
I don't think a versioning solution is necessary in this case.
But it can still be implemented.
2019-08-22 09:10:46 -03:00
mano-wii 75127b6be7 Revert "Fix grid snap value in recent snapping updates"
This reverts commit 48a7f979a5.

Another solution to come.
2019-08-22 09:10:46 -03:00
Campbell Barton 48a7f979a5 Fix grid snap value in recent snapping updates
Increase the size of the snap mode so the flag can be used.
2019-08-21 11:41:40 +10:00
mano-wii daba3e871f Fix conflict with "Edge Center" snap mode
`SCE_SNAP_MODE_GRID` is used for both nodes and objects.
I don't think it's worth versioning in this case.
2019-08-20 19:35:11 -03:00
mano-wii dd08d68df8 Transform: New Snap Option: Edge Perpendicular
Part of T66420

Option for snapping to the nearest point of a reference coordinate.
The patch also adds Edge Center and Perpendicular snaps to the ruler.

{F7675906}

Reviewers: campbellbarton, brecht

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5543
2019-08-20 19:18:50 -03:00
mano-wii 58341242bf Editor Transform: New Snap Option Middle
Part of T66420

Reviewers: campbellbarton, brecht

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5532
2019-08-20 15:07:48 -03:00
Antonioya 85f90ed6fd Fix T68723: GPencil - Split Select mode for Sculpt and Edit mode
Actually, the selection mode is not visible in Sculpt mode when mask is enabled, but still is used.
Also, the mode is shared between Edit mode and Sculpt mode and for meshes the selector is by mode.

This commit splits the select mode in different properties and show the selector in Sculpt mode to define the Select mode. Also, the Select Mask button has been removed and now the Select Mode buttons work equal to Meshes where the select buttons are the mask enable too.

Fixed some old code not valid detected during these changes.

Differential Revision: https://developer.blender.org/D5500
2019-08-17 16:26:46 +02:00
Your Name f08662d3ed Sculpting: Remove Show Diffuse Color Option
This should have been removed in 2.80 as the functionality was removed.
This feature now does not do anything and can be removed.

Differential Revision: https://developer.blender.org/D5411
2019-08-04 11:53:48 -04:00
Campbell Barton 760dbd1cbf Cleanup: misc spelling fixes
T68035 by @luzpaz
2019-08-01 14:02:41 +10:00
Campbell Barton a08fb46700 UI: move edge-tag option from the scene into the operator
This was a very specific option to display in global tool settings.

Now this is exposed in the operator when edge-select mode is enabled.
2019-05-21 11:15:26 +10:00
Howard Trickey 43500671dc Normal UI: Remove normals toolbar and add/muliply menu options.
See T64324 for discussion re improving normal editing ui.
As next step, remove the face_strength tool settings because
menu operator now includes that. Move face_strenth enum to
better place.
Remove normals toolbar panel because only thing left
(normal_vector) can stay hidden for copy/paste.
Remove add vector and multiply vector menu entries as
they are useless without ui method for specifying operand,
and they are very low utility operations anyway.
2019-05-20 08:51:53 -04:00
Jeroen Bakker bc3139d792 Cycles/Eevee: unify depth of field settings for cameras
There is now a checkbox to enable/disable depth of field per camera. For Eevee
this replace the scene level setting. For Cycles there is now only an F-Stop
value, no longer a Radius.

Existing files are converted based on Cycles or Eevee being set in the scene.

Differential Revision: https://developer.blender.org/D4882
2019-05-17 17:59:26 +02:00
Clément Foucault 52669dda80 Eevee: Remove the Volumetric Render checkbox
This is to simplify the usage of Volumetrics.

Now it automatically detect if there is any Volumetric material in the
view and allocate the needed buffer if any.
2019-05-17 13:38:42 +02:00
Clément Foucault b526221315 Eevee: Remove the Subsurface Render checkbox
This is to simplify the usage of SSS.

Now it automatically detect if there is any SSS material in the view and
allocate the needed buffer if any.
2019-05-17 13:38:42 +02:00
Campbell Barton 2c0db07eed DNA: remove unused 'osa' member
Also correct unused flag comment, use doxy cross references.
2019-05-03 12:07:25 +10:00
Jeroen Bakker b52a0c78af Workbench,EEVEE: Viewport Render Samples
- 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.

Reviewers: fclem, brecht

Maniphest Tasks: T60847

Differential Revision: https://developer.blender.org/D4773
2019-05-02 16:19:12 +02:00
Campbell Barton 5b14b56542 Cleanup: typos in comments 2019-05-02 18:25:36 +10:00
Campbell Barton 928becec60 UV Sculpt: improve tool-system integration
In 2.7x UV sculpt was a kind of sub-mode
(a toggle with it's own key-map & drawing code).

Move this to an operator that uses the tool-system,
this simplifies internal logic, especially brush selection
which now matches sculpt and other paint modes.

- Remove toggle used to enable uv sculpt.
- Expose the brush, which was already used but there was no way to
  select different brushes.
- Make UV sculpt use paint paint tool slots
  (using brushes how all other paint mode currently do).
- Move UV Sculpt keymap to the tools keymap.
- Remove Q to toggle UV sculpt mode,
  S/P/G keys to switch tools.
2019-05-01 20:32:38 +10:00