The title says it all actually, the idea is to speedup the following case:
- Visible duplicator of a restricted collection (reported as T56512),
One of the questionable change is that none of the view layer bases is
ignored now. This ensures corresponding objects will have copy-on-write
component evaluated, making it possible to access those pointers. The
evaluation of those objects is skipped.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D3641
For this we need to add a bias depending on the viewing angle.
But increasing the hardness of the test make float precision issues in
the mesh transformation more prominent (actual geometry is far below the
surface). So to solve this issue we use a more subdivided grid mesh
8x8 quads instead of 1 triangle.
Film-like curves for the RGB Curve node (Compositor) and Curve Modifier
(Sequencer)
Film-like curves originated from Adobe.
"It’s an RGB curve where the tone curve is applied on the largest and smallest value, and then the middle value is adapted to keep a constant hue as defined by RGB-HSL/HSV. In terms of look and saturation increase it’s very similar to a pure RGB curve, more so than a HSL-L curve or HSV-V curve, but some color shift problems are avoided."
Other tools like Natron, Krita and RawTherapee have implemented this curve tone.
Reviewers: brecht, campbellbarton
Reviewed By: brecht
Tags: #compositing, #video_sequencer
Differential Revision: https://developer.blender.org/D3638
You cannot store ID (or any other data) pointers accross undo’s/redo’s, those
are reading .blend file and hence invalidating all pointers!
Not that happy with this fix, code is rather convoluted and not elegant
at all, but cannot think of a better solution, so will do for now.
Also found and fixed another 'str ghash used for int keys' case...
Basically just concatenates ID's name (including its IDtype code) and
that library's name, if any. This must give unique string in a given
Main database, suitable for GHash keys e.g.
- Add support for key_modifiers, so grease pencil gets "D".
- Assign number keys for unmapped items
This means all tools get keyboard access,
use number/numpad to avoid confusion with other keymap items
which directly activate the tool.
Use debug_value = -1 to disable the use of the filtered depsgraph.
It's still useful to have this for benchmarking + until we're
confident the filtering works safely.
* Don't print on every frame evaluated. This was only needed
earlier to track the progress (and why things were taking so
long - answer, it was the Scene COW issue). Saves 50-100 ms
* Remove the extra calculation of the scene after evaluating
motion paths. This shouldn't be needed now with COW.
Saves about 20-30 ms
This was just randomly leaving all the Particle datablocks in the
filtered graph (and causing and extra/excess pass over the ID's
to get run). Unless we actually need those specially kept for
some reason later, it's better to leave those out for now.
This commit makes the motion path calculations use the
new Depsgraph Filtering API to obtain a more streamlined
copy of the full scene dependency graph, allowing for
faster calculations (as less data needs to be evaluated
for each frame being baked).
For example, in 01_020_A.anim.blend from the Spring production
files, the time needed to calculate paths on several bones
on Autumn went from 39.84 seconds (!) down to 9.90 seconds!
Currently, this works by just replacing the depsgraph instance
passed to the motion path calculation function. This filtered
instance contains just the ID's needed to evaluate the graph
to evaluate a specified target (i.e. the Object owning the pose).
Notes:
* By default, the filtering is not performed unless debug mode 555
is activated. Having a debug switch here allows comparing
performance and disabling it should thing it start crashing.
* It is necessary to pass in the original Scene instance (not the
COW one owned by the filtered depsgraph), otherwise changing the
current frame had no effect, due to the COW flushing from original
Scene to the new Scene overwriting the CFRA changes we make.
* The code here still needs cleaning up to debugging instrumentation, etc.
and also to optimise further (e.g. caching the filtered depsgraph
for faster updates when animating on existing paths, or fine-tuning
the exact set of nodes needed). I'm just committing this first,
since this was the quickly hacked-together test code I've been using
to check that this is all working.
* Further improvements could also be made to the time needed to
build the full graph instance (about 3.3 sec), by allowing partial
builds (e.g. by making a filtering proxy/wrapper around existing builders)
* COW data hasn't been expanded yet when we try to filter the graph
(you need to have tagged + evaluated it for this data to exist),
so all the offending nodes would just get left in
* Added more debug prints to verify whether the id_nodes vector is
getting cleared correctly
* Simplified operation-relation deletion. Now we collect the relations
to delete into a vector, then iterate through that, thus solving issues
with iterator invalidation (+ aborts arising from that)
* DEG_foreach_ancestor_ID() was assuming that all dependencies were
OperationDepsNodes, when in fact, some could be TimeSource nodes
When this works correctly, we should be able to feed in an existing
depsgraph instance, and get out a "filtered" copy of it that contains
only the subset of nodes needed to evaluate what we're interested in.
The current implementation only filters on ID blocks/nodes,
and starts by building a full new depsgraph instance first.
I'd originally intended to do it per operation instead, copying
over individual nodes as appropriate to have the smallest and least
memory intensive graph possible. However, I ended up running into
into problems with function binding + COW arguments, hence the
current slow solution.
Building the CUDA kernels takes quite a bit of memory, and when building all of
them the combined usage can be too much on some systems (especially VMs).
Therefore, this patch adds an option to force the build system to build them
sequentially by making each build step depend on the previous kernel.
Reviewers: brecht, sergey
Differential Revision: https://developer.blender.org/D3623
* Add Shortcut -> Assign Shortcut
* Add to Favorites Menu -> Add to Quick Favorites
To match the menu name and be more general for when the Quick Favorites
are accessible in places other than just menus (like panels).
Add blank icon to Remove Shortcut so it aligns with Change Shortcut
which is usually the item on top of it in the menu.