Age | Commit message (Collapse) | Author |
|
For Cycles, when enabling the Persistent Data option, the full render data
will be preserved from frame-to-frame in animation renders and between
re-renders of the scene. This means that any modifier evaluation, BVH
building, OpenGL vertex buffer uploads, etc, can be done only once for
unchanged objects. This comes at an increased memory cost.
Previously there option was named Persistent Images and had a more limited
impact on render time and memory.
When using multiple view layers, only data from a single view layer is
preserved to keep memory usage somewhat under control. However objects
shared between view layers are preserved, and so this can speedup such
renders as well, even single frame renders.
For Eevee and Workbench this option is not available, however these engines
will now always reuse the depsgraph for animation and multiple view layers.
This can significantly speed up rendering.
These engines do not support sharing the depsgraph between re-renders, due
to technical issues regarding OpenGL contexts. Support for this could be added
if those are solved, see the code comments for details.
|
|
Technically, the crash was caused by revert which happened in
rBcd24712c2c5: it reverted some code which is essential for
rB76fd41e9db1.
Bring back the essential code for the removal of un-needed
Copy-on-Write operations, so that the crash doesn't happen.
What was causing the crash is the ID tag assuming Copy-on-Write
operation always exists.
|
|
Revert "Fix T83411: Crash when using a workspace/layout data path in a driver"
The fix for the crash exposed design violation in the viewport shading updates,
which is for some reason relying on dependency graph tag of interface data.
The viewport module did not respond to the issue in 2 weeks, and the architect
considered missing update for multiple users a more serious issue than a crash
in a very specific case.
This reverts commit 0f95f51361d73fbd8ba8d80b3b65da930dcf3b20.
|
|
Building IDs which are not covered by copy-on-write process was not
implemented, which was causing parameters block not present, and, hence
causing crashes in areas which expected parameters to present.
First part of this change is related on making it so Copy-on-Write is
optional for ID nodes in the dependency graph.
Second part is related on using a generic builder for all ID types
which were not covered by Copy-on-Write before.
The final part is related on making it so build_id() is properly
handling ParticleSettings and Grease Pencil Data. Before they were not
covered there at all, and they need special handling because they do
have own build functions.
Not sure it worth trying to split those parts, as they are related to
each other and are not really possible to be tested standalone. Open
for a second opinion though.
Possible nut-tightening is to re-organize build_id() function so
that every branch does return and have an assert at the end, so that
missing ID type in the switch statement is easier to spot even when
using compilers which do not report missing switch cases.
As for question "why not use default" the answer is: to make it more
explicit and clear what is a decision when adding new ID types. We do
not want to quietly fall-back to a non-copy-on-write case for a newly
added ID types.
Differential Revision: https://developer.blender.org/D10075
|
|
Remove redundant call to `ofstream::close()` from `~PSStrokeRenderer`
and `~TextStrokeRenderer`. ofstream will be destructed automatically.
- For `~Depsgraph`, `std::function`'s constructor can throw.
- Passing throwing statements in the lambda will not be detected by
clang-tidy.
Fix these issues by using lambda as function argument.
Reviewed By: sergey, sybren
Differential Revision: https://developer.blender.org/D9497
|
|
|
|
Replace `NULL` with `nullptr` in C++ code.
No functional changes.
|
|
Ensure that time source always is in the dependency graph, allowing to
tag the graph for time update prior it was fully built.
Collaboration of Philipp Oeser, Jacques Lucke and myself.
Thanks everyone :)
|
|
This reverts {rB1693a5efe91999b60b3dc0bdff727473b3bd00bb}
and implements an alternative solution.
The old patch had the problem that the depsgraph would always
evaluate at the current frame of the original scene (even when
`DEG_evaluate_on_framechange` was used). Now it is possible
to evaluate the depsgraph at a specific frame without having to
change the original scene.
Reviewers: sergey, sybren
Differential Revision: https://developer.blender.org/D8616
|
|
|
|
Reviewers: sergey
Differential Revision: https://developer.blender.org/D8150
|
|
We decided that `blender::Vector` should be the default choice for
a vector data structure in Blender.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D7981
|
|
Surrounding includes with an 'extern "C"' block is not necessary anymore.
Also that made it harder to add any C++ code to some headers, or include headers
that have "optional" C++ code like `MEM_guardedalloc.h`.
I tested compilation on linux and windows (and got help from @LazyDodo).
If this still breaks compilation due to some linker error, the header containing
the symbol in question is probably missing an 'extern "C"' block.
Differential Revision: https://developer.blender.org/D7653
|
|
|
|
|
|
Reviewers: sergey
Differential Revision: https://developer.blender.org/D7556
|
|
Reviewers: sergey
Differential Revision: https://developer.blender.org/D7555
|
|
Reviewers: sergey
Differential Revision: https://developer.blender.org/D7519
|
|
Mpving utils from idcode to idtype proved to be somewhat painful for
some reasons, but now all looks good.
Had to add a fake/empty shell for the special snowflake too,
`ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
|
|
|
|
Extract will steal all depsgraphs currently stored in given bmain, and
restore will put them back in place, using scene and viewlayers as keys.
Preliminary work for undo-speedup.
Part of T60695/D6580.
|
|
No functional changes.
|
|
|
|
|
|
|
|
|
|
This way it might be used for sanity checks in RNA API as well.
|
|
Allows to access dependency graphs created for render engines
to inform them about changes in .blend file structure from the
Python handlers.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5724
|
|
Currently unused, but will allow to keep of an owner of the depsgraph.
Could also simplify other APIs in the future by avoiding to pass bmain
explicitly to relation update functions and things like that.
|
|
Current frame is stored in a scene, and scene might have multiple view
layers. The inactive view layers were not informed about scene's frame
being changed, so when user switched back to view after changing scene
frame it was in an inconsistent state between current scene frame and
animation.
Now we tag scene for time changes, so dependency graph can catch up
and do proper update.
Currently tagging is from quite generic place. Probably better approach
would be to tag from where frame is actually being assigned. Downside
of this is that it's easy to miss some places.
Reviewers: brecht, mont29
Reviewed By: brecht
Maniphest Tasks: T66378
Differential Revision: https://developer.blender.org/D5332
|
|
Fix for GPencil and Cycles Render draw type. GPencil objects were only
shown when overlays were turned on. The cause of this is an
optimization we did to not populate any draw engine when an
external renderer was used with overlays turned off.
This will check if there is any visible GPencil object in the scene. if
so it will still perform the loop.
`DEG_id_type_any_exists` can check if any object of a certain type_id is in the
result. This check is also being used to check if there are any
visible grease pencil objects as a precheck in `DRW_render_check_grease_pencil`.
Reviewed By: brecht, fclem, antoniov
Maniphest Tasks: T65191
Differential Revision: https://developer.blender.org/D4962
|
|
This change makes it so a minimal dependency graph which only includes
compositor and sequencer is built for the render pipeline purposes.
Tricky part here is that it's only compositor itself and sequencer who
to use this dependency graph and IDs from it. Render engines are still
to be provided original IDs because:
- They will create dependency graph for the given scene, and currently
it is not possible to create dependency graph from CoW scene.
- IDs from the compositor/sequencer dependency graph are "stripped",
as in, they wouldn't have all view layers, collections or objects
required for proper final render.
This creates annoying mess of mixing evaluated and original scene
access in various parts of the pipeline.
Fixes T63927: Compositing nodes - drivers don't really work
Reviewers: brecht
Maniphest Tasks: T63927
Differential Revision: https://developer.blender.org/D4911
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Currently should have no functional changes, but allows to
implement runction optimizations more localized and easily.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Missed when removing contributors.
|
|
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Some summary of changes:
- Don't use DEG prefix for types and enumerator values:
the code is already inside DEG namespace.
- Put code where it locally belongs to: avoid having one
single header file with all sort of definitions in it.
- Take advantage of modern C++11 enabled by default.
|
|
Was happening when value of one shape key was driving property of
another shape key of same datablock.
Solved by making shape key blocks properties more granular.
|
|
Makes it more explicit whether RNA property is used as a source
dependency for something else, or whether some other dependency
is being hooked up to evaluate that property.
|
|
|
|
|
|
Allow more flexible use of drivers on B-Bone properties by
connecting the dependencies to the actual operation node that
uses the values, instead of the whole component.
|
|
COW nodes in the graph are mostly connected via a relation type
that doesn't propagate the update flags. Unfortunately, due to
the scheduling implementation that means the relations don't
actually guarantee execution order for indirect dependencies.
Relations also don't guarantee order in case of cycles.
As mentioned in IRC, the simplest way to fix possible problems
is to execute all COW nodes as a separate execution stage. This
seems to fix crashes with Data Transfer modifier in a cycle.
Staging works by simply delaying actual scheduling of tasks for
non-COW nodes until the second run of schedule_graph.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D4027
|
|
Using those functions during multithreaded evaluation is a sure
way to have a race condition and crash.
|
|
|
|
|
|
Also fix duplicate driver to target relations due to a redundant line.
|