Implementation of the hard eraser for grease pencil.
The tool "cuts" the strokes, meaning it removes points that are inside the eraser's radius, while adding points at intersections between the eraser and the strokes.
Note that this does not implement the "Stroke" and "Dissolve" mode of the eraser yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/110063
This patch uses the average variance of individual color channel as the
condition for choosing the appropriate quadrant. This will produce
different visual results, but ones that are consistent with the
intention of the Kuwahara filter.
This is done to be compatible with the GPU implementation, which uses
that method due to superior performance and memory saving.
Logic which initialized a 3D viewport in ED_area_init only set it's
type but didn't ensure `area->spacedata.first` pointed to a valid View3D.
Resolve by adding or reusing the existing View3D.
The check in `area_offscreen_init` has been replaced with an assert
since the space_type for off-screen areas is set at run-time and should
never be unknown.
This patch merges the two operators `Push Pose from Rest Pose`
and `Relax Pose from Rest Pose` into one
new operator `Blend Pose with Rest Pose`
The operator has a default range of -1/1 with a default of 0.
The functionality of `Relax Pose from Rest Pose` is on the positive axis
and `Push Pose from Rest Pose` on the negative.
This is a breaking change so ideal for 4.0
Pull Request: https://projects.blender.org/blender/blender/pulls/108309
Resolve a crash in !104831, which exposed an error in window creation
with an empty space type.
Creating a new window with an empty space type would do the following:
- Create a new screen with a single empty area.
- Refresh the screen,
- Initialize the area.
- Convert the empty area into a 3D viewport.
- Run SpaceType::init()
This doesn't cause any problems at the moment because `view3d_init`
isn't doing anything however !104831 accesses the View3D from
`area->spacedata.first` causing SCREEN_OT_area_dupli to crash.
Resolve by supporting an area setup callback for WM_window_open
so the area-data can be set before it's initialized.
The issue remains where an unknown/empty ScrArea::spacetype results in
a crash although it seems unlikely users run into this in practice.
Whatever the case, that can be resolved separately.
The Keying node produces wrong despilling on the GPU evaluator.
That's because the despill amount could be negative, which was not
accounted for.
Additionally, the saturation indices were changed to match the CPU
implementation, just as was done in bdb042c243.
The Keying node produces different mattes between the GPU and CPU
evaluators.
That's because the CPU implementation doesn't use the full argmax to
determine indices, rather, it only considers the first argmax and uses
the minimum and maximum of the other two as a form of determinism or
stability.
The algorithm seems arbitrary and makes little sense to me, so for now,
the CPU implementation was ported for consistent results.
Adds the UI for layer opacity in the layer panel.
Currently layer blending rendering is not implemented, so the last layer's opacity will affect all of the layers.
Pull Request: https://projects.blender.org/blender/blender/pulls/110177
The edited mesh is not occluded even with Xray alpha 1.0, but it still
occludes other meshes that are not in edit mode.
Therefore, to resolve, alpha is still considered in general occlusion,
but is ignored in occlusion of edited meshes.
The maximum OpenGL versions supported on mac
doesn't meet the minimum required version (>=4.3) anymore.
This removes all the OpenGL paths in GHOST
Cocoa backend and from the drop down menu in
the user preferences.
Pull Request: https://projects.blender.org/blender/blender/pulls/110185
This patch implements the Classic Kuwahara node for the Realtime Compositor.
A naive O(radius^2) implementation is used for radii up to 5 pixels, and a
constant O(1) implementation based on summed area tables is used for higher
radii at the cost of building and storing the tables.
This is different from the CPU implementation in that it computes the variance
as the average of the variance of each of the individual channels. This is done
to avoid computing yet another SAT table for luminance. The CPU implementation
will be adapted to match this in a future commit.
The SAT implementation is based on the algorithm described in:
Nehab, Diego, et al. "GPU-efficient recursive filtering and summed-area tables."
Additionally, the Result class now allows full precision texture allocation, which
was necessary for storing the SAT tables.
Pull Request: https://projects.blender.org/blender/blender/pulls/109292
The Switch View node crashes on editing the compositor node tree with
the GPU compositor enabled.
That's because interactive edits are are in contexts that are not
multi-view, which is indicated by an empty view name.
To fix this, we fallback to the first input for non multi-view contexts.
This PR adds diffuse light from environment to the scene without having an
irradiance volume in the scene.
It does this by extracting the sperical harmonics from the world probe and
store it in the irradiance brick that is reserved for world diffuse light
in the irradiance cache.
This also fixes that selecting an LookDev HDRI didn't update the diffuse
light.
**Known Issues**
- When sampling probes with lower resolution strokes are visible, leading
to flickering and instability in the spherical harmonics. This is an
issue that should be solved in a separate patch as it is already visible
in main
- When selecting a lookdev HDRI all irradiance volumes needs to be disabled
manually for the expected results (but this also disabled GI). In the future
this will be done automatically or we will add a solution to separate the
world diffuse light from the irradiance cache so we can update it on the fly.
Pull Request: https://projects.blender.org/blender/blender/pulls/110110
This change replaces a bare RenderEngine owned by a viewport
with a VeiwRender. This unlocks a possibility of accessing
RenderResult for viewport renders. Currently it is not done,
but it will be needed for an upcoming work towards unification
of the render passes handling.
Ref #108618
Pull Request: https://projects.blender.org/blender/blender/pulls/110244
Currently no functional changes.
Preparing for introduction of a Render structure for the viewport
render which will hold both engine and the render result for
passes access.
Use proper allocation and destruction for it.
Since the allocation is no longer zero-initialized make sure the
fields are explicitly zeroed out. This also allows to use an easier
way to initialize mutexes.
Currently no functional changes, preparing for a bigger refactor.
Used for the global list of the Render structures.
Using C++ container helps moving towards reliable "real" C++
structure for the Render, without worrying about the offset of
the next/prev fields.
Should be no functional changes on the user side.