Commit Graph

13647 Commits

Author SHA1 Message Date
Nikita Sirgienko
280b5c89ae Cycles: Set quality parameter for OIDN
OpenImageDenoise API exposes two modes, high quality and balanced.
This currently only has effect on Nvidia devices, on which it
provides a noticeable performance improvement without visible
difference in quality. This change sets quality to balanced for
the viewport, and high quality for final frame rendering, as
it's what makes the most sense.

Ref #115045

Co-authored-by: Werner, Stefan <stefan.werner@intel.com>
Pull Request: #115265
2024-02-06 20:58:17 +01:00
Nikita Sirgienko
c174fd4e06 Cycles: Fix Python error in has_oidn_gpu_devices
Was introduced during refactoring in bc886857f34878f2fd79031619a5ff8d10013347
2024-02-06 20:26:05 +01:00
Nikita Sirgienko
0100547515 Cycles: Gray out hardware raytracing checkboxes when not available
HWRT checkboxes visibility in the Cycles settings wasn't uniform across devices.
With this change, we unify it and gray out these in case HWRT isn't available.

Pull Request: https://projects.blender.org/blender/blender/pulls/117904
2024-02-06 20:06:13 +01:00
Hans Goudey
d9266853c2 Cleanup: Make format 2024-02-06 12:42:26 -05:00
Nikita Sirgienko
bc886857f3 Cycles: Option to disable OpenImageDenoise GPU per scene
To reduce memory usage if needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/117874
2024-02-06 17:46:21 +01:00
Damien Picard
fa77e9142d UI: fix and improve a few messages
- "can not" -> "cannot" in many places (ambiguous, also see
  Writing Style guide).
- "Bezier" -> "Bézier": proper spelling of the eponym.
- Tool keymaps: make "Uv" all caps.
- "FFMPEG" -> "FFmpeg" (official spelling)
- Use MULTIPLICATION SIGN U+00D7 instead of MULTIPLICATION X U+2715.
- "LClick" -> "LMB", "RClick" -> "RMB": this convention is used
  everywhere else.
- "Save rendered the image..." -> "Save the rendered image...": typo.
- "Preserve Current retiming": title case for property.
- Bend status message: punctuation.
- "... class used to define the panel" -> "header": copy-paste error.
- "... class used to define the menu" -> "asset": copy-paste error.
- "Lights user to display objects..." -> "Lights used...": typo.
- "-setaudio require one argument" -> "requires": typo.

Some issues reported by Joan Pujolar and Tamar Mebonia.

Pull Request: https://projects.blender.org/blender/blender/pulls/117856
2024-02-05 17:08:17 +01:00
Alaska
a3183fb95f Fix #117771: Incorrect Cycles texture position on emissive triangles
Pull Request: https://projects.blender.org/blender/blender/pulls/117801
2024-02-05 13:56:18 +01:00
Nikita Sirgienko
cab974920f Cycles: Remove incorrect dead code for CUDA 32bit textures
Pull Request: https://projects.blender.org/blender/blender/pulls/117818
2024-02-05 13:53:51 +01:00
Brecht Van Lommel
3b1230d318 Cycles: Remove workaround for failing bake tests
This appear to no longer be needed, and this type of memory does not
work with OpenImageDenoise.

Ref #116124
2024-02-05 12:19:21 +01:00
Lukas Stockner
b10507ab63 Fix #117586: Cycles: World Lightgroup not updated when creating/deleting LGs 2024-02-04 16:30:55 +01:00
Lukas Stockner
8d7ecd0856 Cycles: Use high value for Transparent BSDF PDF
The transparent BSDF is singular, so MIS shouldn't be applied.

Fixes #117657.
2024-02-04 00:35:54 +01:00
Jacques Lucke
319b911784 Cleanup: move hash and ghash utils to C++
Also see #103343.

Pull Request: https://projects.blender.org/blender/blender/pulls/117761
2024-02-02 19:55:06 +01:00
Campbell Barton
8b827a5bb5 Cleanup: spelling in comments 2024-02-02 10:48:22 +11:00
Brecht Van Lommel
1f142b3d44 Fix: Cycles MIS disabled unnecessarily with transparency, causing fireflies
This is a leftover from when there was a global option for transparent
shadows, but since it's now per material this makes no sense anymore.

