Commit Graph

7841 Commits

Author SHA1 Message Date
Lukas Stockner
d28fe16693 Merge branch 'blender-v3.6-release' 2023-05-30 00:26:45 +02:00
Lukas Stockner
67d0ba4f80 Fix #108211: Incorrect Transmission Color pass due to merged Glass closure 2023-05-30 00:02:05 +02:00
Sergey Sharybin
52015737c9 Fix #108316: CUDA error rendering Attic scene
The light tree dependent on the first threshold to evaluate to 1
when picking up an emitter.

Pull Request: https://projects.blender.org/blender/blender/pulls/108323
2023-05-27 14:19:19 +02:00
Campbell Barton
12d91d4e60 Cleanup: spelling in comments 2023-05-27 15:24:52 +10:00
Sergey Sharybin
82e8f1129c Cleanup: Spelling in Cycles light tree
Pull Request: https://projects.blender.org/blender/blender/pulls/108324
2023-05-26 18:12:57 +02:00
Sergey Sharybin
cc25a37bee Fix #108315: Illegal CUDA address with shadow-linked mesh emitters
A mistake in the intersection picking logic: if a mesh was hit at
least one intersection is to be recorded.

Pull Request: https://projects.blender.org/blender/blender/pulls/108320
2023-05-26 17:36:24 +02:00
Nathan Vegdahl
468cadd51c Cleanup: add comments explaining best usage of Sobol dimensions 2023-05-26 14:34:48 +02:00
Sergey Sharybin
4ca39297ab Fix specialized light tree building for distant lights
On a user level this fixes configuration when a spot light is
linked to an object, and a sun light is not linked to anything.
It used to be making non-linked receivers to be very noisy.

This is because the distant light did not update the node's
light linking settings when they are added to the node.

A simple demo file will be added to the tests suit as
light_link_distant_tree.blend.

Pull Request: https://projects.blender.org/blender/blender/pulls/108311
2023-05-26 13:29:47 +02:00
Sergey Sharybin
d6db9e4193 Cycles: Store light name
Similar to objects, store the name of Blender's side light name
on the Cycles side. This allows to have readable logs where a
name and property is logged (while previously in the logs all
lights will be called lamp).

There is no user-measurable change.

Pull Request: https://projects.blender.org/blender/blender/pulls/108310
2023-05-26 13:03:54 +02:00
Sergey Sharybin
5e971e8d7f Fix hiding receiver disabling light/shadow linking
Turns out it is not enough to check for the receiver/blocker set,
as the object might be hidden. This should not change the light
behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/108307
2023-05-26 12:21:44 +02:00
Brecht Van Lommel
080484a5c8 Fix #108125: Cycles generates NaN in render passes with low roughness
Slightly increase threshold to avoid division by zero.
2023-05-26 12:18:06 +02:00
Brecht Van Lommel
c6aa0217ac Fix #108125: Cycles generates NaN in render passes with low roughness
Slightly increase threshold to avoid division by zero.
2023-05-26 12:16:14 +02:00
Campbell Barton
e7f88c1050 Cleanup: format 2023-05-26 13:30:14 +10:00
Campbell Barton
393d4a6e14 Cleanup: duplicate words in comments
Also use doxygen-comments in files where this is already the convention.
2023-05-26 12:40:06 +10:00
Sergey Sharybin
393da5df78 Cleanup: Remove redundant object fetch in MNEE
The intersection already has proper object assigned.

