Commit Graph

9436 Commits

Author SHA1 Message Date
Sebastián Barschkis
ea78f9922e Fluid: Fixed assertion error
Fix for new assertion statements that were introduced in bfdc42d9906a.
2020-04-07 14:31:33 +02:00
Brecht Van Lommel
10f0e003a9 Fix T74572: adaptive sampling not scaling AOVs correctly 2020-04-06 23:23:48 +02:00
Brecht Van Lommel
e05552f7c4 Revert "Fix T74572: adaptive sampling not scaling render passes correctly"
This reverts commit 82a8da0ec38a70efde4a91957824c67d0e60b8ad. It was completely
wrong. Fixes T75388.
2020-04-06 23:23:48 +02:00
Sebastián Barschkis
71a52bbe2a Fluid: Ensure correct velocities for noise bake
Make sure that noise uses the unaltered velocity grid. This is particularly important once external velocities get added to the velocity grid.
2020-04-06 17:48:32 +02:00
Sergey Sharybin
5dde5dd44e Libmv: Use static scheduler for threading
For a real-world distortion the payload is quite uniformly
distributed across scanlines. Surely, in the corners more
iterations of minimizer is needed, but that happens in threads
without scheduling overhead.
2020-04-06 15:18:32 +02:00
Sergey Sharybin
7e93d4eea3 Tracking: Fix (un)distortion happen in single thread
Need to communicate available number of threads to the camera
intrinsics implementation, otherwise default value of 1 is used.

Must have been single-threaded for a very long time.
2020-04-06 15:18:32 +02:00
Sebastián Barschkis
70b061b4fd Fluid: Refactored caching in main Mantaflow class
This refactor cleans up code for the Manta file IO. It also improves the cache 'Replay' option.
2020-04-03 17:37:37 +02:00
Sebastián Barschkis
bfdc42d990 Fluid: Refactored MANTA class
Refactored the caching system so that return values are no longer ignored. The aim of this refactor was to make the caching more robust.
2020-04-03 17:37:25 +02:00
Brecht Van Lommel
80513d8574 Fix T75287: other Cycles render passes wrong when using Cryptomatte 2020-04-03 13:13:26 +02:00
Brecht Van Lommel
82a8da0ec3 Fix T74572: adaptive sampling not scaling render passes correctly 2020-04-03 13:13:26 +02:00
Campbell Barton
04fe37f931 Cleanup: quiet shadow warnings with ghost & mantaflow 2020-04-03 16:15:57 +11:00
Campbell Barton
d52326bab3 Cleanup: spelling 2020-04-03 12:38:04 +11:00
Julian Eisel
6eb409bb9c Fix warnings caused by own earlier commit
Caused by 34465a7fb091.
2020-04-02 18:46:12 +02:00
Brecht Van Lommel
12628e0794 Fix Cycles AVX unit test still failing to build with old GCC 2020-04-02 18:19:49 +02:00
Julian Eisel
34465a7fb0 VR: Refactor DirectX context management
All DirectX management happens on Ghost level now, higher level code can
just assume everything is OpenGL (except of the upside-down drawing that
still needs to be done for DirectX). This is similar to how the
metal-layer is hidden outside of Ghost.

The Ghost-XR graphics binding for DirectX is responsible for managing
the DirectX compatibility now.
2020-04-02 17:43:45 +02:00
Brecht Van Lommel
868d4526a8 Fix more build errors/warnings after recent AVX changes
Thanks to Sergey and Ray for the help identifying the problem.
2020-04-02 17:30:56 +02:00
Brecht Van Lommel
9672605938 Fix build error on Windows/Linux after recent AVX changes 2020-04-02 17:09:01 +02:00
Julian Eisel
53d029d6da Cleanup: Avoid complex template type for XR-Swapchain
I rather avoid types like
`std::vector<std::unique_ptr<GHOST_XrSwapchain>>`, which is easy to do
in this case.
2020-04-02 13:50:27 +02:00
OmarSquircleArt
f047d47e24 Cycles: AVX implantation of Perlin noise.
This patch adds an AVX implementation of Perlin noise in Cycles.
An avxi type was also added as a utility based on the respective
type in Intel Embree.