Solution found by Olivier Maury.

Pull Request: https://projects.blender.org/blender/blender/pulls/117735
2024-02-01 21:23:28 +01:00
Sergey Sharybin
71253e1bb0 Fix Cycles baking forcing denoising of combined pass
This is mistake in the PR #117483

Simple solution: make the pass configuration logic to only disable
denoising, and never allow to enable it.

Pull Request: https://projects.blender.org/blender/blender/pulls/117723
2024-02-01 14:40:50 +01:00
Hans Goudey
7fa5fc02b7 Cleanup: Move BLF headers to C++ 2024-01-31 14:04:56 -05:00
Xavier Hallade
4d4f8bbfe4 Cycles: set num_sort_partition_elements to 8192 for oneAPI
The default value of 65536 wasn't optimal on Intel GPUs, switching to
8192 gives a 0 to 15% performance improvement depending on the scenes.
2024-01-31 17:25:34 +01:00
Xavier Hallade
18a20f373f Cycles: increase min Intel GPU driver version on Windows
With drivers 101.4972 to 101.5085, some Arc and Meteor Lake devices
ignore the prebuilt GPU binaries and since the addition of Meteor Lake
binaries, fail caching newly generated ones on Windows.
This got fixed in drivers 101.5186 so it's preferable to require these
new drivers to be used.
2024-01-31 12:49:30 +01:00
Alaska
58b9240c82 Cycles: Separate the caustics controls for Generalized Schlick
This allows users to turn off reflective and refractive caustics
separately from each other when using the Generalized Schlick material.

This will impact the Principled BSDF and Glass BSDF, along with some
custom OSL scripts.

Pull Request: https://projects.blender.org/blender/blender/pulls/117617
2024-01-30 10:31:32 +01:00
Alaska
7aca9a1ebb Fix #117611: Cycles NaN in microfacet BSDF with IOR 1.0
Pull Request: https://projects.blender.org/blender/blender/pulls/117622
2024-01-29 15:26:36 +01:00
Campbell Barton
dab6515374 Cleanup: remove references to start time in X11
Missed from recent removal.
2024-01-29 11:53:43 +11:00
Campbell Barton
a73419363c GHOST/SDL: use SDL_GetTicks64 to prevent wrapping the 32 bit uint time 2024-01-29 11:47:46 +11:00
Campbell Barton
05807b0662 GHOST/X11: remove start-time offset from getMilliSeconds
Remove since this isn't needed, not done by other platforms.
2024-01-29 11:47:45 +11:00
Campbell Barton
18eb7e7502 Cleanup: correct doc-strings for GHOST_GetMilliSeconds
Wayland, macOS & SDL weren't using the start-time of the process.

The start-time offset isn't needed so it's similar to forward the
systems method of accessing the time in milliseconds.
2024-01-29 11:47:43 +11:00
Campbell Barton
be7f89a9f5 Cleanup: spelling in comments 2024-01-29 11:47:42 +11:00
Lukas Stockner
82811cf489 Cycles: Support Type-A IES files
Seems to be a fairly niche type, but some people (apparently mostly in the automotive space) use it.

Also improves the handling of IES files in general and lets Cycles accept IES files that are technically violating the spec - which seems to be most of them...

Pull Request: https://projects.blender.org/blender/blender/pulls/114689
2024-01-29 01:03:47 +01:00
Alaska
e6a3d46fe5 Cycles: Improve handling of Principled BSDF Caustics settings
Improve the handling of Principled BSDF Caustics from Metallic
and Transmissive components, improving consistency between SVM and OSL,
and offering more predictable results.

Pull Request: https://projects.blender.org/blender/blender/pulls/115081
2024-01-29 00:37:12 +01:00
Pierrick Bouvier
a3d915310b Build: Fix some excessive Visual Studio compile times
While investigating Blender compilation time for windows-arm64, we
identified two compilation units that were taking a long time to compile
(~1h each). This affects windows-x64 builds as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/117534
2024-01-28 12:12:52 +01:00
Brecht Van Lommel
38647b6dc2 Fix: suspicious time-stamp console warnings on macOS
Use the correct current time API function that matches NSEvent timestamp.
2024-01-27 00:22:49 +01:00
Sergey Sharybin
6f681105ec Cycles: Skip denoising during bake when pass does not support denoising
This changes fixes the slowdown when baking data passes like Normal with
the denoiser enabled on scene settings.

