Based on the "Stochastic ray tracing of transparent 3D Gaussians" paper
by Xin Sun et. al. The basic idea: perform stochastic intersection with
the Gaussian splat based on its transparency.
Gaussian splats are implemented as a dedicated primitive type, but it
shares the same layout for position and radius as points, so a lot of
existing functions (positions, attributes, etc) work for both points
and splats.
For the Embree and hardware intersection it is implemented as a custom
primitive type.
The choice of using bounding spheres mainly comes from a balance between
performance and memory usage. More ideal would be to use OBB, but it is
not supported for custom primitive types in Embree and GPU HW-RT on all
backends.
There is a known limitation that comes from the fact that the datasets
are trained in sRGB space and Cycles work in Linear space: areas with
low opacity and high radiance render noticeably differently from the
ground-truth implementation.
Ref #159470
Pull Request: https://projects.blender.org/blender/blender/pulls/163103
In Cycles we previously assumed that the IOR inversion, when hitting a
surface from the backside, for dielectric closures
(e.g., generalized_schlick, microfacet, refract, etc.) is done by the
user in the OSL code. While experimenting with the OSL code generated
by MaterialX and by looking at the example OSL shaders of the OSL
testrender it shows that OSL assumes that this inversion is done
implicitly, inside the closures. This change matches Cycles IOR
inversion behavior with the one expected by MaterialX and OSL
testrender.
Pull Request: https://projects.blender.org/blender/blender/pulls/162634
A new command line option `--debug-gpu-backend-no-fallback` is added
that skips the GPU backend support checks. This is primarily useful for
the GPU tests that should not fall back to another backend. This has the
useful side effect of skipping `vk_instance_create_for_platform_checks`,
which would otherwise create its own Vulkan instance. `vkCreateInstance`
can be an expensive function call depending on the used GPU driver (see
https://projects.blender.org/infrastructure/meta/issues/231).
Pull Request: https://projects.blender.org/blender/blender/pulls/163203
Dispersion is defined by two parameters:
Abbe Number and Dispersion Scale.
This corresponds to OpenPBR v1.1.1
Pull Request: https://projects.blender.org/blender/blender/pulls/162041
Note: dispersion is temporarily disabled when using MNEE (shadow caustics) on oneAPI, due to a compiler bug. Waiting for a fix from the oneAPI side.

Co-authored-by: Sebastian Herholz <sebastian.herholz@gmail.com>
The compute-shader based function `update_mipmaps` can generate broken
mipmaps for Intel Arc Windows OpenGL. A workaround for falling back to
`generate_mipmap` is added to mitigate the issue. Furthermore, a render
test is added that catches the issue.
Pull Request: https://projects.blender.org/blender/blender/pulls/162524
A scene with 512 lights inside a box, to test that we handle scenes
with many lights correctly.
Disabled in Cycles due to high noise variance between platforms even at
high samples.
Pull Request: https://projects.blender.org/blender/blender/pulls/161009
As the vulkan backend is now default, `get_gpu_device_vendor()` returns
the selected GPU for Vulkan. In the rare case that OpenGL uses a
different GPU, this causes render tests to use incorrect tolerances and
possibly fail. The PR adds the GPU backend argument to
`get_gpu_device_vendor()` to avoid this\*.
> \* this = confusing me
Pull Request: https://projects.blender.org/blender/blender/pulls/161255
Use the mechanism where there is one reference directory, and an override
directory for the cases that are known to be different.
The override is kept only where the committed USD reference and Hydra
reference differ beyond the test threshold; otherwise the Hydra render
is redundant and shares the USD reference. This helps work towards
making them match, and reduces the repository checkout size.
Pull Request: https://projects.blender.org/blender/blender/pulls/160433
Initially noted by devops as a problem: UI tests when crashing
spawn our crash dialog, that will just sit there for 1200 seconds
until the CI environment decides the test has failed and kills the
process, clicking away the dialog also works, but neither option is
ideal here.
The crash handler knows when we are in background mode, (`-B`) and
suppresses this dialog so this is why it has not been an issue for the
normal tests. However when we do crash we get an unhelpful message
saying `Writing: blender.crash.txt` which is not collected by buildbot
so unless a developer can get a devops person to go retrieve this file
its contents will be left to ones imagination.
This PR adds a `--console-crash-handler` argument that does two things:
1 - Suppress the crash dialog even when we are not in background mode
2 - Rather than writing the crash data to blender.crash.txt write this
information to stderr so it shows up in the CI logs.
It also updates all invocations of blender I could find in our test
scripts to pass this new flag. The benchmark scripts have not been
updated as they regularly run against older blender versions that may
not support the new flag.
Pull Request: https://projects.blender.org/blender/blender/pulls/159983
- Thin glass:
An infinitesimally thin sheet of dielectric, approximated by a reflected
lobe and a trasmitted lobe, the respective weights of both lobes are
analytically computed by summing up infinite geometric series that
account for internal reflections.
- Thin subsurface:
An infinitesimally thin sheet of dense scattering material, approximated
by a diffuse lobe and a translucent lobe, the respective weights of both
lobes are given by subsurface anisotropy, with specifies the relative
amount of backward and forward scattering.
Co-authored-by: Jesse Yurkovich <jesse.y@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/157469
After refactoring to deduplicate code, the normal for the tangent frame was
no longer properly transform to object space. Revert code to how it was
before and add a more explicit function name and comment.
Pull Request: https://projects.blender.org/blender/blender/pulls/154102
This commit adds the environment variable
`BLENDER_TEST_IGNORE_VENDOR_BLOCKLIST` to the GTest and Python tests.
In contrast to `BLENDER_TEST_IGNORE_BLOCKLIST`, this only ignores the
blocklists for tests that are blocked for individual hardware vendors.
When a test fails in Blender due to driver issues, the test is blocked
for the hardware vendor until a fixed driver is available for the CI
workers. This means that hardware vendors need to manually remove the
blocklists when they check the state of test failures.
The new environment variable gives an easy option to also run these
tests in case where seeing these failures (but not general failures,
e.g., due to issues in Blender) is preferrable.
Pull Request: https://projects.blender.org/blender/blender/pulls/153549
This PR adds separate Vulkan backend tests for Storm Hydra/USD and UI.
The new tests are called:
- storm_hydra_[backend]_*
- storm_usd_[backend]_*
- ui_[backend]_*
The Vulkan tests are not yet enabled by default due to open issues.
For enabling them, the CMake options WITH_STORM_TESTS_VULKAN and
WITH_UI_TESTS_VULKAN can be turned on.
Pull Request: https://projects.blender.org/blender/blender/pulls/149142
Clamp octaves to be at least 1 to avoid having no noise at all, and clamp
the maximum to avoid precision issues and NaNs on some GPUs.
Blocklist white noise 256 samples tests entirely for Storm, as we don't
support multiple samples and can't test converting to grey. Increase the
grid size in the 1 sample white noise test to make it more clear.
Pull Request: https://projects.blender.org/blender/blender/pulls/148525
This PR slightly raises the accepted noise level for the Storm tests
"autosmooth custom normals" (mesh) and "sss hair" (sss). They failed
due to what likely is acceptable differences in rasterization.
Pull Request: https://projects.blender.org/blender/blender/pulls/148506
The implementation of this was broken and not actually used for the EEVEE
tests, as there is currently no separate reference directory for AMD.
Move it to the render report module so it can be reused by different tests.
Pull Request: https://projects.blender.org/blender/blender/pulls/148148
Applies thin film iridescence to metals in Metallic BSDF and Principled BSDF.
To get the complex IOR values for each spectral band from F82 Tint colors,
the code uses the parametrization from "Artist Friendly Metallic Fresnel",
where the g parameter is set to F82. This IOR is used to find the phase shift,
but reflectance is still calculated with the F82 Tint formula after adjusting
F0 for the film's IOR.
Co-authored-by: Lukas Stockner <lukas@lukasstockner.de>
Co-authored-by: Weizhen Huang <weizhen@blender.org>
Co-authored-by: RobertMoerland <rmoerlandrj@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/141131
This was introduced during EEVEE-next developement
cycle to not make the buildbot fail because of EEVEE
render tests.
These have stabilized now and we can remove this option.
Pull Request: https://projects.blender.org/blender/blender/pulls/137545
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
This commit adds tests for the outputs of the light path node.
This include many typical tests (E.g. Changing the colour of a material
based on if it's a camera ray or not) along with some "unusual" tests.
Examples include:
- Testing many of the light path node outputs on lights.
- This includes "analytical" lights and mesh lights, which can behave
differently depending on if Next Event Estimation or forward path
tracing occurs.
- Adding extra objects using ray portal BSDFs and transparent BSDFs
just to double check they don't introduce their own issues.
Ref: blender/blender-test-data!55
* Disable Metal multisampling to match OpenGL.
* Block list all image half/float tests, these can all fail randomly.
* Blocklist tests failing due to issues in OpenUSD Metal implementation.
Contains the following changes:
- Uses new `render_layer` images in test repo
- Excludes known broken tests with Hydra Storm from USD 24.05
- packed float and packed half images show corruption
- USD export doesn't support the current light-tree .blend
- Bump the `image_colorspace` and `image_mapping` thresholds to
account for image filtering differences from OS/drivers
Pull Request: https://projects.blender.org/blender/blender/pulls/132044
Some changes to how argparse is used in render tests:
1. Use the common approach of one dash for single-letter options (`-b`)
and two dashes for longer options (`--blender`). In this commit that
just means changing single-dashed (`-testdir`) to double-dashed
(`--testdir`).
2. Remove unnecessary `nargs` arguments. The code was telling `argparse`
to put CLI arguments into a list of one item, and then had code to
turn that one-item list into the item itself. I've just removed the
`nargs` argument altogether, as that just produces the desired
value without requiring more code.
I've also removed `nargs="+"` from the handling of the `--blender`
parameter, as that allowed for multiple occurrences of `--blender
{path}` but was silently ignoring all of those except the first.
To ensure that required arguments are present, the code now uses
`required=True` instead of `nargs`.
3. Add a `description` parameter so that `--help` shows what the
test script actually does. Also it helps people (like me) who want
to figure out which blend file is actually being opened by the
test, without making the test itself more verbose.
No functional changes, except that you now cannot add multiple
`--blender` arguments any more (the CLI invocation will fail). This wasn't
used anywhere I could find, though.
Pull Request: https://projects.blender.org/blender/blender/pulls/131666
Add silently fail option to GPU based render tests. This is a pre-requisite to enable
render tests on the buildbot. By default these render tests will pass silently.
* Test will pass when using the `--pass-silently` arguments.
* Only crashes will be reported as failed tests.
* To find out failing test, review the test reports.
`WITH_GPU_RENDER_TESTS_SILENT` compile option can be used to let tests pass (default)
or fail (default for developers).
Although some tests fail, they still passed. In the generated render report,
the silently passed failures are correctly reported to be failures.
Pull Request: https://projects.blender.org/blender/blender/pulls/117629
This change fixes confusion situation when the render output
is an RGBA image: the difference in color was not visible in
the report because alpha channel was all zeros. This is due
to idiff performing per-channel difference.
The solution to this problem is to have separate images for
color and alpha difference, which makes it clear where the
difference actually is coming from.
Some tests like cycles, sequencer and compositor batch together multiple
tests in a single Blender invocation. This makes them run faster, but
makes debugging harder. This is an option to disable that batching.
Pull Request: https://projects.blender.org/blender/blender/pulls/114603
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.
While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.
Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.
Some directories in `./intern/` have also been excluded:
- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.
An "AUTHORS" file has been added, using the chromium projects authors
file as a template.
Design task: #110784
Ref !110783.
These are meant to test Hydra integration. Currently they are only enabled
for WITH_OPENGL_RENDER_TESTS=ON due to similar reasons as Eevee and
Workbench, which is that they require a GPU and results can be platform
dependent due to hardware and driver differences.
There are separate tests for USD and Hydra export paths. The goal is to
make these identical, but they aren't yet. So for that reason they have
separate reference renders, and there is a HTML page to compare them.
Ref #110765