When effect of adjustment layer strip is moved below the adjustment
layer, this causes infinite loop in strip rendering. Same happens when
you use multicam strip and set source channel to one of its effects.
This is fixed by passing `SeqRenderState` to the effects. If any strip
renders "seqbase" pointer of strip is stored in set in the render state
struct. If the pointer exists in this set, function returns without
rendering anything. In other words, The strip must never render itself.
Pull Request: https://projects.blender.org/blender/blender/pulls/146624
When units were split into larger and smaller values, the larger
value is rounded and should not show trailing zeros.
Trailing zeros should only be used for the smaller unit.
Ref !140790
This patch removes the XY scale inputs from the Displace node. The
inputs were redundant since they were just multiplied by the vector.
This simplifies the node and improves performance slightly.
Additionally, the Vector input was renamed to Displacement since it no
longer specifies a direction.
Pull Request: https://projects.blender.org/blender/blender/pulls/146356
To help reduce confusion, remove this property as we believe it has
little to no actual utility. Visibility, instead, remains controlled
with the `evaluation_mode` option.
Ref #134012
See PR for discussion and description of what effect this option used to
have.
Pull Request: https://projects.blender.org/blender/blender/pulls/144600
This patch reorders the inputs of some of the compositor nodes
accordingly to their importance. The importance is already quantified
internally using the domain priority of the input, so we needn't make
any subjective judgement and just order by the priority.
This breaks forward and backward compatibility if input indices were
used as opposed to input identifiers due to the different order.
Handling compatibility is not impossible, but is difficult, and it was
already ignored in many past node changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/146311
The image log render tests uses an EXR that contains INF. Workbench
with specular enabled will mix these INFs, but there is a difference
in behavior between OpenGL and Vulkan.
In OpenGL mix(0.05, INF, 0.0) will result in INF
In Vulkan this results in NaN.
This should eventually be solved in the engine to ensure consistency.
For now we disable the render test and document the limitation.
Pull Request: https://projects.blender.org/blender/blender/pulls/146648
This commit bumps up the time delay while running these tests from
1/60th of a second to 1/6th of a second to ensure that the new window
is created prior to the rest of the test running while.
Pull Request: https://projects.blender.org/blender/blender/pulls/146309
Due to an incorrect assumption float buffers were converted to sRGB
values when uploading to an sRGBA8 texture. This is done when rendering
flames in workbench and resulted in to bright renders.
This PR removes sRGB encoding when uploading float values to sRGBA8 textures.
Fixes:
- render/openvdb/fire
- render/openvdb/principled_blackbody
- render/openvdb/smoke_fire
Pull Request: https://projects.blender.org/blender/blender/pulls/146636
On its own, the main functionality of the Radial Tiling node
is the ability to divide a 2D Cartesian coordinate system into
as many radial segments as specified by the "Segments" input.
Each segment has its own affinely transformed coordinate system,
provided through the "Segment Coordinates" output, which can be
used to tile textures in a radially symmetric manner.
Additionally, a unique index is provided for every segment through
the "Segment ID" output, the width of each segment at Y-coordinate
of the "Segment Coordinates" output without normalization = 0 is
provided through the "Segment Width" output and the rotation value
of the affine transformation of the coordinate system of each segment
is provided through the "Segment Rotation" output.
The roundness of the coordinate lines of the "Segment Coordinates"
output can be controlled through the "Roundness" inputs.
This can be used to make the coordinate systems of the segments
a mix of Cartesian and polar coordinates.
Lastly, the lines of points of the "Segment Coordinates" output with
constant Y-coordinates have the shape of polygon with rounded corners,
which can be used to procedurally create rounded polygons.
Pull Request: https://projects.blender.org/blender/blender/pulls/127711
A compiler/driver bug makes so that we can't rely on image atomics.
Adding a write that is never executed after the atomics tricks
the compiler to issue the correct synchronisation instruction.
This fixes a bunch of our render tests differences.
We will keep this workaround until this is fixed upstream.
Pull Request: https://projects.blender.org/blender/blender/pulls/146442
These are causing quite a big difference in existing files, which is not
easy to address in versioning. Since the goal of removing this was to
simplify things for us and that's not the case, just revert this change.
This reverts commit ab21755aaf.
Ref #139923
Pull Request: https://projects.blender.org/blender/blender/pulls/146336
This commit adds a UI test that activates each of the default tools for
a mesh in Sculpt Mode and verifies that no Python errors are emitted
when the corresponding tool settings are displayed to the user.
Note that this does not test all of the default bundled brushes.
Pull Request: https://projects.blender.org/blender/blender/pulls/144397
This mode is based on the same athmospheric model as the previous one, but now
also accounts for multiple scattering and reflections from the ground.
This increases the accuracy, especially at low elevations.
Also renames some options for consistency:
- The previous "Nishita" model is now "Single Scattering"
- "Dust" is now "Aerosols"
- Default altitude is now 100m.
Co-authored-by: Lukas Stockner <lukas@lukasstockner.de>
Pull Request: https://projects.blender.org/blender/blender/pulls/140480
"Use Nodes" was removed in the compositor to simplify the compositing
workflow. This introduced a slight inconsistency with the Shader Node
Editor.
This PR removes "Use Nodes" for object materials.
For Line Style, no changes are planned (not sure how to preserve
compatibility yet).
This simplifies the state of objects; either they have a material or
they don't.
Backward compatibility:
- If Use Nodes is turned Off, new nodes are added to the node tree to
simulate the same material:
- DNA: Only `use_nodes` is marked deprecated
- Python API:
- `material.use_nodes` is marked deprecated and will be removed in
6.0. Reading it always returns `True` and setting it has no effect.
- `material.diffuse_color`, `material.specular` etc.. Are not used by
EEVEE anymore but are kept because they are used by Workbench.
Forward compatibility:
Always enable 'Use Nodes' when writing blend files.
Known Issues:
Some UI tests are failing on macOS
Pull Request: https://projects.blender.org/blender/blender/pulls/141278
The File Output node always appends the frame number even if the render
is not an animation. This patch makes it such that the frame number is
only written if the render is an animation. The user can use a frame
variable to manually append the frame number if needed.
The command line rendering interface already uses animation rendering in
all cases, so it should not be affected. However, rendering using the
render.render() operator with animation=False will see the behavior
change, however, setting animation=False and start_frame and end_frame
to the same frame number should be sufficient to restore the old
behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/141209
This PR adds a check that batched tests do not surpass the Windows
command line limit of 32,767 characters (including the terminating null
character). This could previously happen if long path names were used.
Pull Request: https://projects.blender.org/blender/blender/pulls/145792
This adds a function that can turn an existing `bNodeTree` into an inlined one.
The new node tree has all node groups, repeat zones, closures and bundles
inlined. So it's just a flat tree that ideally can be consumed easily by render
engines. As part of the process, it also does constant folding.
The goal is to support more advanced features from geometry nodes (repeat zones,
etc.) in shader nodes which the evaluator is more limited because it has to be
able to run on the GPU. Creating an inlined `bNodeTree` is likely the most
direct way to get but may also be limiting in the future. Since this is a fairly
local change, it's likely still worth it to support these features in all render
engines without having to make their evaluators significantly more complex.
Some limitations apply here that do not apply in Geometry Nodes. For example,
the iterations count in a repeat zone has to be a constant after constant
folding.
There is also a `Test Inlining Shader Nodes` operator that creates the inlined
tree and creates a group node for it. This is just for testing purposes.
#145811 will make this functionality available to the Python API as well so that
external renderers can use it too.
EEVEE render tests were failing in aov_transparency. This is a known
file to be failing for Metal and AMD hardware. This PR increases the
fail threshold to let the test pass.
Pull Request: https://projects.blender.org/blender/blender/pulls/145917
This adds a boolean output for each of the menu items. The output is true, if
the passed in menu value is that item. This avoids the need to compare the
output value to the input values to get a boolean for whether a specific menu
item was passed in.
Support is added for Geometry Nodes as well as the Compositor. Usage/Value
inferencing has been updated as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/145712
* Add ACES SDR to HDR displays
* Add ACES reference gamut compression look.
* Name non-HDR AgX for HDR displays "AgX - SDR", consistent with ACES and
makes it more clear that this may not be the one you want for HDR. This
required updating test blend files.
* Mark all non-sRGB view transform colorspaces as inactive, so they don't
pollute the colorspaces list. The HDR ones were already inactive.
Ref #144911
Pull Request: https://projects.blender.org/blender/blender/pulls/145820
Certain packed images, like those loaded directly into memory with
`BKE_image_packfiles_from_mem`, would cause USD to process the images as
"in memory" rather than as "packed" because the API was not removing the
IMG_GEN_TILE flag.
Additionally, be sure to use the packed filepath whenever possible
rather than the name given to the Image datablock as this ensures the
correct file names are used inside the USD file and for the resulting
file on disk after export.
This also fixes 2 render tests which now match when compared to the
native renders.
Pull Request: https://projects.blender.org/blender/blender/pulls/145749
* Store scene linear to XYZ conversion matrix in each blend file, along
with the colorspace name. The matrix is the source of truth. The name
is currently only used for error logging about unknown color spaces.
* Add Working Space option in color management panel, to change the
working space for the entire blend file. Changing this will pop up
a dialog, with a default enabled option to convert all colors in
the blend file to the new working space. Note this is necessarily only
an approximation.
* Link and append automatically converts to the color space of the main
open blend file.
* There is builtin support for Rec.709, Rec.2020 and ACEScg working spaces,
in addition to the working space of custom OpenColorIO configs.
* Undo of working space for linked datablocks isn't quite correct when going
to a smaller gamut working space. This can be fixed by reloading the file
so the linked datablocks are reloaded.
Compatibility with blend files saved with a custom OpenColorIO config
is tricky, as we can not detect this.
* We assume that if the blend file has no information about the scene
linear color space, it is the default one from the active OCIO config.
And the same for any blend files linked or appended. This is effectively
the same behavior as before.
* Now that there is a warning when color spaces are missing, it is more
likely that a user will notice something is wrong and only save the
blend file with the correct config active.
* As no automatic working space conversion happens on file load, there is
an opportunity to correct things by changing the working space with
"Convert Colors" disabled. This can also be scripted for all blend files
in a project.
Ref #144911
Pull Request: https://projects.blender.org/blender/blender/pulls/145476
When shadow linking is enabled, `intersect_dedicated_light` is scheduled even
if the `PATH_RAY_SUBSURFACE` flag is set. This checks the flag and schedules
`intersect_subsurface` instead.
Pull Request: https://projects.blender.org/blender/blender/pulls/145621
Replaces current basis function calculation which seems to be a direct
implementation of the recursive NURBS formulation. New implementation
avoids the need to check for zero divisions during iteration. Out of
bounds checks are also converted to asserts, assuming input provides
valid span index.
Performance wise this nets a 7+% performance improvement with the
average result being as fast or faster then the fastest execution
from previous implementation!
Pull Request: https://projects.blender.org/blender/blender/pulls/144457
Stored undo step data for position changes in sculpt mode are now
automatically compressed. Compression is run in background threads,
reducing memory consumption during sculpting sessions while adding
little performance overhead.
For testing and benchmarks, memory usage is now available through
`bpy.app.undo_memory_info()`. Undo memory usage is now tracked by the
existing automated benchmark tests. Some changes to the web benchmark
visualization present the data a bit better.
ZSTD compression is run asynchronously in a backround task pool.
Compression is only blocking if the data is requested immediately for
undo/redo.
Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/141310
Now that there are Rec.2100 PQ and HLG displays, the additional HDR option
for video export is redundant. Typically you would now select a HDR display
early on and do all your video editing with it enabled.
For saving a HDR video, the encoding panel will now show the name of the color
space, and warn when the video codec or color depth is incompatible.
Since this is now based on interop IDs for the dislpay color spaces, we can
map more of those to the appropriate CICP code. This works fine for Display P3,
in my tests it looks identical to sRGB except that the wide gamut colors are
preserved.
However Rec.1886 and Rec.2020 are problematic regarding the transfer function,
although the latter at least has the correct primaries now. So it should be
a net improvement and this could be looked at later if anyone wants.
---
Background:
* Rec.1886 and Rec.2020 display color spaces in Blender use gamma 2.4.
* BT.709 trc is almost the same as gamma 2.4, so seems like the correct choice.
* We already write sRGB with BT.709 trc, which seems wrong.
* Yet sRGB matches exactly between Blender display and QuickTime, while
Rec.1886 and Rec.2020 do not.
* Display P3 with BT.709 trc matches sRGB with BT.709 trc, just adding the wide
gamut colors. So that is what is used for now. Also using the sRGB trc the
file is not recognized by QuickTime.
There is apparently a well known "QuickTime gamma shift" issue, where the
interpretation of the BT.709 trc is different than other platforms. And you need
to do workarounds like writing gamma 2.4 metadata outside of CICP to get
things to display properly on macOS.
Not that QuickTime is necessarily the reference we should target, but just to
explain that changing the previous behavior would have consequences, and so
it this commit leaves that unchanged.
Pull Request: https://projects.blender.org/blender/blender/pulls/145373
Improve handling of runtime defined python RNA properties. Mainly:
* Add `get_transform` and `set_transform` new callbacks.
These allow to edit the value, while still using the default
(IDProperty-based) storage system.
* Read-only properties should now be defined using a new `options` flag,
`READ_ONLY`.
* `get`/`set` should only be used when storing data outside of the
default system now.
* Having a `get` without a `set` defined forces property to be
read-only (same behavior as before).
* Having a `set` without a `get` is now an error.
* Just like with existing `get/set` callbacks, `get_/set_transform`
callbacks must always generate values matching the constraints defined
by their `bpy.props` property definition (same type, within required
range, same dimensions/sizes for the `Vector` properties, etc.).
* To simplify handling of non-statically sized strings, the relevant
RNA API has been modified, to use `std::string` instead of
(allocated) char arrays.
Relevant unittests and benchmarking have been added or updated as part
of this project.
Note: From initial benchmarking, 'transform' versions of get/set are
several times faster than 'real' get/set.
Implements #141042.
Pull Request: https://projects.blender.org/blender/blender/pulls/141303
When instanced meshes were using FBX geometric transforms, the code
was not telling ufbx to create proper adjustment helper nodes due to
UFBX_GEOMETRY_TRANSFORM_HANDLING_MODIFY_GEOMETRY_NO_FALLBACK flag.
That flag was put in earlier, before import of armatures was solidified,
turns out using the proper flag (UFBX_GEOMETRY_TRANSFORM_HANDLING_MODIFY_GEOMETRY)
is not a problem anymore.
Pull Request: https://projects.blender.org/blender/blender/pulls/145527
This applies an OpenColorIO display, view and look transform on a color
in the scene_linear colorspace.
In general, OpenColorIO configurations do not contain a colorspace for
every view + display, especially if they are modern configs using the
display colorspace and shared view mechanisms. Nor do they include looks.
So the Convert Colorspace node is not sufficient.
Additionally, we would like to avoid making the colorspace list too long
in the default config, as we are adding many new views and transforms.
Exposure, gamma curves and white point functionality are not included
in this node, as there are native ways of doing that in the compositor.
These settings are marked non-editable in the Python API.
Pull Request: https://projects.blender.org/blender/blender/pulls/145069
This PR adds code for setting the Quality of Service (QoS) level of the
process on Windows. This can, e.g., make sure that on hybrid systems
P-cores are utilized even when the app window is out of focus.
In the following cases, it is adjusted from the default behavior:
- In wm_jobs.cc the QoS level is raised while a priority job is running.
- The command line option `--qos [high|eco|default]` can be used to
change the QoS level of the process.
- By default, the QoS level is raised for the EEVEE performance tests,
as they check viewport rendering performance and would otherwise be
reliant on never going out of focus to not get a downgraded QoS level.
By default, they are created with an out of focus window at the time
of landing this PR. This PR makes sure that they actually measure the
animation replay performance attainable during real-world use.
Pull Request: https://projects.blender.org/blender/blender/pulls/144224
Refactor and revamp import and export of `UsdGeomNurbsCurves` prim
objects.
Fixes#130056, among other things.
Summary of changes and enhancements:
- Export:
- Write out `nurb_weight` attribute as the USD `pointWeights` primvar
- Properly write out cyclic NURBS curves data (* see notes)
- Import:
- Import using the new `Curves` datablock rather than the old `Curve`
- Properly read in cyclic NURBS curves data (* see notes)
- Tries harder to match incoming knot vector to standard `knots_mode`,
will use Custom otherwise
- Support import of all custom primvars and data attached to the prim
(for use with Geometry Nodes etc.) (* see notes)
Tests were added which check a variety of point count, order, knot_mode,
and cyclic combinations (generated through Geometry Nodes). A small
number of hand-crafted curves were used to test the Custom knots_mode
support on import. Additionally, the tests cover the case when there are
multiple curves defined for a single object.
Notes:
- Cyclic NURBS support is reliant on the current, under-spec'd, USD
documentation. Changes may be required in the future if/when the USD
spec is clarified: https://github.com/PixarAnimationStudios/OpenUSD/issues/3740
- Some Cyclic x knots_mode combinations are not correct and would
require more research to determine how to properly address.
- Custom attributes are not imported for Cyclic NURBS curves yet. Those
will require additional work to function correctly and are also
reliant on seeing how the USD spec changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/143970
In recent history there have been two issues leading to corrupt
rendering or crashes on the GPU in scenes with 300 or more unique
materials. #144713 and #141171.
To help detect these issues earlier on, this commit adds a new Cycles
render test that uses 400 unique materials.
Pull Request: https://projects.blender.org/blender/blender/pulls/145187