Fix #109968: Allow Warping on Actual Mouse Bounds #113066

Merged
Harley Acheson merged 2 commits from Harley/blender:Fix109968 into blender-v4.0-release 2023-10-09 22:09:13 +02:00
Member

For Color Circle (and Square) and for Walk Navigation, use the actual
region bounds for mouse warping.


I'm still nervous about using Windows API ClipCursor for the wrapping code (#109968) because of its potential for catastrophic result if we fail to undo it for some edge or error case.

@ideasman42 - I've mentioned this issue with the wrapping bounds before, but I have just a bit more evidence.

With current code (in these cases) the wrapping bounds is set from the window's extent, reduced to a quarter, and centered. With this I can recreate the cursor jumping after a fairly short period of time, and it reproduces well. If I increase the region size, by not quartering, the problem goes away. And as I decrease the size it gets steadily worse. More importantly, if I set the wrapping bounds to the actual region bounds (of the color circle) the problem also goes away, and this is smaller than the original quartered region.

So this PR does minimum changes to fix this complaint and still not cause the "mouse escape" issue for Walk Navigation. This just allows both setting and getting the warp bounds, regardless of warp type. And then passes, and uses, the actual bounds for color circle/square and walk.

For Color Circle (and Square) and for Walk Navigation, use the actual region bounds for mouse warping. --- I'm still nervous about using Windows API `ClipCursor` for the wrapping code (#109968) because of its potential for catastrophic result if we fail to undo it for some edge or error case. @ideasman42 - I've mentioned this issue with the wrapping bounds before, but I have just a bit more evidence. With current code (in these cases) the wrapping bounds is set from the window's extent, reduced to a quarter, and centered. With this I can recreate the cursor jumping after a fairly short period of time, and it reproduces well. If I increase the region size, by not quartering, the problem goes away. And as I decrease the size it gets steadily worse. More importantly, if I set the wrapping bounds to the actual region bounds (of the color circle) the problem also goes away, and this is smaller than the original quartered region. So this PR does minimum changes to fix this complaint and still not cause the "mouse escape" issue for Walk Navigation. This just allows both setting and getting the warp bounds, regardless of warp type. And then passes, and uses, the actual bounds for color circle/square and walk.
Harley Acheson added this to the User Interface project 2023-09-29 18:01:03 +02:00
Harley Acheson requested review from Campbell Barton 2023-09-29 18:01:10 +02:00
Author
Member

Hmm... this alters, but does not fix #111666. That report shows dragging on numerical inputs in the Redo panel (only) showing the mouse outside of that area while dragging. This PR shows the mouse cursor too in this case, but constrained within the numerical input. Weird.

Hmm... this alters, but does not fix #111666. That report shows dragging on numerical inputs in the Redo panel (only) showing the mouse outside of that area while dragging. This PR shows the mouse cursor too in this case, but constrained within the numerical input. Weird.
Author
Member

Now fixes #111666 by hiding and restoring the mouse cursor if GHOST_kGrabHide

Now fixes #111666 by hiding and restoring the mouse cursor if GHOST_kGrabHide
Contributor

Still will introduce back #102346
and not only with walk fly navigation, in this video the mouse ends leaving blender on move object

Also I notice some lag editing some inputs

setCursorPosition don't guarantee that the mouse will be placed at the location, that's is the cause that are some strange behavior

Still will introduce back https://projects.blender.org/blender/blender/issues/102346 and not only with walk fly navigation, in this video the mouse ends leaving blender on move object <video src="/attachments/a142282f-9367-42f6-ba44-c21f36920181" title="2023-09-29 13-38-22.mp4" controls></video> Also I notice some lag editing some inputs <video src="/attachments/bf8cba14-8bf3-48ec-8a4c-f60ae6a1053f" title="2023-09-29 13-35-43.mp4" controls></video> `setCursorPosition` don't guarantee that the mouse will be placed at the location, that's is the cause that are some strange behavior
Author
Member

Still will introduce back #102346

I keep trying that and not seeing it ever end the operation

and not only with walk fly navigation, in this video the mouse ends leaving blender on move object

Same here, not seeing this problem yet.

setCursorPosition don't guarantee that the mouse will be placed at the location, that's is the cause that are some strange behavior

If that is the primary cause of issues, I just added ClipCursor setting and clearing around setCursorPosition.

> Still will introduce back https://projects.blender.org/blender/blender/issues/102346 I keep trying that and not seeing it ever end the operation > and not only with walk fly navigation, in this video the mouse ends leaving blender on move object Same here, not seeing this problem yet. > `setCursorPosition` don't guarantee that the mouse will be placed at the location, that's is the cause that are some strange behavior If that is the primary cause of issues, I just added ClipCursor setting and clearing around setCursorPosition.
Contributor

Guillermo: Also I notice some lag editing some inputs

This are more like jumps:
(i made some changes to see the mouse position)

Same here, not seeing this problem yet

Maybe a different dpi mouse setting
And still the mouse can leave

I just added ClipCursor setting and clearing around setCursorPosition.

I believe that setting ClipCursor have same issue with setCursorPosition, the next mouse events could be outdated too.

>Guillermo: Also I notice some lag editing some inputs This are more like jumps: (i made some changes to see the mouse position) <video src="/attachments/ba9a802f-f278-4162-acee-b78867b5f426" title="2023-09-29 15-16-46.mp4" controls></video> > Same here, not seeing this problem yet Maybe a different dpi mouse setting And still the mouse can leave <video src="/attachments/330360d6-0006-43b9-9e74-98dcbdcc5fa1" title="2023-09-29 15-25-22.mp4" controls></video> > I just added ClipCursor setting and clearing around setCursorPosition. I believe that setting `ClipCursor` have same issue with `setCursorPosition`, the next mouse events `could` be outdated too.
Author
Member

@guishe

Hey, I've now ripped out almost all the complexity and workarounds in that processCursorEvent. Now doing the wrapping only when the cursor is outside the bounds. Still not managing to have the color picker screw up or Walk Navigation to end.

@guishe Hey, I've now ripped out almost all the complexity and workarounds in that `processCursorEvent`. Now doing the wrapping only when the cursor is outside the bounds. Still not managing to have the color picker screw up or Walk Navigation to end.
Harley Acheson changed title from WIP: Fix #109968: Use Actual Region When Wrapping Cursor to WIP: Fix #109968: Only Wrap Cursor When Out of Bounds 2023-09-30 01:37:25 +02:00
Author
Member

Probably the most important thing to keep in mind is that the original complaint does not involve cursor warping. At least it shouldn't because the mouse does not leave the color circle for the bad behavior to occur. So you can do the following:

diff --git a/intern/ghost/intern/GHOST_SystemWin32.cc b/intern/ghost/intern/GHOST_SystemWin32.cc
index 4b070ba9101..28ff247e2fb 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cc
+++ b/intern/ghost/intern/GHOST_SystemWin32.cc
@@ -1108,7 +1108,7 @@ GHOST_EventCursor *GHOST_SystemWin32::processCursorEvent(GHOST_WindowWin32 *wind
   }
 
   int32_t x_screen = screen_co[0], y_screen = screen_co[1];