Only 3D and 4D noise were implemented, there is no benefit for
utilizing AVX in 1D and 2D noise. The SSE trilinear interpolation
function was used in the AVX implementation because there is no
benefit from using AVX in interpolating the last three dimensions.

Differential Revision: https://developer.blender.org/D6680
2020-04-01 14:48:01 +02:00
Julian Eisel
afe707cc3a Fix missing XR space destruction
I think destructing the XrSession would destruct this anyway, but rather
have this done explicitly, consistently and in a controlled manner.
2020-03-31 16:49:38 +02:00
Sebastián Barschkis
1280f3c0ae Fluid: Optimization for mesh file loading
Improved loading times for mesh files by reading bigger chunks of data from the disk at once.
2020-03-30 17:32:38 +02:00
Sebastián Barschkis
7d59f84708 Fluid: Optimization for liquid / secondary particle file loading
Improved loading times for particles files by reading bigger chunks of data from the disk at once.
2020-03-29 21:31:20 +02:00
Asher
e0030d53bc Fix key detection issues introduced by D7229
Removing the GHOST_kKeyUnknown check from processKeyEvent() produces
epeated unknown key events whenever a modifier key is held down, due
to the way ghost uses GHOST_kKeyUnknown as a filter value for modifier
key events.

Differential Revision: https://developer.blender.org/D7257
2020-03-27 20:59:20 -03:00
Daniel Santana
2632ba6703 Fix Optix build error after recent changes
Differential Revision: https://developer.blender.org/D7253
2020-03-27 14:26:26 +01:00
Charlie Jolly
1bb7d42cf6 Cleanup: Silence uninitialized variable warning 2020-03-27 11:12:27 +00:00
Sebastián Barschkis
5cf6689019 Fluid: Removed obstacle levelset optimization
Currently results in unstable particle behavior and incorrect meshing.
2020-03-27 00:16:34 +01:00
Aaron Carlisle
a921a4daad Mantaflow: remove reminents of high res smoke
It appears this slipped through the code review

Reviewed By: sebbas

Differential Revision: https://developer.blender.org/D6760
2020-03-26 16:29:08 -04:00
Ray Molenkamp
86c61ce64f Cycles: Restore cycles_cubin_cc to working order
Reviewed by: brecht pmoursnv
Differential Revision: https://developer.blender.org/D7136
2020-03-26 11:41:44 -06:00
Ray Molenkamp
58ea0d93f1 Cycles/Optix: Add CYCLES_OPTIX_TEST override
This works similarly to the CYCLES_OPENCL_TEST
environment variable to allow testing on unsupported
hardware.

Note: like the OPENCL test override, this is
for *testing* only and bug reports on unsupported
hardware will *not* be accepted at this point in
time.
2020-03-26 11:30:17 -06:00
Germano Cavalcante
1b1c683f74 Fix missing text input on Windows with certain keyboard layouts
Events for keys specific to certain keyboard layouts unknown to Blender
were ignored. Now pass them along as unknown key events for which we
can still handle text input, like we already do for Linux and macOS.

Differential Revision: https://developer.blender.org/D7229
2020-03-26 09:22:47 -03:00
Patrick Mours
bd2b1a67a7 Fix T74939: Random Walk subsurface appearance in OptiX does not match other engines
Random Walk subsurface scattering did look different with OptiX because transmittance is
calculated based on the hit distance, but the OptiX implementation of `scene_intersect_local`
would return the distance in world space, while the Cycles BVH version returns it in object
space. This fixes the problem by simply skipping the object->world transforms in all the
places using the result of `scene_intersect_local` with OptiX.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7232
2020-03-26 13:00:09 +01:00
Brecht Van Lommel
68e341e9d5 UI: remove non-unicode font and simplify default font loading code
There is no need to have another font embedded in the Blender executable, we
can assume the bundled font exists. In the future we may provide a fallback
if the font specified by the user in the preferences is missing a character,
but that can use our bundled international font.

Differential Revision: https://developer.blender.org/D6854
2020-03-25 16:39:58 +01:00
Brecht Van Lommel
f48d15a861 Cycles: limit number of processes compiling OpenCL kernel based on memory
The numbers here can probably be tweaked to be better, but it's hard to
predict and this should at least avoid excessive memory swapping.

