Commit Graph

9453 Commits

Author SHA1 Message Date
Nicholas Rishel
1a3928f33c Fix T75546: Solve possible endless loop in wintab initialisation
Some Wintab drivers report a zero length queue, this causes an unplanned never ending loop.

Differential Revision: https://developer.blender.org/D7392
Reviewed by: Ray Molenkamp
2020-04-09 16:43:09 -06:00
Bartosz Moniewski
054950def9 Shading: add Roughness input to Noise and Wave texture nodes
Currently in fractal_noise functions, each subsequent octave doubles the
frequency and reduces the amplitude by half. This patch introduces Roughness
input to Noise and Wave nodes. This multiplier determines how quickly the
amplitudes of the subsequent octaves decrease.

Value of 0.5 will be the default, generating identical noise we had before.
Values above 0.5 will increase influence of each octave resulting in more
"rough" noise, most interesting pattern changes happen there. Values below
0.5 will result in more "smooth" noise.

Differential Revision: https://developer.blender.org/D7065
2020-04-09 21:48:03 +02:00
Campbell Barton
19352bca16 Cleanup: spelling 2020-04-05 22:22:21 +10:00
Brecht Van Lommel
c13aa95eda Fix T75288: crash in Cycles image loading with multithreaded shader compilation 2020-04-08 22:01:04 +02:00
Brecht Van Lommel
cc53c9e476 Fix T75290: Cycles crash with out of bounds memory access in volume mesh build 2020-04-08 21:58:17 +02:00
Brecht Van Lommel
8360bfb75c Cleanup: clang-format 2020-04-08 21:58:17 +02:00
Sebastián Barschkis
020d1e23ae Fluid: Fix issue with mesh not being loaded
Fixed an issue that was likely introduced in a past cleanup.
2020-04-08 16:26:20 +02:00
Brecht Van Lommel
91d7f5d246 Fix T74572: adaptive sampling still not working correct with shader AOVs 2020-04-08 14:09:10 +02:00
Brecht Van Lommel
fd487b1f4e Fix build error with WITH_X11_XINPUT=OFF after recent changes 2020-04-08 14:03:54 +02:00
Sebastián Barschkis
c2cb87f897 Fluid: Fix problem with inconsistent noise when using multiple adaptive time-steps
Problem was mentioned in T74062.
2020-04-08 13:27:12 +02:00
Nicholas Rishel
ea3e0b3e8c Windows: support high resolution tablet pen events for Wintab
Together with Windows Ink support, this should fully resolve T70765.

Differential Revision: https://developer.blender.org/D6675
2020-04-08 12:25:40 +02:00
Nicholas Rishel
d571d615a5 Windows: support high resolution tablet pen events for Windows Ink
Rather than using the last state of the tablet, we now query the history of
pointer events so strokes can follow the pen even if Blender does not handle
events at the same rate.

Differential Revision: https://developer.blender.org/D6675
2020-04-08 12:25:40 +02:00
Nicholas Rishel
3d8c57f4da Cleanup: minor refactoring of pointer event handling
Ref D6675
2020-04-08 12:25:40 +02:00
Nicholas Rishel
4e4bf241c8 Cleanup: add utility functions for milliseconds conversion
Ref D6675
2020-04-08 12:25:40 +02:00
Brecht Van Lommel
c43473e884 Cleanup: remove GHOST API to query tablet state from Window
It's not used by Blender anymore and it's unreliable since this state really
only makes sense associated with events in a particular order.

Ref D6675
2020-04-08 12:25:40 +02:00
Brecht Van Lommel
53981c7fb6 Cleanup: refactor adaptive sampling to more easily change some parameters
No functional changes yet, this is work towards making CPU and GPU results
match more closely.
2020-04-07 20:29:48 +02:00
Sebastián Barschkis
4a83832120 Fix T74828: Fluid: Crash with Fire/Smoke Noise
Issue was that the noise simulation was trying to bake with a minimized domain size (adaptive domain initializes domain with size (1,1,1)). Similarly to the base resolution bake, there should be no noise baking happening at those domain sizes - a domain at this size is considered empty.
2020-04-07 14:31:33 +02:00
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