This commit makes a number of changes to the sculpt performance tests,
aimed at measuring more consistent data and making it easier to extend
the test cases.
* Repeats tests a minimum of 5 times up to 100 times, with a timeout
of 5 seconds for a given test case to run, averaging the duration of
the brush strokes to stabilize the value
* Sets the brush from the script instead of having it defined in each
file, preventing the need to duplicate benchmark files.
* Uses the newly defined `override_location` property to allow defining
the stroke in screen-space and repeating strokes multiple times
without regenerating the base mesh
* Adds tests for the smooth brush, as basic neighbor calculations
* Adds tests for dyntopo sculpting
* Renames the base mesh tests to have a "mesh_" prefix as the data is
inherently discontinuous here.
Related benchmark PR: blender/blender-benchmarks#2
Part of #133926
Pull Request: https://projects.blender.org/blender/blender/pulls/133841
Depending on internal details of how Blender is run, attempting to load
elements from the asset library may either execute as synchronous &
blocking or asynchronously.
When executing a script in background mode, prior to this commit,
operators that are dependent on the asset system will not execute
correctly due to the loading not being complete.
Busy-waiting for this by repeatedly calling the operator over and over
again in python does not resolve. To match behavior of other operators
when called from python scripts such as the quadriflow remesh, this
commit changes the `brush.asset_activate` operator and dependent code to
force a blocking call instead of optionally using the wmJob background
abstraction system.
Related to #117399
Pull Request: https://projects.blender.org/blender/blender/pulls/134203
Previously when an action was baked, the slot name was not retained.
This causes problems when switching between actions because the slot
will not automatically be assigned.
This is now fixed by ensuring that the name of the last assigned slot
is used to create the new slot.
Pull Request: https://projects.blender.org/blender/blender/pulls/136814
After creating a new scene in a separate window when performing UI
tests, the respective view layer for the window may not be updated
immediately in the event loop.
Previously, this was mitigated with a single `yield` statement that
would delay processing by a single tick. To fix this issue, this commit
adds the capability to yield for a specific `timedelta` and waits this
amount of time for the two affected tests.
Pull Request: https://projects.blender.org/blender/blender/pulls/136012
Due to changes in the bump mapping system, various tests had to be
updated.
It seems like the reference images for the stereo camera tests
weren't properly updated. So this commit fixes that.
Ref: blender/blender-test-data!79
This makes it available in Cycles standalone, and the implementation
can be shared with Blender. This also makes it possible to compute
tangents after tessellation for adaptive subdivision.
There is a difference in UV map tangents when there are no UVs. They
are now generated from object space coordinates instead of auto
texture space coordinates. This is more efficient, and a corner case
that we don't have to keep compatible.
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/cycles/pulls/25
No functional changes.
This patch adds unit tests for the animation baking code in `anim_utils.py`.
It is by no means exhaustive but it is a start to figure out what this function
is actually doing.
With the usage of the legacy python API I was worried things might not work as
expected but all added tests pass.
Also, the tests document the current behavior without any attempt of declaring
that behavior as good or correct.
Pull Request: https://projects.blender.org/blender/blender/pulls/135583
This commit gives users of the Cycles performance benchmark tool the
option to run performance benchmarks with OSL enabled for CPUs
and OptiX devices.
This can be done by adding `-OSL` to the device name:
`CPU-OSL`
`OPTIX-OSL_0`
Pull Request: https://projects.blender.org/blender/blender/pulls/136506
The new correction avoids washed out areas near the shadow terminator,
preserving more detail from normal and bump maps.
It implements the method from the paper "A Microfacet-Based Shadowing
Function to Solve the Bump Terminator Problem" by Alejandro Conty Estevez,
Pascal Lecocq, and Clifford Stein.
Pull Request: https://projects.blender.org/blender/blender/pulls/135380
This makes it possible to restore previous Blender 4.3 behavior of bump
mapping, where the large filter width was sometimes (ab)used to get a bevel
like effect on stepwise textures.
For bump from the displacement socket, filter width remains fixed at 0.1.
Ref #133991, #135841
Pull Request: https://projects.blender.org/blender/blender/pulls/136465
The output of the mentioned test was slightly off from what main
currently produces, so update the reference image to resolve test
failures.
Ref: blender/blender-test-data!78
F-Curve interpolation uses the `FCURVE_INT_VALUES` and
`FCURVE_DISCRETE_VALUES` flags, which were not set in the keyframe
insertion function for slotted Actions. This is now resolved by making
the RNA property type part of the `FCurveDescriptor`.
Existing code has been refactored a bit, mostly to allow calling
`update_autoflags_fcurve_direct()` with just the RNA property type,
instead of passing the property itself. This avoided the need to include
pointers to RNA properties in `FCurveDescriptor`, which I think is a
slightly nicer design. It also makes it more explicit which aspect of
the property is used.
Because there's now another `std::optional<>` in the `FCurveDescriptor`,
I've also changed some `std::nullopt` to `{}` for brevity of the code,
as repeating that another time would have caused longer lines with more
rewrapping.
Pull Request: https://projects.blender.org/blender/blender/pulls/136446
Similar to the regression tests it is possible to append -RT suffix
to the compute type to enable hardware ray-tracing.
For example HIP_0 will run benchmark on first HIP device without
hardware ray-tracing, HIP-RT_0 will run benchmark on the same device
but will enable hardware ray-tracing.
The downside of this change is that it will make it so METAL device
will no longer use HW-RT on M3 and aboce, and explicit METAL-RT is
to be used. This is because benchmark was relying on the Auto
configuration which has different behavior depending on the device
generation.
Pull Request: https://projects.blender.org/blender/blender/pulls/136308
The transparent bounce test was too optimistic in regards to the intersection
being considered. The check needs to happen after it has been validated that
it is not duplicate.
It was already the case for Metal and HIP-RT, but not for Embree and BVH2.
Tests updated by: Alaska <Alaskayou01@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/136325
While object names in Blender are already unique, the names themselves
may be "unsafe" for use in the various file formats. During processing
we make the names "safe". However, we did not guarantee that these new
safe names were themselves unique wrt each other. Consider object names
"Test 1" and "Test-1" which both become "Test_1" after being made safe.
These will collide during export; only 1 object would be exported and
it's undefined which object's data would "win".
To rectify this we add another name map to the hierarchy iterator which
is then used to handle collisions as they happen. The map is per-
hierarchy meaning that a name can appear more than once as long as its
under a different hierarchy. E.g.
- `/root/A/X` and another `/root/B/X` is OK
- `/root/A/X` and another `/root/A/X` is NOT OK
Pull Request: https://projects.blender.org/blender/blender/pulls/135418
- Object parent type & parent bones
- Pose information that is not trivial (i.e. print posed bones that
have either non-identity pose matrix, or custom properties)
- Make sure custom properties are output sorted by name
Pull Request: https://projects.blender.org/blender/blender/pulls/136321
This patch adds support for boolean sockets in the compositor. This
involves adding a new Bool ResultType and handling it in relevant code.
For shader operations, booleans are passes as floats since GPUMaterial
does not yet support boolean types.
Pull Request: https://projects.blender.org/blender/blender/pulls/136296
- The context setup functions now reset the file to factory settings
before setting up the context - for a predictable context.
- Split operator suppression lists into groups based on the reason
for being disabled to avoid having to note this in code-comments.
- The suppression list is validated, warning if items aren't used.
- Disable operators which crash in background-mode which don't have
obvious fixes & aren't useful in background-mode.
This commit edits and adds new tests for missing camera tests bringing
the code coverage for camera projection to basically 100%.
The changes include:
- Adding a test for the central cylindrical camera type
- And editing the other camera tests to include a object with a
`Window` texture coordinate system in view.
- Modifications to these tests were done in the version of Blender
closest to when the original test was made. For most tests this was
Blender 3.1.
Ref: blender/blender-test-data!69
Use the mesh wrapper mechanism from GPU subdivision to get the base mesh.
This can significantly reduce memory usage and render setup time if the
level was not manually set to zero.
Pull Request: https://projects.blender.org/blender/blender/pulls/135895
This commit adds a test file containing a combined rotation,
translation, and scale transformation on a coloured cube,
with motion blur enabled, all with a low motion blur step count.
This test is being added to make sure various backends interpolate
this combined motion correctly.
Ref: blender/blender#135659
Ref: blender/blender-test-data!75
With the HIPRT backend for Cycles, rays can end up hitting the same
triangle multiple times due to a issue in the spatial splitting
algorithm.
Most of the time this issue isn't visible, but it is quite obvious in
semi-transparent shadows of meshes.
So this commit adds a file that contains a object made up of many
semi-transparent rectangular prisms casting a shadow onto the a plane.
Ref: blender/blender#117527
Ref: blender/blender-test-data!76
- Use command line arguments to configure options such as random seed,
running operators on existing blend files & how often the file is
reset to the initial state.
- Support for generating a script file to replay the actions,
useful for creating a repeatable script for bug reports.
- Add new context setup functions for edit-mode grease-pencil & hair.
Correct the event coordinates by scaling by the pixel_size on macOS.
All the UI tests now pass on macOS.
Ref !136008
Co-authored-by: Sean Kim <SeanCTKim@protonmail.com>
The inclusion of "Add -> Image -> Mesh Plane" causes the menu search
for "Add -> Mesh -> Plane" to attempt to add the image plane.
Workaround the problem by searching for an exact match,
although I think this should be possible to search for menu items
without having to include their shortcuts, especially since these
can be platform dependent.
This commit allows the `WITH_UI_TESTS` CMake option to be used on all
platforms, not only Linux. The existing functionality to use the Weston
compositor was moved into the `WITH_UI_TESTS_HEADLESS` option. When
these tests are run with only `WITH_UI_TESTS`, a visible instance of
Blender is opened up for testing.
Pull Request: https://projects.blender.org/blender/blender/pulls/135889
This commit adds a file that bakes ambient occlusion to the
color attribute of a mesh, then bakes the color attribute to a texture
and saves that as the test image.
This test is being done to make sure the `bake_offset_towards_center`
function is tested as it is necessary to fix some bugs with
color attribute baking (blender/blender#95969)
Ref: blender/blender-test-data!73
The Ashikmin Shirley microfacet option for the glossy BSDF has it's own
blurring function for the filter glossy feature.
This commit adjusts the glossy_ashikhmin test to make use of filter
glossy so that this code path can be tested.
Ref: blender/blender-test-data!72