-  if (window->getCursorGrabModeIsWarp()) {
+  if (false && window->getCursorGrabModeIsWarp()) {
     /* WORKAROUND:
      * Sometimes Windows ignores `SetCursorPos()` or `SendInput()` calls or the mouse event is
      * outdated. Identify these cases by checking if the cursor is not yet within bounds. */

The warping is turned off but the original complaint is solved. That is why the current version of this PR doesn't do any cursor warping unless the mouse is outside of the bounds.

Probably the most important thing to keep in mind is that the original complaint does not involve cursor warping. At least it shouldn't because the mouse does not leave the color circle for the bad behavior to occur. So you can do the following: ``` diff --git a/intern/ghost/intern/GHOST_SystemWin32.cc b/intern/ghost/intern/GHOST_SystemWin32.cc index 4b070ba9101..28ff247e2fb 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cc +++ b/intern/ghost/intern/GHOST_SystemWin32.cc @@ -1108,7 +1108,7 @@ GHOST_EventCursor *GHOST_SystemWin32::processCursorEvent(GHOST_WindowWin32 *wind } int32_t x_screen = screen_co[0], y_screen = screen_co[1]; - if (window->getCursorGrabModeIsWarp()) { + if (false && window->getCursorGrabModeIsWarp()) { /* WORKAROUND: * Sometimes Windows ignores `SetCursorPos()` or `SendInput()` calls or the mouse event is * outdated. Identify these cases by checking if the cursor is not yet within bounds. */ ``` The warping is turned off but the original complaint is solved. That is why the current version of this PR doesn't do any cursor warping unless the mouse is outside of the bounds.
Harley Acheson added 315 commits 2023-10-08 22:28:57 +02:00
buildbot/vdev-code-daily-coordinator Build done. Details
ab26ddc455
Revert "Release cycle: Bcon3 for Blender 4.0"
This reverts commit 8c25952886.
buildbot/vdev-code-daily-coordinator Build done. Details
b5f6c00f0a
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
6caa8010d0
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
d98005da5d
Fix #112180: Noise with high detail and lacunarity outputs erratic values
This patch fixes #112180 by aligning the floor fraction function with
the GLSL/SVM ones, through the use of the floor math function.

Pull Request: #112962
buildbot/vdev-code-daily-coordinator Build done. Details
f217380128
Realtime Compositor: Use Int2 images in JFA algorithm
This patch changes the image type used in the Jump Flooding Algorithm to
be Int2 instead of Float4. That's because we used to store the distance
along with the texel location, which we no longer do, so we are left
with the 2D texel location only which can be stored in an Int2 image.

We no longer store the distance because it is not necessarily needed, it
introduces a sqrt in each of the JFA passes, and it is less precise due
to storage in 16F images. Developers should compute the distance in the
user shader instead.

This is a non-functional change, but results in less memory usage,
higher performance, and higher precision.

Pull Request: #112941
buildbot/vdev-code-daily-coordinator Build done. Details
77e60a4eb6
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
a0b1d31e59
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
2286b77730
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
b373eb6024
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
2da37d3b76
Merge branch 'main' into blender-v4.0-release
a3698d0577 Cleanup: Move sculpt mask update to a separate function
There's no reason to use a general "update vertex data" function,
that just confuses things.
406de58674 Fix #112817: Nodes incorrectly "fully masked" after expand face sets
The expand operator reused `SCULPT_UPDATE_MASK` even when it
changed face sets, not the mask. That triggered incorrect behavior in
`node_update_mask_redraw` when there was no mask layer, which caused
nodes to be incorrectly marked as fully masked (and therefore optimized
out of later operations).
buildbot/vdev-code-daily-coordinator Build done. Details
a493c72d88
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
f03a015049
Merge branch 'blender-v4.0-release'
9e5cf73b4d Cleanup: Make PBVH iter mask not a pointer
After 97f2b01ea9, the iterator's mask data is just read only,
so there's no point in storing it as a pointer. This simplifies the code
using the mask data, since the default only needs to be handled once.
buildbot/vdev-code-daily-coordinator Build done. Details
afaa30b1eb
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
14c233d788
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
8edd706cde
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
cfc4dc2379
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
a34d53cf6f
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
ca9c6372c9
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
8b6b71a47f
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
e5a33b3b2c
Vulkan: Rework Initializing/Allocating Textures
When initialy adding textures it wasn't possible to allocate during
initialization as its usage wasn't known. Bot Metal and Vulkan would do
a delayed allocation adding more checks when using textures.

Recently the behavior of setting texture usage was changed and now is
known when initializing textures. This PR makes advantage of this to
give correct feedback to the calling code if the texture can be created
and remove all the delayed allocating of textures.

Pull Request: #112997
buildbot/vdev-code-daily-coordinator Build done. Details
ad93324580
Vulkan: Add support for Framebuffer Depth Blit
This PR adds support for `GPU_framebuffer_blit` When used with `GPU_DEPTH_BIT`.
The challenge with is that not all GPUs support using a depth texture as a blit destination.

An AMD GPU doesn't support a depth buffer with stencil buffer as blit destination.
![image](/attachments/130e7e38-2dbc-4653-950c-2234bd5bad52)
> NOTE: AMD GPUs don't support 24 bit unsigned normalized depth textures at all.

In all cases when we use depth blitting we are blitting the whole texture
and in stead we can use a texture copy.

A negative effect is that we need to unbind the framebuffer when copying
depth textures, but a positive effect is that we can use a data transfer function what should
theoretically be faster.

This should be revisited when we are investigating in areas to improve the
performance of the Vulkan backend.

Pull Request: #112674
buildbot/vdev-code-daily-coordinator Build done. Details
035209fb8f
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
9fcc8de68f
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
e64db67fa5
GPU: Add platform parameter for GPU architecture
Authored by Apple: Michael Parkin-White

Pull Request: #112566
buildbot/vdev-code-daily-coordinator Build done. Details
446ff8a321
Merge branch 'blender-v4.0-release'
5024c0ef97 Refactor: Move NLA anim bake paremeters into dataclass
The `bake_action` (and subsequent methods) for NLA action baking have a long parameter lists. Refactoring to move the bake options into a data class.

Pull Request: #112865
buildbot/vdev-code-daily-coordinator Build done. Details
8d556733b3
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
df63825cee
Merge branch 'blender-v4.0-release'
d33eb78de3 3D View: Do not recalculate the depth buffer for 'Auto Depth'
This is a solution to avoid redrawing the depth buffer for each Zoom
with `Auto Depth`.

The solution is to move the `ED_view3d_depth_override` function out of
`ED_view3d_autodist`.

`ED_view3d_depth_override` is now only called for navigation operations
if it does not meet the following condition:

```
    bool has_depth_buffer = !(v3d->flag2 & V3D_HIDE_OVERLAYS) ||
                            ELEM(v3d->shading.type, OB_SOLID, OB_MATERIAL) ||
                            XRAY_FLAG_ENABLED(v3d) ||
                            v3d->shading.type == OB_RENDER &&
                                (strcmp(DEG_get_evaluated_scene(depsgraph)->r.engine,
                                        RE_engine_id_BLENDER_EEVEE) == 0 ||
                                 strcmp(DEG_get_evaluated_scene(depsgraph)->r.engine,
                                        RE_engine_id_BLENDER_WORKBENCH) == 0);
```
buildbot/vdev-code-daily-coordinator Build done. Details
b5599fed3d
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
7dafe2e6e5
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
3111ac4e96
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
5406a4095b
Merge branch 'blender-v4.0-release'
4618912ba6 Fix mouse cursor failing to update for blocking actions on Wayland
Changes to the mouse cursor would only display when the main loop
was being handled, so blocking actions such as file load wouldn't
refresh the cursor.

Solve by flushing the display when the cursor changes.
buildbot/vdev-code-daily-coordinator Build done. Details
19fd4a51a9
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
42bd9cd1e6
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
0afdd5c248
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
f97a56eedd
Vulkan: Fix Blitting Extents
During Blitting it is not allowed to read/write outside
the texture bounds. This patch ensures that the bounds
(called extents in Vulkan) are inside the expected range.

Pull Request: #113050
buildbot/vdev-code-daily-coordinator Build done. Details
9e25ac676b
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
dd5b870d15
Anim: Add channel type options to the Bake Action operator
Currently, we're limited to the type of Bake Data, without any control over the channels that get baked.

With this change, the user now has a fine degree of control as to which types of f-curve data will be written to the baked action (i.e., location, rotation, scale & b-bone channels).

Co-author  @cmbasnett

Pull Request: #111997
buildbot/vdev-code-daily-coordinator Build done. Details
7340bdaa92
Merge branch 'blender-v4.0-release'
6c14764f32 Fix #112933: Fix codegen issue on MSVC 17.7
MSVC 17.7 generates bad code in some lambda's, this has been reported
upstream [1], and a workaround has been suggested by MS in the form of
turning the inliner off. In consultation with the geo nodes people this
was deemed a passable solution, there was only a single call to this
method so performance wasn't a concern, so no special care had to be
taken to single out just the problematic MSVC versions.

If this bug pops up in other parts of our code where performance IS a
concern a more delicate approach may be required.

[1] https://developercommunity.visualstudio.com/t/10448291

Pull Request: #112616
1c9d7d5267 Fix reported build failure due to missing ostream include
On FreeBSD 13 / clang 15 the missing include apparently does not
get included indirectly, see
#111063 (comment)
buildbot/vdev-code-daily-coordinator Build done. Details
9cbcff97f9
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
73471b4e52
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
c26efccf61
Use bool for each condition
buildbot/vdev-code-daily-coordinator Build done. Details
90ec11b823
Revert "3D View: Do not recalculate the depth buffer for 'Auto Depth'"
This reverts commit d33eb78de3 and c26efccf61

They came in without a review.
buildbot/vdev-code-daily-coordinator Build done. Details
08aa71bfc9
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
63e1d06233
Geometry Nodes: add utility for debug randomization of instances
Also see cc7da09c1b.
buildbot/vdev-code-daily-coordinator Build done. Details
ad50ded7b5
Metal: Fix texture atomic wrapper
GLSL imageAtomic operations operate on single components.
buildbot/vdev-code-daily-coordinator Build done. Details
995aa08c79
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
6f9fb776de
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
4a4b1482cd
GL: Add subpass input emulation
This adds basic emulation of the subpass input feature
of vulkan and to a lower extend Raster Order Group on Metal.

This help test paths that might use this feature in the future
(like shadow rendering) on all platform and or simplify higher
level code for supporting older hardware.

This add clear description to the load/store ops and to the
new `GPUAttachementState`.

The OpenGL backend will correctly mask un-writable
attachments and will bind as texture readable attachments.

Even if possible by the vulkan standard, the GPU API prohibit
the read and write to the same attachment inside the same
subpass.

In the GL backend, this is implemented using `glTextureBarrier`
and `texelFetch` as it is described in the ARB_texture_barrier
extension.
https://registry.khronos.org/OpenGL/extensions/ARB/ARB_texture_barrier.txt

Pull Request: #112051
f30280a1d1 Cleanup: Make format
Formatting changes resulting from Make Format.
9c6e3c80c7 GL: Fix depth clearing with `clear_attachment`
The depth write mask was no always set to true.
8b7bbee14f GL: Add support for loadop
This just do a clear in place for the clear load op.
At least it allows for same result accross backend as
the other op types are only here for performance.
8fe0ffed4e GL: Subpass transition fix with GPU_ATTACHEMENT_IGNORE
GPU_ATTACHEMENT_IGNORE should work on slots that
contain no attachments.
buildbot/vdev-code-daily-coordinator Build done. Details
eda7926834
DRW: Add SubPassTransition pass command
buildbot/vdev-code-daily-coordinator Build done. Details
8a2e81b16b
UI: Anchor Right When Double-Clicking Last Word
In UI text inputs, when double-clicking to select words, anchor (set
initial selection position) to the right if on the last word. This
aids in some combined double-click-drag operations.

Pull Request: #113125
buildbot/vdev-code-daily-coordinator Build done. Details
690a3ddf7e
RNA: support passing template arguments to functions
The goal is to allow passing template parameters in the string that is passed
to `RNA_def_function` in rna code. This can reduce redundancy (e.g. when used
together with #113114). Only "simple" template parameters are supported,
i.e. only ones that do not contain a nested `,`.

Function names passed to e.g. `RNA_def_property_pointer_funcs` and
`RNA_def_property_update` happen to support this already without further changes.

Pull Request: #113121
buildbot/vdev-code-daily-coordinator Build done. Details
3961c49930
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
4c37a962e3
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
5573568c12
Cleanup: Make format
buildbot/vdev-code-daily-coordinator Build done. Details
87cc5c1f36
Merge branch 'blender-v4.0-release'
732bfba6b8 Cleanup: Strict compiler arning
Unused function argument in the Metal framebuffer.
buildbot/vdev-code-daily-coordinator Build done. Details
2be3e7c16a
Cleanup: Suppress strict compiler warning for external code
The new Clang which came with XCode 15 introduced the new
warning: -Wsingle-bit-bitfield-constant-conversion. It is a bit
too noisy in the Bullet code.

Since the warning is in the code which we do not maintain suppress
it similar to other similar warnings.

Pull Request: #113136
buildbot/vdev-code-daily-coordinator Build done. Details
7f7e1ab088
GL: Remove Apple platform specific workarounds
We don't ship with OpenGL anymore on Mac platform.
The build option is not even available anymore.

This removes any reference to Apple or Mac in the
Opengl module.

Note that I left the depth_blitting_workaround
even if it originaly meant for Mac because it
might be still useful for other hardware.

Pull Request: #113126
buildbot/vdev-code-daily-coordinator Build done. Details
783058ed6d
RNA: don't generate declarations for templated functions
This reverts 690a3ddf7e and makes it so that we don't even try
to generate the correct declaration for templated functions instead.
The reason for generating these declarations was to detect errors
when calling functions with the wrong signature. However, we still
get compile time errors when trying to call the function with wrong
parameters.

This helps simplifying the code in #113114 even more.
buildbot/vdev-code-daily-coordinator Build done. Details
22bd62c8e0
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
a21112d7d8
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
641dff8bf4
EEVEE-Next: Fix DupliObject ObjectKey
`DRW_drawdata_get` reuses the same `DrawData` for all duplis,
so they all end up using the same `ObjectHandle` and `ObjectKey`,
which breaks motion vectors.

* Don't use `DRW_drawdata_get`.
* Simplify `ObjectKey`.

This also solves the issue of objects created "on the fly" always having
the `ID_RECALC_ALL` flag.

Pull Request: #112544
d0b4f4f334 UI: Add descriptions to a few geometry nodes
Some geometry nodes were missing descriptions.

Pull Request: #113164
buildbot/vdev-code-daily-coordinator Build done. Details
287bcb1b29
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
606235a1cb
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
d1fa616a29
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
de6f96df3a
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
c7d9e7be81
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
c435f4a4d5
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
77057e90c9
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
9c018def3e
Cleanup: spelling in comments
buildbot/vdev-code-daily-coordinator Build done. Details
1e50b54ff2
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
ee92151c3a
Overlay-Next: Fix Copy Uninitialized Texture
Overlay engine is currently responsible to initialize the framebuffers
depth_in_front texture. This is a hack and hasn't been ported to
Overlay-Next (yet). This PR skips copying the depth_in_front texture
when it isn't initialized yet.

Issue detected when working on Vulkan backend due its more
strictness.

Pull Request: #113188
buildbot/vdev-code-daily-coordinator Build done. Details
818ae7b149
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
e9625b10ab
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
ecb7562c74
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
10ce3988e2
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
fb38327e6a
Geometry Nodes: refactor how side effect nodes are set up
Previously, the geometry nodes modifier was converting the
viewer path to a compute context at the same time as it was
setting up side effect nodes for the geometry nodes evaluation.

Now, this is changed to be a two step process. First, the viewer
path is converted to the corresponding compute context.
Afterwards, a separate function sets side effect nodes up so
that the given node in the given compute context will be evaluated.

This has three main benefits:
* More obvious separation of concerns.
* Can reuse the code that maps a viewer path element to a compute
  context already.
* With gizmo nodes (#112677), it may become necessary to add side
  effect nodes  based on a compute context, but without having a
  corresponding viewer path.
23e4cbc86a EEVEE-Next: Split curve attributes to their own interface
This avoid poluting shader interfaces which might not be
optimized by the compilers.
1b1b1a19bf EEVEE-Next: Add world clip plane support
This add a way to use a software clip plane in the
prepass shader (surf_depth_frag.glsl).

The benefit of using this instead of gl_ClipDistance
is that the rasterization pattern is given to match.
Which means that only the prepass shader have to use
this.

This is slow and should only be enabled when needed.
buildbot/vdev-code-daily-coordinator Build done. Details
a2da71d3a9
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
2c7dc402d3
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
a6376ec77a
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
e1a868df1d
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
660d8de7e4
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
5ae917ffe9
Fix GHOST_SystemWayland::disposeContext assuming an EGL context
Only destroy the EGL window for OpenGL contexts.
buildbot/vdev-code-daily-coordinator Build done. Details
b469d9dd7d
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
2e732328a8
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
ddad645157
Fix use after free error in recent check for EGL context
Correct error in [0].

[0]: 5ae917ffe9
buildbot/vdev-code-daily-coordinator Build done. Details
0b302d2139
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
75c947a467
Compositor: Use RBF Interpolation in Keying Screen node
This patch changes the interpolation algorithm utilized by the Keying
Screen node to a Gaussian Radial Basis Function Interpolation. This is
proposed because the current Voronoi triangulation based interpolation
has the following properties:

- Not temporally stable since the triangulation can abruptly change as
  tracking markers change position.
- Not smooth in the mathematical sense, which is also readily visible in
  the artists sense.
- Computationally expensive due to the triangulation and naive
  rasterization algorithm.

On the other hand, the RBF interpolation method is temporally stable and
continuous, smooth and infinitely differentiable, and relatively simple
to compute assuming low number of markers, which is typically the case
for keying screen objects.

This breaks backward compatibility, but the keying screen is only used
as a secondary input for keying in typical compositor setups, so one
should expect minimal difference in outputs.

Pull Request: #112480
buildbot/vdev-code-daily-coordinator Build done. Details
17bdf18397
Realtime Compositor: Implement Keying Screen node
This patch implements the Keying Screen node for the Realtime
Compositor. Draw data was introduced to the Movie Clip ID to allow
caching of the keying screen.

Pull Request: #113055
buildbot/vdev-code-daily-coordinator Build done. Details
012289b1e7
Geometry Nodes: deduplicate code to deal with dynamic socket amounts
The goal of this refactor is to reduce the amount of boilerplate code that is
necessary to have a dynamic number of sockets on nodes. This is achieved
by making the code more reusable. Currently, only the simulation and repeat
zone nodes make use of this. However, even with just those two, the amount
of code is reduced already. The benefit of this refactor will become even more
significant as more nodes support a dynamic number of sockets. For example,
the bake node and for-each zone will also benefit from this.

We could probably make some of the utility functions non-templates using type
erasure. This could reduce the compilation overhead when the number of nodes
with item arrays increases. The main reason for why everything is templated
now is that it made this refactor easier. Without this patch, all the code was
essentially "manually templated". So the implementations look still similar to
before now, just that concrete types are replaced with template parameters.

No user-visible changes are expected.

Pull Request: #113114
buildbot/vdev-code-daily-coordinator Build done. Details
32cb2b2334
Cleanup: avoid having to pass in a statically allocated variable
It's easy to forget that this variable has to be static for correctness,
so better allocate it in the function directly instead everywhere where
it is called.
buildbot/vdev-code-daily-coordinator Build done. Details
eeb77f3d51
Cleanup: deduplicate more socket items code
This is a continuation of 012289b1e7.
buildbot/vdev-code-daily-coordinator Build done. Details
4ad4690d0a
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
17816d18ca
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
9d229aee19
Math: Add `from_up_axis` matrix creation function
This add the possibility to create a
orthogonal basis around a given unit
vector.

The name was chosen to match the naming
convention already in place and match
the other matrix construction functions.
In other places (ex: renderers), this same
function is commonly named `make_orthonormal`
or `make_basis`.

The function is not given to have a fixed
implementation and might change overtime.
That's why the test only covers the
assumptions and not the raw values.

The implementation is borrowed from
Cycles and adapted to our math API.

Pull Request: #113218
buildbot/vdev-code-daily-coordinator Build done. Details
43d7abc31a
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
159979a585
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
d7a21d0199
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
5daefe30e7
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
0a12c5101b
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
544ef3baad
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
3bbd4294d9
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
a03b1e5df5
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
bd6b7088bf
Fix #112978: MacOS no longer has a path associated with the window
The problem was introduced in 636f3697ee

MacOS has a different way of handling the title.

In this OS the directory is searched and taken from the title string
which is then formatted.

This limits the title format and makes it prone to errors.

This commit makes the code more generic by splitting each component of
the title beforehand and allowing the associated directory to be informed
with `GHOST_SetTitle`.

Pull Request: #113227
buildbot/vdev-code-daily-coordinator Build done. Details
ed7b7c2cde
Merge branch 'blender-v4.0-release'
f5b71e5152 Cleanup: rename Global "lib" & "ima" for clarity
Rename members to make it clear they're for the last used file-paths:

- ima -> filepath_last_image
- lib -> filepath_last_library
de89decd77 Cleanup: include argument names in callbacks
While not essential it gives a hint to the naming conventions for
function arguments.
buildbot/vdev-code-daily-coordinator Build done. Details
04d4f73585
Cleanup: quiet unused variable warning for CMake
buildbot/vdev-code-daily-coordinator Build done. Details
ad1f146735
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
355a30c106
Custom Properties: Add extra subtypes for float array
Add most remaining float subtypes for arrays in the custom property
edit operator.

Pull Request: #112583
3d1da2532b EEVEE-Next: Fix Crash With Exact 128 Resources
When the scene has exact 128 resources or a multiple in the scene
Blender crashes as the velocity buffer doesn't allocates the
right amount of space inside its buffer.

Pull Request: #113277
buildbot/vdev-code-daily-coordinator Build done. Details
f1c0ec3c4b
EEVEE-Next: Remove Unused Resources in Probe Capture Pipeline
The probe capture pipeline still had some bindings from the previous
implementation. This could result in overwriting the `gbuf_header_tx`
with the incorrect texture as it was sharing the same binding.

This PR removes the unused light probe bindings.

Pull Request: #113276
buildbot/vdev-code-daily-coordinator Build done. Details
355f457cd4
EEVEE-Next: Fix Reflection Probes Sampling
When the scene has reflection probes the sampling would be reset
each frame making the viewport always redraw and not resolve.

The reason was a logic error that was introduced when we introduced
a less flickering update for reflection probes.

Pull Request: #113281
buildbot/vdev-code-daily-coordinator Build done. Details
8860dc9910
Fix: GPU compositor always returns first view
The experimental GPU compositor always returned the first view in
multi-view rendering. This patch fixes that by also checking for the
view name of the context when searching for the appropriate pass.
6e18bb4e3e Vulkan: Make Maintenance4 Extension Optional
`VK_KHR_maintenance4` extension is core in Vulkan 1.3. As Blender
should support Vulkan 1.2 we should not enable this extension when
it isn't available.This fixes issue to run Vulkan backend on some
platforms (Intel Iris Plus).

Maintenance4 is used to relax the interface matching rules to allow
a larger output vector to match with a smaller input vector, with
additional values being discarded.

When Maintenance4 isn't enabled a few shaders might run a tiny bit
slower as it triggers a performance notice. Users won't notice the
performance slowdown.

Pull Request: #113239
buildbot/vdev-code-daily-coordinator Build done. Details
a609af06f9
Cleanup: Clarify the use of DrawDataList
buildbot/vdev-code-daily-coordinator Build done. Details
6aba08288b
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
361d4abbfc
Merge branch 'blender-v4.0-release'
b4de568cc4 EEVEE-Next: Tests support
Enable tests for EEVEE Next.

As a workaround for allowing the use of EEVEE Next (still an
experimental feature) with `--factory-startup`, `arg_handle_engine_set`
enables the feature when `-E BLENDER_EEVEE_NEXT` is used.
In addition, EEVEE Next is always registered, so it's available when
calling `WM_init`.
If it's actually disabled, it will be immediately unregistered after that.

Notes:
- `get_gpu_device_type` always fails with error:
  > GPU API is not available in background mode
- Setup and tests are the same as EEVEE. There are many tests that
  only make sense for Cycles, and many EEVEE Next features that are
  not actually tested.

Pull Request: #112161
buildbot/vdev-code-daily-coordinator Build done. Details
acde11f159
Cleanup: wmJobs: Use defined `startjob` callback type everywhere.
For some reasons, `WM_jobs_stop` and `WM_jobs_kill` would use their own
'type' of function pointer - and not even a matching one!

Among (many) other reasons why this was bad, it required very stupid
casting from code using these functions - and made editing wmJob `startjob`
signature needlessly complicated.
buildbot/vdev-code-daily-coordinator Build done. Details
57a3ab29cc
Metal: EEVEE Next: Optimize Virtual shadow maps for Apple Silicon
Optimization of EEVEE Next's Virtual Shadow Maps for TBDRs.
The core of these optimizations lie in eliminating use of
atomic shadow atlas writes and instead utilise tile memory to
perform depth accumulation as a secondary pass once all
geometry updates for a given shadow view have been updated.

This also allows use of fast on-tile depth testing/sorting, reducing
overdraw and redundant fragment operations, while also allowing
for tile indirection calculations to be offloaded into the vertex
shader to increase fragment storage efficiency and throughput.

Authored by Apple: Michael Parkin-White

Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com>
Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: #111283
buildbot/vdev-code-daily-coordinator Build done. Details
40f93532bb
Fix: EEVEE-Next: Irradiance Grid baking
Regression caused by e2cef1c713
buildbot/vdev-code-daily-coordinator Build done. Details
9e8ded92e5
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
1849e192fa
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
c68f568eb3
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
7d908ed091
Merge branch 'blender-v4.0-release'
d47ceb53f8 Cleanup: Replace usage of old BLI_array macros with C++ types
This replaces the older dynamic c arrays with blender::Vector as
appropriate. Many files required minimal changes and the before/after
are quite similar.

There's 3 remaining usages of the old machinery but those will require
more involved changes and design.

See #103343

Pull Request: #110981
buildbot/vdev-code-daily-coordinator Build done. Details
9a5f5ca6a9
Cleanup: make format
buildbot/vdev-code-daily-coordinator Build done. Details
ade74a6584
Merge branch 'blender-v4.0-release'
2b77cd726d Cleanup: wrap definitions across multiple lines, add struct identifiers
When units were initially defined having each on their own line was
compact, since them more fields have been added, making the lines
overly long and the difference between each field non-obvious.

Further, the conversion from C to C++ [0], wrapped definitions onto the
same line (for some reason), resulting in lines over 700 wide.

Use clang-format & add struct ID's for clarity.

[0]: 129f78eee7
buildbot/vdev-code-daily-coordinator Build done. Details
bd66e2e662
Cleanup: use defines for superscript numbers in unit.cc
buildbot/vdev-code-daily-coordinator Build done. Details
31dce9d11d
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
4a94e17156
Cleanup: Remove unused attribute in GLShaderInterface
buildbot/vdev-code-daily-coordinator Build done. Details
a110873f52
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
6b2f9dd71d
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
273af6855a
CMake: cache the HAVE_BROTLI result
Avoid detecting HAVE_BROTLI every time CMake runs,
only re-detect if the freetype includes change.
buildbot/vdev-code-daily-coordinator Build done. Details
8735103b8e
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
7e87435cf4
GPv3: Initial drawing tool
This PR implements an initial drawing tool that can already be used for testing.
While this is not fully feature complete (compared to the current grease pencil draw tool) the following is already implemented:

* Pressure support for radius and opacity.
* Material color and vertex color support.
* New active smoothing algorithm based on curve fitting.
* Simplify algorithm as a post-process step.

Some deliberate limitations include:
* The drawing plane is always the front plane. Drawing on surfaces is also not supported.
*

The current approach has not been optimized for performance yet. The goal was to have a straightforward implementation
first and then focus on performance later.

There are numerous parameters in the code that are hard-coded for now. These should be exposed at some point, potentially as user settings.

Pull Request: #110093
buildbot/vdev-code-daily-coordinator Build done. Details
97b831df8e
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
d26a2b09bc
Cycles: oneAPI: use hardware cos
Speckles and missing lights were experienced in scenes with Nishita Sky
Texture and a Sun Size smaller than 1.5°, such as in Lone Monk and Attic
scenes.
We previously worked around these by using a more precise
software implementation of cosine.
After recent changes in Cycles, it turns out this workaround isn't
currently needed.
buildbot/vdev-code-daily-coordinator Build done. Details
ac4fa638c1
Merge branch 'blender-v4.0-release'
1885116a9a Fix: Noisy false-positive assert in dyntopo sculpt
This assert triggers whenever dyntopo is used, even when all the
objects and environment is pristine. The semantic of the assert
is not very clear either.

Avoid having a false-positive trigger which gets in the way of any
development in the area.
2a7e06b98d Sculpt: Add vertex interpolation for the dynamic topology
This change makes it so the newly added vertices have properly
interpolated attributes. This includes things like vertex colors.
New vertices are created by splitting edges, so the interpolation
mixes between the edge's two vertices equally.

Co-Authored-By: Hans Goudey <hans@blender.org>
491bd7fff0 Cleanup: Remove redundant mask interpolation in dyntopo
Since the recently added support for vertex interpolation the
manual mask interpolation is not needed anymore.
73e345f85f Sculpt: Draw color attribute during dynamic topology sculpting
Previously the colors were just uploaded as white, the default value.
Even if they aren't interpolated properly, it is still helpful to see
the colors. At worst, the unaffected parts of the mesh will still look
right.

A previous commit made vertex colors interpolate properly, but
face corner colors will still reset to their default value.

As a reminder, only color and byte color attributes are currently
supported for the specialized PBVH drawing.

Pull Request: #113333
44882ceb7b EEVEE-Next: Several Fixes Reflection Probes Workflow
This fixes several issues related to using reflection probes in EEVEE-Next.

- When using a single sample, the reflection probes weren't always updated.
- Composite world background in reflection probes
- Removing reflection probes wasn't working
- Update UBO when world and reflection probes are active in the scene.

Pull Request: #113347
buildbot/vdev-code-daily-coordinator Build done. Details
9a654c04de
Vulkan: Wayland Windowing
Wayland WSI would crash the system when used. The reason is that the
wayland vulkan WSI doesn't provide windowing support. Vulkan gets full access
to the desktop of the OS and it is the responsibilty of the application to
do the right thing.

For OpenGL Wayland proved basic windowing support using `wayland-egl.h`.
Which essentially is a tiny wrapper that keeps track of the window position and
size.

This PR changes a few things to make the Wayland surface usable:

- Do not load debug extensions when blender isn't started with
  `--debug-gpu`.
- Recreate swapchain images when surface size changes.

Pull Request: #113007
1aca58cf16 Vulkan: Enable as Experimental Option
This PR enables vulkan backend as experimental option.
It will only be available in alpha builds on Linux and Windows.

This option is highly experimental and enabled to get some insight
on supported platforms. Don't expect a fully working Blender
yet. Also don't expect it to have usable performance.

**What is known to not work?**

* OCIO textures are not supported on Intel and AMD GPUs. sRGB/Standard is supported
  on those platforms.
* AMD Polaris based GPUs on Linux will generate a crash when drawing the 3d cursor as it
  doesn't support the needed vertex format. Comment out `DRW_draw_cursor` in `DRW_draw_region_info`.
* The colors in the node editor and sequencer are of as sRGB viewports aren't detected correctly.
* The image / UV editor isn't working as many texture formats haven't been tested yet. Some
  tweaks are also needed to do correct depth testing.
* 3D Viewport is known to be flickering. Sometimes workbench doesn't display anything.
* 3D Viewport wireframe will crash as it uses a framebuffer with gaps between color attachments,
  which isn't supported yet. (#113141)
* Rotate the view widget is partially drawn due to incompatible depth clipping.
* GPU Selection isn't working. It is expected to be solved when Overlay-Next will become the
  default engine. For now disable GPU depth picking in the preferences.
* Cycles/EEVEE are known to not work with Vulkan yet. Cycles requires Vulkan Pixel Buffer.
   Cuda <-> Vulkan interop might require a different approach than OpenGL as Vulkan doesn't allow
  importing memory from a Cuda context. EEVEE uses features that aren't available yet in the backend
* Workbench is working, except Workbench shadows.
* EEVEE-Next basics are working. Shadows, lights are known to be not working. Materials/Shading
  works in simple scenes. Changes are expected in EEVEE-Next that will break Vulkan compatibility
  in the near future.
* Systems with multiple GPUs is not expected to work.
* Wayland support is in development and requires some iterations. You can start Blender, but
  the protocols are not aligned yet.
* OpenXR hasn't been modified and is expected to fail.
* The backend is very strict when mis-using the GPU module. In debug builds it may crash
  on asserts.
* Older drivers/GPUs might not have all the features that we require. The workarounds
  for the missing features still need to be implemented.

**A word about performance**

In the project planning we focus first on stability and platform support. The performance of Vulkan is
around 20% of what we want to achieve. The reason is that each command sent to the
GPU is done one at a time. The implementation even waits until we have feedback that the GPU
is idle again.

Geometry is currently stored in System RAM. The GPU will read and cache the data when
accessing geometry. This slows down when using objects with much geometry.
Some performance features like MDI (Multi-Draw-Indirect) hasn't been implemented and
falls back to Single Draw Indirect.

**Why enable it is an experimental option?**

* Ensures that new features are being tested with Vulkan
* Ensure that building with Vulkan is possible on supported platforms
* Get feedback from developers if Vulkan can run on their system or that
  there are special cases that we are not aware of. Main development
  environment has been Linux/X11 with occasionally testing using Windows.
* Validate Add-ons that use the `gpu` module.
* Possible to enable GLSL validation on the buildbot. (Needs more work).
* Does it compile on all machines or does it require more changes to cmake
  config. We expect it to be able to compile without installing the Vulkan SDK.
  The Vulkan SDK is a very powerful tool, but only when actually doing GPU
  development. Otherwise it is an overhead which slows down other
  activities.

**How can the backend be enabled?**

Currently the Vulkan backend can be enabled per Blender session by starting
using the command line argument `--gpu-backend vulkan`. In the future, when
the backend is more mature, we will add a user preference to switch between
OpenGL and Vulkan.

Pull Request: #113057
57cfe20e5b EEVEE-Next: Fix DupliObject ObjectKey
Fixed version of #112544 (reverted).

`DRW_drawdata_get` reuses the same `DrawData` for all duplis,
so they all end up using the same `ObjectHandle` and `ObjectKey`,
which breaks motion vectors.

* Don't rely on `DRW_drawdata_get` for storing `ObjectKey`s.
* Simplify `ObjectKey`.

This also solves the issue of objects created "on the fly" always having
the `ID_RECALC_ALL` flag.

Pull Request: #113252
12e9894a75 Sculpt: Improve support of face sets with dyntopo
Two aspects to this change:

- Do not clear face sets when enabling dynamic topology
- Draw face sets in viewport when dynamic topology is enabled

Newly added faces in the dynamic topology will have face
sets properly assigned. It is only edge collapse which can
potentially lead to undesired results w.r.t face set boundaries.
That will be worked on further as follow up development.

Pull Request: #113348
buildbot/vdev-code-daily-coordinator Build done. Details
0fc3e3dd98
Fix: Debug build error from incorrect PBVH draw assert
buildbot/vdev-code-daily-coordinator Build done. Details
c37faf8c2f
Merge branch 'blender-v4.0-release'
7e078b724a Fix #112580: Limit Constraint with 'Affect Transform' not working properly in 'World Space'
The problem is observed with the "Limit Distance" and "Limit Location"
constraints.

There is an incorrect usage of `td->mtx` and `td->smtx` when converting
`TransData` space from local to global.

In this case, the code is concatenating matrices instead of converting
the location component space.

Also, these matrices only inform the global transformation components
of rotation and scale. They do not include location.

Since the "Limit Distance" and "Limit Location" constraints only require
the location component, it is not necessary to convert the rotation and
scale components.

So, the solution is to convert the location component space instead of
concatenating matrices.

Pull Request: #112601
711c9c5553 Fix for wobbly volume object outlines in the viewport
The outlines of volume grids in the viewport are noticeable "wobbly"
when they should simply represent grid boxes. This is especially
noticeable on simple regular grids such as the "Volume Cube" geometry
node output.

The reason is that the outlines generated by taking a triangulated mesh
of the grid boxes and then growing it by successively scaling each
triangle. The offset for each vertex grows proportional to its degree
(number of connected edges). The fix is to divide each vertex's offset
by its degree.

The resulting mesh is much more regular and closer to to 1% desired
growth factor.

Old: ![Screenshot_20230829_155602](/attachments/87fbdca3-fb9d-49d8-b4f5-6780d1c72f79)
New: ![Screenshot_20230829_155648](/attachments/4452c52b-96df-4200-a02f-3d0d8aa8680e)

Pull Request: #111657
buildbot/vdev-code-daily-coordinator Build done. Details
9a44445667
Fix assert in PBVH face set drawing code
The assert was assuming that the attribute request is properly
initialized and that was not the case: the "special" data layers
like coordinates, normals, masks, and face sets did not initialize
domain in the attribute request.

The domain is now properly initialized. As well as there is an
assert added in other PBVH types for the face sets. It is possible
to add asserts in more places, but it is not directly related to
this CL.

Pull Request: #113354
9d201dc16b Cleanup: Simplify BMesh PBVH draw data upload
Instead of using a lambda with a FunctionRef argument, just write the
loops explicitly. This results in a bit more boilerplate code and a bit
more repetition, but the overall design and flow is much simpler. Based
on the results in f10965dcb8, it can improve performance too.
6279be4157 Geometry Nodes: use socket name instead of identifier as debug names
This makes it easier to read generated lazy-function graphs, especially when
there are zones or group nodes, because the socket identifiers on those
are some generated internal name.
57e914fc8a Cleanup: move join geometry functionality to separate file
This allows us to reuse the functionality more easily.
buildbot/vdev-code-daily-coordinator Build done. Details
d6f4a9a09b
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
106d54554a
Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
f9bf2a71b4
Merge branch 'blender-v4.0-release' into main
bef0d6c067 Functions: extract remapped-params to make it reusable
This idea is of remapping parameters of lazy-functions is useful
not only for the repeat zone. For example, it could be used for the
for-each zone as well.

Also, moving it to a more general place indicates that there is no
repeat-zone specific stuff in it.
36f7d33121 Fix: False positive geometry randomization in split edges node
See cc7da09c1b.

Splitting edges only potentially affects the order of edges and
vertices. Face corner vertex and edge indices are affected, but their
order isn't affected, and faces aren't affected at all. This didn't
cause problems, but correcting it shows users they can rely on
these consistencies after this operation.
4cbcaf51cb Cleanup: Use "vert" term consistently in mesh randomization debug code
In this area the contraction is usally used. It's nice to be consistent.
buildbot/vdev-code-daily-coordinator Build done. Details
144a5aa512
Cleanup: replace use of std::iota with more specific function
`iota` is name that has no meaning, it's not an acronym or initialism.
It's usually very cryptic when I come across it. Replacing it with a
specialized function makes the code more readible.
buildbot/vdev-code-daily-coordinator Build done. Details
5e43bf3483
EEVEE-Next: Refactor Lightprobe irradiance evaluation
This refactor the lightprobes sample so that we always query
the spherical probe and the volume probe.

Then, given the BSDF type, we reconstruct the incoming radiance
differently depending on the ray probability blending between
the spherical and volume probe depending on ray probability.

Moreover, we implement cubemap normalization using
volume probe spherical harmonic data at spherical probe
position and at the shading point position.

Pull Request: #113301
b434d40dbf CMake: quiet noisy messages on every run
Printing that a library is found every time CMake runs isn't helpful.
Restrict these messages for the first execution so messages are limited
to information developers may need to know such as features being
disabled because of incompatible configurations.
buildbot/vdev-code-daily-coordinator Build done. Details
1bb098bf44
CMake: WITH_OPENGL_BACKEND=OFF excludes EGL/EPOXY includes & libraries
This isn't complete as opensubdiv, hydra & XR still depend on OpenGL.
833eddafa3 CMake: add set_and_warn_incompatible macro, use for HEADLESS & GHOST_SDL
When WITH_GHOST_SDL or WITH_HEADLESS were used, the message didn't make
much sense, especially since the features warned about weren't
necessarily enabled or even supported by the platform.

Replace with a `set_and_warn_incompatible` macro which only reports
configuration changes based on incompatible features.
buildbot/vdev-code-daily-coordinator Build done. Details
1054b9721e
CMake: allow WITH_GHOST_SDL with X11/WAYLAND backends
Multiple backends at once are now supported.
buildbot/vdev-code-daily-coordinator Build done. Details
149d80946e
Cleanup: CMake formatting
buildbot/vdev-code-daily-coordinator Build done. Details
1dafc2786f
CMake: fix building on macOS
buildbot/vdev-code-daily-coordinator Build done. Details
f3f494fd63
macOS: fix issues building without OpenGL headers
macOS has WITH_OPENGL_BACKEND disabled but still included
`epoxy/gl.h` and defined an unused NSOpenGLContext.
f482e5979d CMake: set_and_warn_incompatible now warns if arguments are undefined
Previously this caused an error which can happen on other platforms that
don't define the features being checked.
buildbot/vdev-code-daily-coordinator Build done. Details
0c91466785
GHOST/Wayland: remove WITH_GHOST_WAYLAND_DBUS
This was only used for accessing cursor themes which only worked
with gnome and wasn't used in official releases.
Use the default theme or the theme defined by XCURSOR_THEME.

Eventually wp_cursor_shape_manager_v1 can be supported which avoids
having to access the theme.
buildbot/vdev-code-daily-coordinator Build done. Details
8c1c782853
Merge branch 'blender-v4.0-release' into main
buildbot/vdev-code-daily-coordinator Build done. Details
29d4779bf9
Merge branch 'blender-v4.0-release'
7c694c9d04 EEVEE-Next: Refactor Light evaluation
This allow splitting shadow and light evaluation.
This is the first step to deferred shadowing.

The evaluate closure types can be dynamically
set which mean we can have arbitrary BSDF
evaluation inside the same shader.

This also contain some refactor to `light_lib.glsl`
for more consistency and less clutter.

Note that this breaks the SSS translucency
as the shadow evaluation changes for these.
A new solution for this feature is to be found

Pull Request: #113257
buildbot/vdev-code-daily-coordinator Build done. Details
3cca8680e0
EEVEE-Next: Split Thickness Approximation
This moves the thickness from shadow map
approximation out of the lighting and shadowing
loop. Instead of using the thickness from
the shadow tracing from each individual light
before SSS evaluation, we precompute the
average thickness from all shadowed light.
This is then mixed with the nodetree thicknes.

## SSS Translucency
This add back SSS transmission support by using
the mentionned thickness computation, and applying the
transmission profile on it. This is then applied on top of a
flipped normal LTC computation.

Pull Request: #113401
0742ef808f Fix writing past struct bounds of GHOST_TEventImeData
IME editing would cast GHOST_TEventImeData to wmIMEData then read/write
an additional member that doesn't exist in GHOST_TEventImeData.

In practice it's likely struct padding prevented this from showing up
as a bug. Nevertheless it's bad practice to rely on this.

- Make GHOST_TEventImeData read-only, move the is_ime_composing boolean
  into the window.
- Add static assert to ensure both structs are the same size.
- Correct code comments.
8f8a9ef488 Cleanup: remove unused GHOST_kEventTimer
There was a type error assigning customdata, (wmTimer *) was expected
although this data isn't created so it was never hit.
fc78182cc8 Refactor: use const event data, use static_casts
In some cases processing events was modifying them, as there can be
multiple event consumers, manipulating events isn't correct.
Even though in practice it didn't cause issues, it's straightforward
not to do this and makes logic easier to reason about.
buildbot/vdev-code-daily-coordinator Build done. Details
c1a01ae7b4
WM: move last press time from the wmEvent into wmWindow
This was only ever used in the wmWindow::eventstate so it doesn't
make sense to store in every event.
0df1a0df3d WM: use time-stamps from events for double-click check
Using the time from events is more accurate under Wayland which
can create events while the main thread is busy.
buildbot/vdev-code-daily-coordinator Build done. Details
f3a1dd1eb5
Nodes: move socket declaration methods to base declaration builder
The goal here is to make it easier to use the socket declaration builder
for cases where the actual socket type is not known at compile time.
For that purpose, all the methods that are not dependent on the specific
socket type are moved to the base socket declaration builder.

A nice side effect of this is reduced templated boilerplate and that more
code can be moved out of the header.

With this patch, one is now forced to put type specific method calls before
generic method calls in a chain. For example `.default_value(...).supports_field()`
instead of `supports_field().default_value(...)`. In theory, we could keep
support for both orders but that would involve a lot of additional boilerplate
code. Enforcing this order is simple enough. Note that this limitation only
applies when chaining multiple method calls. This is still possible:
```
auto &decl = b.add_input<decl::Vector>("Value");
decl.supports_field();
decl.default_value(...);
```

Pull Request: #113410
buildbot/vdev-code-daily-coordinator Build done. Details
b6a3ac5a12
Geometry Nodes: use declaration builder for repeat zone
buildbot/vdev-code-daily-coordinator Build done. Details
1ecc315d34
Nodes: pass node declaration builder to dynamic declaration function
Generally, one should use the declaration builder instead of trying to
do it manually which is more error prone and verbose.
buildbot/vdev-code-daily-coordinator Build done. Details
5830316681
Nodes: use better default for color sockets
Using a fully transparent black is default never was an explicit decision.
Now the default is a light grey, that we use in many nodes already.
buildbot/vdev-code-daily-coordinator Build done. Details
7bd509f73a
Functions: enable multi-threading when many nodes are scheduled at once
Nodes that are scheduled can be executed in any order in theory. So when
there are many scheduled nodes, it can be benefitial to start evaluating
them in parallel.

Note that it is not very common that many nodes are scheduled at the
same time in typical setups because the evaluator uses a depth-first heuristic
to decide in which order to evaluate nodes. It can happen more easily in
generated node trees though.

Also, this change only has an affect in practice if none of the scheduled nodes
uses multi-threading internally, as this would also trigger the user of multiple
threads in the graph executor.
buildbot/vdev-code-daily-coordinator Build done. Details
ceb8d34319
Cleanup: reduce template usage in join geometries code
Pull Request: #110436
buildbot/vdev-code-daily-coordinator Build done. Details
61b463d5e4
EEVEE-Next: Planar Probe Pipeline
This PR is contains the initial capture pipeline for planar probes.

It requires work to generate the correct view to capture and to include
the result during ray tracing. These will be developed in a separate PR.

This PR detects if a planar probe is active in the scene. If this is
the case the planar probe pipeline will be activated. During rendering
this is done by querying the depsgraph, during viewport drawing this
is done during sync. If an planar probe is detected and the pipeline
wasn't activated. The pipeline will be activated and the sampling
will be reset to ensure the pipeline is filled with all objects.

Per object the user can set the visibility of the object in planar
reflections.
![image](/attachments/fcfb40f9-f174-491c-bfba-e7f00f49aa1c)

For a reflection plane the resolution and clipping offset can be set.
EDIT: Resolution option was removed because too complex to
implement with the little time we have at the moment.
![image](/attachments/e42ad9ce-8af8-45d1-aa3a-630db1901ad3)

Related to #112966

Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: #113203
buildbot/vdev-code-daily-coordinator Build done. Details
e246c111fb
Merge branch 'blender-v4.0-release'
Harley Acheson changed title from WIP: Fix #109968: Only Wrap Cursor When Out of Bounds to WIP: Fix #109968: Only Wrap Cursor When Out of Bounds 2023-10-08 22:29:50 +02:00
Harley changed target branch from blender-v4.0-release to main 2023-10-08 22:29:52 +02:00
Harley Acheson force-pushed Fix109968 from 20e89dc6b5 to 1ce1db21b9 2023-10-09 21:03:37 +02:00 Compare
Harley Acheson changed title from WIP: Fix #109968: Only Wrap Cursor When Out of Bounds to WIP: Fix #109968: Only Wrap Cursor When Out of Bounds 2023-10-09 21:04:11 +02:00
Harley changed target branch from main to blender-v4.0-release 2023-10-09 21:04:13 +02:00
Harley Acheson changed title from WIP: Fix #109968: Only Wrap Cursor When Out of Bounds to Fix #109968: Allow Warping on Actual Mouse Bounds 2023-10-09 21:08:37 +02:00
Harley Acheson added 1 commit 2023-10-09 21:42:58 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
ca1eb77403
Comments. Less change to getCursorGrabBounds
Author
Member

@blender-bot build

@blender-bot build
Harley Acheson merged commit 1d141e721c into blender-v4.0-release 2023-10-09 22:09:13 +02:00
Harley Acheson deleted branch Fix109968 2023-10-09 22:09:18 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#113066
No description provided.