When baking to 4K textures denoising could take considerable amount of
time, which is better be avoided.

Pull Request: https://projects.blender.org/blender/blender/pulls/117483
2024-01-25 15:56:20 +01:00
Alaska
ddc0aceefd Cycles UI: Hide HIP-RT settings on Linux
Hide the HIP-RT setting on Linux since it's not supported there yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/117492
2024-01-25 15:16:13 +01:00
Brecht Van Lommel
8087dd9e96 Cleanup: Cycles: use one fewer object struct member for motion data 2024-01-24 20:17:13 +01:00
Brecht Van Lommel
5b6f2ef5a2 Cleanup: Cycles: rename some legacy names to new ones 2024-01-24 20:17:13 +01:00
Brecht Van Lommel
b689027b3a Fix #114028: Cycles displace splits faces with smooth and flat faces
Cycles can use a per face flag to determine if a face is smooth or flat,
and there is no need to use corner normals in such cases. So revert to
not doing that as before, which also saves a bit of memory.

There is a pre-existing issue where faces are split by sharp edges and
autosmooth, which is not solved by this. It's only fixing the regression.
2024-01-24 19:55:31 +01:00
Stefan Werner
d16d2bbd3a Cycles: Adding OIDN support for CUDA and OptiX devices
Small changes to turn on support and to build OIDN with the CUDA backend.

Co-authored-by: Werner, Stefan <stefan.werner@intel.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/115828
2024-01-24 08:19:39 +01:00
Hans Goudey
99f9084bee Cleanup: Replace some CLAMP macros with C++ functions
Pull Request: https://projects.blender.org/blender/blender/pulls/117460
2024-01-23 21:10:33 +01:00
salipourto
dd7a7791d7 Cycles: Remove and update deprecated compiler options for HIP
Pull Request: https://projects.blender.org/blender/blender/pulls/117428
2024-01-23 20:28:39 +01:00
Stefan Werner
4f58cffb4e Cycles: Use default CUDA context instead of creating a new one
This allows for Cycles and OIDN to share the same context.

Co-authored-by: Werner, Stefan <stefan.werner@intel.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/117230
2024-01-23 15:31:45 +01:00
Lukas Stockner
b5a9c98e04 Fix #117081: Wrong Roughness when baking Principled BSDF
The pre-4.0 Principled BSDF had a special diffuse BSDF that contained
the roughness value from the node. Since 4.0, the regular Diffuse BSDF is used,
so we need to ignore it when determining the roughness value for baking.
2024-01-23 01:20:12 +01:00
Hans Goudey
0618de49ad Cleanup: Replace MIN/MAX macros with C++ functions
Use `std::min` and `std::max` instead. Though keep MIN2 and MAX2
just for C code that hasn't been moved to C++ yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/117384
2024-01-22 15:58:18 +01:00
Campbell Barton
5b59be81ba Cleanup: spelling in comments 2024-01-22 12:44:56 +11:00
Aras Pranckevicius
a705259b4b Cleanup: move imbuf .h files to .hh 2024-01-19 20:29:38 +01:00
Brecht Van Lommel
cb787a458b Build: use C++17 for CUDA kernels when supported
This helps with compatibility with recent clang versions as host compiler.

Pull Request: https://projects.blender.org/blender/blender/pulls/117311
2024-01-19 15:19:33 +01:00
ESASHIKA Kaoru
c0bc49f035 GHOST: Support for Additional 3Dconnextion Devices
Add support for additional 3Dconnextion devices, specifically the Space
Mouse Pro Wireless when connected directly and for the wireless
connection.