Pull Request: https://projects.blender.org/blender/blender/pulls/108275
2023-05-25 16:41:35 +02:00
Campbell Barton
f97660d4ad Cleanup: spelling in comments 2023-05-25 22:50:30 +10:00
Weizhen Huang
bbe5b1e8cf Cleanup: remove unnecessary eval_fac == 0 checks for point lights 2023-05-25 14:23:48 +02:00
Sergey Sharybin
4d2ed350bc Fix #108240: Cycles fails on macOS and AMD GPU
The recent light linking commit changed some includes order,
making compilation to fail on platforms where certain features
are disabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/108264
2023-05-25 13:54:58 +02:00
Brecht Van Lommel
e3c5306d4e Fix light linked emissive meshes rendering black for camera rays 2023-05-25 13:49:38 +02:00
Brecht Van Lommel
1d7832a6a4 Fix Make Links showing light link operators for engines other than Cycles 2023-05-25 13:49:38 +02:00
Weizhen Huang
4758299d86 Cleanup: rename functions relating to MNEE light sample update
The original names were `...update_position()`, but no update in
position is performed in these functions, rather, the entries in
`LightSample` are updated. Also make clear that the functions are used
by MNEE.
2023-05-25 12:26:58 +02:00
Weizhen Huang
41e49d7ece Refactor: group multiple floats to float2 or float3
Multiple random numbers were passed around separately, making some
argument lists unnecessarily long.
No functional changes expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/108236
2023-05-24 18:56:58 +02:00
Brecht Van Lommel
f3f2f7fd47 Merge branch 'blender-v3.6-release' into main 2023-05-24 17:59:14 +02:00
Brecht Van Lommel
9419f5a289 Fix #107932: crash attempting to load invalid OpenVDB file path on macOS
Add catch all exceptions similar as was done for OpenEXR in #107184, and
also properly handle errors in Hydra delegate.
2023-05-24 17:47:27 +02:00
Sergey Sharybin
ba3f26fac5 Cycles: light and shadow linking
With light linking, lights can be set to affect only specific objects in the
scene. Shadow linking additionally gives control over which objects acts a
shadow blockers for a light.

Usage:
https://wiki.blender.org/wiki/Reference/Release_Notes/4.0/Cycles

Implementation:
https://wiki.blender.org/wiki/Source/Render/Cycles/LightLinking

Ref #104972
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
2023-05-24 14:11:47 +02:00
Weizhen Huang
d1dca2d15c Cleanup: remove unused function #light_sample_new_position 2023-05-24 13:36:35 +02:00
Hans Goudey
efbcfd8703 Mesh: Remove deprecated argumen to split_faces API function
See 75ad8da1ea6799e3983e4146f4b20dc4bfbb8415
2023-05-23 17:35:33 -04:00
Bastien Montagne
683f7d3f74 Merge branch 'blender-v3.6-release' 2023-05-23 15:07:22 +02:00
Michael Jones
4a26f51a55 Cycles: MetalRT: Metal binary archives don't support linked functions
This patch fixes an undefined behaviour where we were trying to use linked functions with binary archives. This isn't supported yet. At best this will fail silently, but this is not guaranteed in future. To fix this we simply disable binary archives if any linked functions are involved. The impact of this is that the `SHADE_SURFACE_RAYTRACE` and `SHADE_SURFACE_MNEE` kernels will fall back to the file system cache when MetalRT is enabled. The file system cache will occasionally be purged due to factors beyond Blender's control.

Pull Request: https://projects.blender.org/blender/blender/pulls/108176
2023-05-23 13:42:25 +02:00
Sebastian Herholz
493856427d Cycles: bumping OpenPGL minimum version to 0.5 and removing version checks 2023-05-23 13:23:09 +02:00
Brecht Van Lommel
7d416ece82 Cleanup: fix compiler warnings 2023-05-22 17:08:50 +02:00
Sebastian Herholz
8d17458569 Cycles: Path Guiding: Adding guiding on glossy surfaces via RIS
Pull Request: https://projects.blender.org/blender/blender/pulls/107782
2023-05-22 16:47:05 +02:00
Xavier Hallade
6cce149144 Merge branch 'blender-v3.6-release' 2023-05-22 15:27:55 +02:00
Xavier Hallade
23de320878 Cycles: fix multi-device rendering with oneAPI and Hardware Raytracing
Only Embree CPU BVH was built in the multi-device case. However, one
Embree GPU BVH is needed per GPU, so we now reuse the same logic as in
the other backends.

Pull Request: https://projects.blender.org/blender/blender/pulls/107992
2023-05-22 15:26:58 +02:00
Xavier Hallade
7f4aa0b553 Merge branch 'blender-v3.6-release' 2023-05-22 10:17:40 +02:00
Xavier Hallade
3695f0dffc Cycles: fix device settings update for Multi-device
Hardware Raytracing wasn't properly disabled or enabled in the
subdevices of the multi-device.