Fixes T57064.
2020-03-25 16:39:37 +01:00
Sebastián Barschkis
04ab677761 Fluid: Small fix for secondary particles
Small tweak to ensure index will not run out of bounds during secondary particle computation.
2020-03-25 16:08:05 +01:00
Brecht Van Lommel
394a1373a0 Cycles: use OpenCL C 2.0 if available, to improve performance for AMD
Tested with AMD Radeon Pro WX 9100, where it brings performance back to 2.80
level, and combined with recent changes is about 2-15% faster than 2.80 in
our benchmark scenes.

This somehow appears to specifically address the issue where adding more shader
nodes leads to slower runtime. I found no additional speedup by applying this
to change to 2.80 or removing the new shader node code.

Ref T71479

Patch by Jeroen Bakker.

Differential Revision: https://developer.blender.org/D6252
2020-03-24 20:09:36 +01:00
Brecht Van Lommel
5801a016d4 Cycles: slightly improve OpenCL performance by reordering SVM enum values
Ref T71479
2020-03-24 16:49:46 +01:00
Brecht Van Lommel
2bec6f1f06 Cycles: work around OpenCL performance regression after AOVs and vector rotate
We appear to be hitting some limit where adding any amount of code causes a
significant performance regression, no matter what it does. To work around
that a new node level was added.

Ref T71479
2020-03-24 16:49:46 +01:00
Brecht Van Lommel
f8a4fb43fb Cleanup: remove unused Cycles kernel feature flags, replace by node levels 2020-03-24 16:49:46 +01:00
Sebastián Barschkis
cda81d5a4d Fluid: Enforce minimum thickness to planar flow / effector objects
Planar object now have a thickness by default. This should make it more intuitive for users as there is no need to specify an object thickness.
2020-03-23 23:50:39 +01:00
Sebastián Barschkis
e9629e3cfd Fluid: Use different phi for levelset generation
Phi that is used for mesh should be the one that matches particles best.
2020-03-23 23:50:39 +01:00
Sebastián Barschkis
0c571db4ad Fix T73988: Mantaflow fluid simulation - Particles for Spray, Foam and Bubbles are one frame ahead of Mesh
Fixes an issue with secondary particles being out of sync with the main simulation. Cleaned up the secondary particle code in general too (making sure that all solver attributes - timestep, framelength, etc. - are set correctly).
2020-03-22 21:46:43 +01:00
Ray Molenkamp
44c6b6615b OpenCL: Bring back CYCLES_OPENCL_TEST override
Back in 2.79 you could either use the debug panel or an
environment variable to override using OpenCL for unsupported
hardware. Which was rather useful for developers when testing
on NVidia just to be sure the CL kernels at-least build properly.

This broke in rB949ab753bb2

This diff restores testing though the CYCLES_OPENCL_TEST
environment variable.

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

Reviewers: brecht
2020-03-21 11:55:45 -06:00
3033b2a044 Fix T73372: cryptomatte not filling last pass for odd number of levels
Make logic consistent with the render pass creation in Python.
2020-03-21 15:04:12 +01:00
6777956005 Fix T68370, T74973: Cycles cryptomatte not working when other passes are enabled
Solution found by Blazej Floch.
2020-03-20 15:59:24 +01:00
db65a6e0fb Fix T74345: missing albedo for Cycles principled hair BSDF 2020-03-20 15:23:39 +01:00
0127e8522a Fix Python error in Cycles baking panel 2020-03-20 14:25:16 +01:00
Campbell Barton
85dc8d7477 Cleanup: sort file, struct lists 2020-03-20 12:19:44 +11:00
Campbell Barton
35e3abb912 Cleanup: remove old header conventions recently re-introduced 2020-03-20 12:19:09 +11:00
Brecht Van Lommel
4b74b35322 Fix Cycles crash in Windows debug mode with volumes 2020-03-19 20:02:33 +01:00
Germano Cavalcante
e1b2ded7b2 Fix build WITH_CXX_GUARDEDALLOC 2020-03-19 14:42:04 -03:00