Pull Request: https://projects.blender.org/blender/blender/pulls/116393
2024-01-18 17:48:35 +01:00
Hans Goudey
da6b45f9b8 Cleanup: Make format 2024-01-16 10:56:55 -05:00
Eugene Kuznetsov
10dfa07e36 Linux: Use huge pages in jemalloc to speed up allocations
Enable huge pages for jemalloc. This requests the Linux kernel to use
huge (2 MB) pages for large allocations. This has the effect of speeding
up first accesses to those allocations, and possibly also speeds up future
accesses by reducing TLB faults.

By default, 4 KB pages are used unless the user enables huge pages through
a kernel parameter or an obscure sysfs setting.

For Cycles benchmarks, this gives about a 5% CPU rendering performance
improvement. It likely also improves performance in other areas of Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/116663
2024-01-16 16:37:40 +01:00
Harley Acheson
0f8c8e475a UI: Improved Default GetWindowUnderCursor Behavior
For default GetWindowUnderCursor (when there is not a platform-specific
version), search windows in reverse order. This is because in most
cases with overlapping windows the one that is on top was created after
those that are below it.

Pull Request: https://projects.blender.org/blender/blender/pulls/111489
2024-01-15 20:27:47 +01:00
sjfricke
c9c01724b9 Vulkan: Add shaderClipDistance feature
Various GLSL shaders use gl_ClipDistance and without the feature
enabled validation layers errors are triggered

Pull Request: https://projects.blender.org/blender/blender/pulls/116530
2024-01-15 15:02:19 +01:00
Philipp Oeser
4da32e9334 Fix #106425: Mantaflow guiding with domains is broken
Caused by e968b4197b / 67e23b4b29

Since culprit commits, we are not running `MANTA::initGuiding` /
`fluid_alloc_guiding` if guiding is meant to be pulled from other
domains (it does work with effectors though). This is because atm. only
the `FLUID_DOMAIN_ACTIVE_GUIDE` flag sets `mUsingGuiding` to true
(activated in `update_obstacleflags`, so only for effectors).

So to fix this, we have to ensure that `MANTA::initGuiding` runs (also
if guiding is pulled from domains), but also make sure we dont run into
the crashes from T102257.

It seems that the real reason we were getting crashes in T102257 is that
67e23b4b29 made it so that resetting the cache (including a call to
`fluid_modifier_reset_ex`) in `fluid_modifier_processDomain` happens
**after** `FluidDomainSettings.active_fields` have been updated (this
happens in `update_flowsflags` & `update_obstacleflags`).
But `fluid_modifier_reset_ex` also resets
`FluidDomainSettings.active_fields`. If we then update pointers later in
`fluid_modifier_processDomain`, we never get anything in the guiding
related pointers for the new `mCurrentID` (specifically `mPhiGuideIn`
will be a nullptr). This is the real reason `initGuiding()` runs a
second time (it does once for `fluid_modifier_init` then again as a
consequence of the call to `manta_guiding`).

This patch proposes to move the resetting process from 67e23b4b29
**above** the refreshing of the `FluidDomainSettings.active_fields`,
this way these field stay intact, we do get the first run of
`initGuiding()` from `fluid_modifier_init`, manta pointers get updated
with intact fields afterwards (so we then get a valid `mPhiGuideIn`),
which then prevents the second run from `manta_guiding` to actually call
the python script again.

The fix from e968b4197b is then not needed and reverted in this patch.

This should be good for LTS I think.

Pull Request: https://projects.blender.org/blender/blender/pulls/117067
2024-01-15 12:31:44 +01:00
Damien Picard
3bd41cf9bc I18n: Go over TIP_ and IFACE_ usages, change to RPT_ when relevant
The previous commit introduced a new `RPT_()` macro to translate
strings which are not tooltips or regular interface elements, but
longer reports or statuses.

This commit uses the new macro to translate many strings all over the
UI.

Most of it is a simple replace from `TIP_()` or `IFACE_()` to
`RPT_()`, but there are some additional changes:
- A few translations inside `BKE_report()` are removed altogether
  because they are already handled by the translation system.
- Messages inside `UI_but_disable()` are no longer translated
  manually, but they are handled by a new regex in the translation
  system.

Pull Request: https://projects.blender.org/blender/blender/pulls/116804

Pull Request: https://projects.blender.org/blender/blender/pulls/116804
2024-01-12 13:37:32 +01:00