Commit Graph

9772 Commits

Author SHA1 Message Date
Lukas Stockner 6dabfacb38 Sky: Code style and formatting fixes
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:11 +02:00
Lukas Stockner 6a3c91f7ad Cycles: Clamp Sky Texture altitude to avoid numerical issues
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:11 +02:00
Lukas Stockner 7aacf2e119 Cycles: Account for Sky Texture mapping in the sun sampling code
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:11 +02:00
Lukas Stockner 192bd2605f Cycles: Change precomputed Sky Texture mapping to prioritize the horizon
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:11 +02:00
Lukas Stockner 41e6f9bd43 Cycles: Add control for sun intensity in Sky Texture and change altitude to km
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:11 +02:00
Lukas Stockner 474dcbcf12 Cycles: Remove limits on the Sky texture's sun rotation
For animation/driver purposes, being able to go outside of the 0-360
range makes things easier.

Differential Revision: https://developer.blender.org/D8091
2020-07-13 02:00:24 +02:00
Campbell Barton 651db1b26f Cleanup: spelling 2020-07-11 15:32:59 +10:00
Brecht Van Lommel 3dc0178390 Fix T78662: Cycles baking fails if denoising is enabled, after recent changes
This is not supported yet.
2020-07-10 20:08:46 +02:00
Brecht Van Lommel 6fbacd6048 Fix build error building without OpenImageDenoise 2020-07-10 19:56:53 +02:00
Brecht Van Lommel 48f10319c6 Fix T78801: Eevee missing setting to enable/disable freestyle per view layer
This was only visible when Cycles was enabled.
2020-07-10 18:41:16 +02:00
Brecht Van Lommel 6eeb32706a Cycles: support OpenImageDenoise in final renders
Performance is not great currently due to the API not seeming to support
efficient denoising of multiple tiles at the same time. So in many cases
only one or a few threads will actually be denoising at the same time.

In renders with many samples this is not a big problem, but for faster
renders it's a signficant overhead.

We should try to optimize this still, possibly by batching denoising of
a bigger neighborhood of multiple tiles at once.
2020-07-10 17:10:05 +02:00
Brecht Van Lommel 93791381fe Cleanup: reduce hardcoded numbers in denoising neighbor tiles code 2020-07-10 17:10:05 +02:00
Brecht Van Lommel e65c78cd43 Cleanup: minor refactoring in Cycles update detection code 2020-07-10 17:10:05 +02:00
Milan Jaros ad45b8d6a4 Cycles: optimize camera inside volume tests
Only run when there are volumes in the scene, and compute in parallel.

Ref T56939

Differential Revision: https://developer.blender.org/D8261
2020-07-10 17:10:05 +02:00
Brecht Van Lommel d8e648c352 Fix T78776: Cycles OpenCL error after recent changes for holdouts 2020-07-10 17:10:05 +02:00
Campbell Barton a148c4676b Cleanup: spelling 2020-07-10 16:04:09 +10:00
Brecht Van Lommel a90b69d065 Build: add more libc compatibility functions for upcoming libraries update
These are needed by the x264 library.
2020-07-09 18:10:05 +02:00
Brecht Van Lommel 2be0ae7c99 Fix Cycles unnecessary updates to camera in viewport render
Problem identified by Milan Jaros.
2020-07-09 16:53:28 +02:00
Szymon Ulatowski 9de09220fc EEVEE: Implement the missing Sky texture
I'm not sure if the Sky was deliberately left out or was just waiting for a
better moment, but so many I was disappointed that Sky in EEVEE is
completely white.

There are already 2 implementations (osl and gpu) so this is the third one.
Looking at other cases it seems that we are not supposed to share sources
between cycles and the rest? So the new util_sky_model files are just
copies of what is already in cycles, except that the data file uses the RGB
variant of the Hosek/Wilkie model, because we output RGB anyway (but can be
easily changed to XYZ if desired - the results are nearly identical).
I am not sure if it is okay to pass 3*9 float values as 3 mat4 uniforms (I
wanted to use mat3 but it does not work).
Also, should I cache the sky model data between renders if the parameters
do not change?

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D7108
2020-07-09 17:31:36 +02:00
Brecht Van Lommel 6435acd8f6 Cycles: support shader transparency for holdout objects
Now transparent areas of the object will render objects behind.

Fixes T78728.
2020-07-08 13:18:19 +02:00
Sergey Sharybin 643196cc37 CMake: Fix spelling of Embree passed to find package
The spelling and capitalization of package name passed to find_package()
and find_package_handle_standard_args() needs to match.

Silences CMake warning about mismatch.

Differential Revision: https://developer.blender.org/D8247
2020-07-08 12:35:56 +02:00
Lukas Stockner 7fcb6bc59c Fix T78324: Different Sky Texture results between CPU and GPU
The problem here was numerical precision: The code calculates the angle between
sun and view direction, and the usual acos(dot(a, b)) approach for that has
poor numerical performance for almost parallel angles.

As a result, the generally tiny difference between floating point computation
between CPU and GPU was enough to make the sun vanish at different radii,
causing different results.

