Age | Commit message (Collapse) | Author |
|
Blender now calls render hooks before taking copy of `scene->r` in
`RE_RenderAnim()`.
A change to the render output filename made in the render-init hook
would not be picked up by by the copy. As a result, placeholders were
touched using the old name, whereas the rendered images would be saved
with the new filename.
Reviewers: sergey
Maniphest Tasks: T66555
Differential Revision: https://developer.blender.org/D5887
|
|
|
|
|
|
Those handlers are usually done to edit scene which is being rendered,
and this is not supported due to a fully localized nature of the preview
bmain.
There is still non-conditional callback in stats_background which is a
bit tricky to cover with check, but this code is not supposed to be run
for previews anyway.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5731
|
|
The goal is to make it possible to access evaluated datablocks at a
corresponding context. For example, be able to check evaluated state
if an object used for rendering.
Allows to write scripts in a safe manner for T63548 and T60094.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5726
|
|
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.
|
|
Preparing for the bigger changes which will be related on passing
dependency graph to various callbacks which need it.
Differential Revision: https://developer.blender.org/D5725
|
|
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
|
|
|
|
|
|
|
|
|
|
|
|
The calls to `BKE_animsys_evaluate_all_animation()` and
`BKE_mask_evaluate_all_masks()` used the wrong timecode to evaluate the
animation system. This happened:
- Sequencer in scene A was rendered at frame X.
- Scene strip for scene B which should be evaluated at frame Y.
- BKE_animsys_evaluate_all_animation() was called with frame Y, which
also re-evaluated the animation data in scene A.
- Other sequencer strips with animated values were then evaluated for
frame Y and not frame X.
Since the depsgraph for rendering the scene strip is already OK and does
its job, it's no longer necessary to re-evaluate all the animation in
this way.
Removed `BKE_mask_evaluate_all_masks()` because it's no longer used.
Reviewers: sergey, brecht, iss
Differential Revision: https://developer.blender.org/D5394
|
|
|
|
|
|
|
|
T68035 by @luzpaz
|
|
Use explicit boolean flag to indicate whether flush to original data
is needed or not. Makes it possible to avoid confusion on whether an
evaluated or any depsgraph can be passed to the API.
Allows to remove depsgraph from bAnimContext as well.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5379
|
|
Differential Revision: https://developer.blender.org/D3744
|
|
TLS and Settings can be used by other types of parallel 'for loops', so
removing 'Range' from their names.
No functional changes expected here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Part of the issue was caused by missing speaker objects in the depsgraph
used for post-processing.
Remaining part was caused by missing scene sound update for this depsgraph.
|
|
|
|
Use lower level dependency graph evaluation which doesn't run any handlers,
doesn't touch sound system, doesn't inform image editors about changes.
Should probably move such evaluation steps to a helper function in DEG module,
but that is more like a cleanup.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5067
|
|
|
|
Cheap tip: anything that is not "Camel Case" and/or that is more than
a few words long should use `TIP_` translation, not `IFACE_` one.
Also added several missing strings (including the one reported in D5056
by Jean First (@robbott), thanks).
|
|
This is enabled with bl_use_eevee_viewport = True. It allows external engines
to generate an Cycles/Eevee shader node setup to emulate their materials in
the realtime viewport, or to leave it to users to do manually.
Removed bl_use_exclude_layers and bl_use_shading_nodes that did nothing
anymore. This should not break API compatibility, any scripts setting those
should continue to work the same as before.
Also adds descriptions for some RenderEngine settings.
|
|
This change makes it so sound handles are created for evaluated scene,
sequencer and speakers. This allows to have properly evaluated animation
on them.
For the viewport playback sound uses regular dependency graph.
For the final render sound uses dependency graph created for render pipeline,
which now also contains sequencer and sound datablocks.
All the direct sound update calls are replaced with corresponding dependency
graph recalc tag.
|
|
|
|
|
|
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
|
|
|
|
Previously, render parts were stored in a linked list and every tile update
searched the entire list for the correct part. As a result, the overhead
of searching tiles increased quadratically w.r.t. the number of tiles.
By hashing the parts based on their location, this operation is much faster,
significantly reducing the tile update overhead for small tiles and/or large
renders.
For example, rendering an empty scene in 1080p at 1spp and 8x8 tiles goes
down from 9.22sec to 1.45sec on my laptop.
Reviewers: brecht, sergey
Differential Revision: https://developer.blender.org/D4896
|
|
This also replaces the Use Alpha setting. We now have these alpha modes:
* Straight: store RGB and alpha channels separately with alpha acting as a
mask, also known as unassociated alpha.
* Premultiplied: transparent RGB pixels are multiplied by the alpha channel.
The natural format for renders.
* Channel Packed: different images are packed in the RGB and alpha channels,
and they should not influence each other. Channel packing is commonly used
by game engines to save memory.
* None: ignore alpha channel from the file and make image fully opaque.
Cycles OSL does not correctly support Channel Packed and None yet, we are
missing fine control over the OpenImageIO texture cache to do that.
Fixes T53672
|
|
We can not access ensured-to-be-evaluated dependency graph from the
render API: some of it is running from within evaluation which makes
it possible for engines to access list of evaluated IDs.
Solved by passing dependency graph to viewport functions, similar to
the final render functions.
|
|
|
|
|
|
Will allow to avoid confusion about original/evaluated scene used
to access those in the nearest future.
|
|
|
|
Allows to extend that code more easily.
|
|
|
|
|
|
Sequencer cache was cleared when rendering compositor output.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4758
|