This construct:
foreach ( DeviceInfo &info,
  (device.multi_devices.size() != 0 ?
    device.multi_devices : vector<DeviceInfo>({device}))
)
was a nice trap - it was giving a copy to iterate on.

Pull Request: https://projects.blender.org/blender/blender/pulls/107989
2023-05-22 10:14:35 +02:00
Campbell Barton
8925ea1890 Merge branch 'blender-v3.6-release' 2023-05-20 21:18:02 +10:00
Campbell Barton
bf36a61e62 Cleanup: spelling in comments & some corrections 2023-05-20 21:17:09 +10:00
Weizhen Huang
51923c09e2 Cycles: implement faster #make_orthonormals()
Pull Request: #106053
2023-05-19 12:13:39 +02:00
Lukas Stockner
8cde7d8f8a Cycles: Merge Anisotropic BSDF node into Glossy BSDF node
Used to be https://archive.blender.org/developer/D17123.

Internally these are already using the same code path anyways, there's no point in maintaining two distinct nodes.

The obvious approach would be to add Anisotropy controls to the Glossy BSDF node and remove the Anisotropic BSDF node. However, that would break forward compability, since older Blender versions don't know how to handle the Anisotropy input on the Glossy BSDF node.

Therefore, this commit technically removes the Glossy BSDF node, uses versioning to replace them with an Anisotropic BSDF node, and renames that node to "Glossy BSDF".

That way, when you open a new file in an older version, all the nodes show up as Anisotropic BSDF nodes and render correctly.

This is a bit ugly internally since we need to preserve the old `idname` which now no longer matches the UI name, but that's not too bad.

Also removes the "Sharp" distribution option and replaces it with GGX, sets Roughness to zero and disconnects any input to the Roughness socket.

Pull Request: https://projects.blender.org/blender/blender/pulls/104445
2023-05-18 23:12:20 +02:00
Nikita Sirgienko
bafd82c9c1 Cycles: oneAPI: use local memory for faster shader sorting
Co-authored-by: Stefan Werner <stefan.werner@intel.com>

Pull Request: https://projects.blender.org/blender/blender/pulls/107994
2023-05-17 11:07:57 +02:00
Nikita Sirgienko
04fc6fd8a7 Cycles: avoid doing zero-sized allocations with partitioned shader sorting 2023-05-17 11:07:56 +02:00
Nikita Sirgienko
b8173278b0 Cycles: oneAPI: set correct work group sizes for kernels that have a predefined one 2023-05-17 00:02:12 +02:00
Nikita Sirgienko
a17d07ee87 Cycles: oneAPI: Fix prevented execution with sycl runtime > 20230323
NanoVDB headers have unused code using "double" type, which is not supported on Arc GPUs.
Recent DPC++ changes enforced runtime verifications:
7663dc201d
which prevents execution when such type has been present even if unused.
This is a solution to avoid double to be compiled at all, similar as how it is done for Metal.
2023-05-17 00:00:52 +02:00
Brecht Van Lommel
f0701bdf73 Refactor: add reduce functions for float2 for consistency
Pull Request: https://projects.blender.org/blender/blender/pulls/107970
2023-05-16 13:56:08 +02:00
Xavier Hallade
66df452df2 Cycles: oneAPI: enable hardware raytracing by default 2023-05-15 16:36:51 +02:00
Xavier Hallade
5c57b9aa79 Cleanup: avoid warning on unused argument in cycles_device 2023-05-15 07:35:03 +02:00
Weizhen Huang
3d96cab01f Fix wrong area light pdf in Cycles MNEE
Area light sampling use special techniques to reduce noise with small
spread angles; the change in sampled area was not taken into
consideration when computing the pdf in MNEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/107897
2023-05-12 23:07:28 +02:00
Weizhen Huang
9870d8fd27 Fix missing Jacobian in rect area light pdf when in volume segment 2023-05-12 22:40:02 +02:00
Brecht Van Lommel
078b2d7174 Fix #107777: Cycles baking of Shadow not working anymore
After the removal of the Shadow pass this no longer worked. Now it works by
marking the object as a shadow catcher and returning the Shadow Catcher pass.

The result is different than before, since it also takes into account indirect
light now and uses a different method to weight the contribution of lights that
is adaptive to the light strength.
2023-05-12 21:00:52 +02:00