The new version fixes the difference by making the computation much more robust
on both platforms.
2020-07-08 02:15:37 +02:00
Jacques Lucke eb5fb1741d Cleanup: don't end description with a '.' 2020-07-07 20:29:35 +02:00
Patrick Mours 737bd549b6 Cycles: Add support for native OptiX curve primitive
This patch adds support for the curve primitive from OptiX to Cycles. It's currently hidden
behind a debug option, since there can be some slight rendering differences still (because no
backface culling is performed and something seems off with endcaps). The curve primitive
was added with the OptiX 7.1 SDK and requires a r450 driver or newer, so this also updates
the codebase to be able to build with the new SDK.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8223
2020-07-07 15:39:02 +02:00
Brecht Van Lommel 95f0f31279 Fix T78692: improve UI regarding the effect of the denoiser on denoising passes
It wasn't obvious that the choice of Cycles denoiser also generates different
denoising data passes for compositing.
2020-07-07 15:12:41 +02:00
Brecht Van Lommel a394aac8b4 Fix T78666: Cycles non-uniformly scaled hair renders wrong for static objects
Don't apply the matrix transform optimization in this case, curve points and
radius can't represent non-uniform scale the way is possible with triangle
meshes and vertices.

This would cause abrupt change if objects had e.g. motion blur in one frame
and not in the next.
2020-07-07 15:08:21 +02:00
Jacques Lucke 02cd159539 Cleanup: add comment explaining operator delete 2020-07-07 12:31:25 +02:00
Jacques Lucke 5761cb9ee2 Guarded Allocator: add missing operator delete
This resolves warning C4291 on windows.
2020-07-07 11:52:45 +02:00
Johan Walles 80fe5e1b15 UI: Add units to motion tracking solve errors
The unit being "pixels".

Before this change the solve errors were unitless in the UI.

With this change in place, the UI is now clear on that the unit of the
reprojection errors is pixels (px).

Differential Revision: https://developer.blender.org/D8000
2020-07-07 11:22:12 +02:00
Campbell Barton 0c58970da7 Cleanup: spelling 2020-07-07 12:49:13 +10:00
Patrick Mours 1562c9f031 Fix OptiX viewport denoising not working when rendering scene (without OptiX) that uses unsupported features
Denoising devices do not need to load the full feature set of kernels, so only activate the denoising
feature for them (so that it is possible to use features that are supported by the render devices, but
not the denoising devices).
2020-07-06 17:33:04 +02:00
Sybren A. Stüvel bfc644dcfb Reduce `DupliObject::persistent_id` from 16 to 8 items
For historical reasons, `DupliObject::persistent_id` was of size
`2*MAX_DUPLI_RECUR`. These reasons are now gone, and the persistent ID
always gets exactly one array element for every dupli-recursion.

Differential Revision: https://developer.blender.org/D8222

Reviewed by: brecht
2020-07-06 16:52:28 +02:00
Sebastian Parborg d7dbf90a02 Clang-tidy: Enable braces-around-statements warning 2020-07-03 21:23:33 +02:00
Hans Goudey 19ff145e66 Clang-Tidy: Enable readability-redundant-control-flow 2020-07-03 09:41:55 -04:00
Jacques Lucke 1e255ce031 Fix T72214: Fluids: noise does not work with negative frame numbers
The issue is duplicated code. There are two functions that zero-fill
the frame number. They worked the same for positive frames numbers, but
behaved differently for negative ones.

On frame `-100`, `BLI_path_frame` outputs `-0100` and
`fluid_cache_get_framenr_formatted_$ID$` outputted `-100`.

I changed the behavior of the latter, because we depend on the behavior
of the former for much longer already.

Reviewers: sebbas

Differential Revision: https://developer.blender.org/D8107
2020-07-03 15:27:02 +02:00
Brecht Van Lommel 4ccd96f1a4 Cycles: rename viewport denoise Fastest option to Automatic and extend tooltip 2020-07-03 12:36:17 +02:00
Sergey Sharybin 468adfa4fd Guarded allocator: Override placement new operator
Allows to in-place construct objects which are using guarded allocator.
2020-07-03 12:30:20 +02:00
Sebastián Barschkis b1d3850333 Cleanup: Fluid renaming from old 'manta' naming to new 'fluid' naming
Changed variable names from mmd, mds, mfs, and mes to fmd, fds, ffs, and fes. The author of this commits lights a candle for all the merge conflicts this will cause.
2020-07-03 11:52:08 +02:00
Sergey Sharybin 746aec51a7 Cycles: Use TBB's spin mutex
First benefit is reduced boilerplate code.

Second benefit is fixed warnings about using deprecated spin lock
on macOS when using SDK 10.12 and above.

Differential Revision: https://developer.blender.org/D8182
2020-07-03 11:14:26 +02:00
Campbell Barton a272a2a6cd Cleanup: spelling 2020-07-03 11:58:13 +10:00
Campbell Barton 26ffed7466 Cleanup: spelling 2020-07-02 13:03:46 +10:00
Brecht Van Lommel 792cb8bdc7 Fix T77984: Cycles OpenCL error rendering empty scene 2020-07-01 20:01:25 +02:00
Aaron Carlisle f228a8948b Cleanup: Two two spaces around python class 2020-07-01 12:36:00 -04:00
Campbell Barton 36d6aa428f Cleanup: spelling 2020-07-01 13:12:24 +10:00
Aaron Carlisle 3562be2bda UI: Cycles: Use Split layout for object motion blur 2020-06-30 13:23:12 -04:00
Brecht Van Lommel d4b9b2c020 Cycles: bump version to 1.13, matching Blender 2.90 release cycle 2020-06-30 18:12:08 +02:00
Brecht Van Lommel 6ac235a6f7 Fix T78038: Cycles crash rendering with volume object and motion blur 2020-06-30 17:36:02 +02:00
Brecht Van Lommel 4e9ed1dae9 Fix T78447: Cycles vertex color node not working with hair 2020-06-30 14:36:52 +02:00
Campbell Barton b838a51803 Cleanup: spelling 2020-06-30 20:54:31 +10:00
Campbell Barton 84f8b47c4c Cleanup: clang-format 2020-06-30 20:50:37 +10:00