Commit Graph

8746 Commits

Author SHA1 Message Date
Sergey Sharybin 03013c2317 Cycles: Keep all hair strands
Previously, hair strands of zero length of too few control
points would have been ignored. This is fine for a render
without motion blur. But once motion blur is enabled it is
becoming more tricky to match topology.

Even more, it was causing access (and possibly writes) past
the array boundaries in case when time step 0 ignored some
strands and steps around it did not.

If this is becoming problematic for BVH to do reliable
intersections this is to be solved on the BVH builder side.
The export from Blender to Cycles shouldn't really make
decisions there.
2019-02-18 15:25:10 +01:00
Bastien Montagne 4c3d486f69 Fix broken Cycles test build after recent commit.
Broken by rB4ce9785e0158, please do full complete build before
committing!
2019-02-18 15:00:17 +01:00
William Reynish 61a9f41cf5 UI: bake panel layout improvements
All the controls were just really thrown in there without any proper
organization.
This gives it more structure.

- Correct use of sub-panels to communicate hierarchy and sections.
- Use flow layout for toggles.
- Use consistent names for "Bake Type".
2019-02-18 14:50:42 +11:00
Campbell Barton de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton 3316853323 Cleanup: conform headers to have license first
Also remove doxy comments for licenses and add missing GPL header.
2019-02-18 08:22:11 +11:00
Brecht Van Lommel c5f13ecbc0 Merge branch 'blender2.7' 2019-02-17 15:57:34 +01:00
Brecht Van Lommel 8a97b85555 Fix T54504: Cycles wrong backwards compatibility with linked libraries.
The code assumed all datablocks were read from .blend files saved with the
same version. This restructures the Cycles versioning code to take into
account libraries.
2019-02-17 15:41:42 +01:00
Sergey Sharybin 6e40e3489f Add global control over disabling high-resolution smoke draw
Can be found in the viewport's simplify panel, allows to easily
disable high-res display for all the smokes in the scene.
2019-02-15 17:55:24 +01:00
Brecht Van Lommel 9800837b98 Cycles: Support multithreaded compilation of kernels
This patch implements a workaround to get the multithreaded compilation from D2231 working.
So far, it only works for Blender, not for Cycles Standalone. Also, I have only tested the Linux codepath in the helper function.
Depends on D2231.

Patch by lukasstockner97, jbakker, brecht

    job    |   scene_name    | compilation_time
----------+-----------------+------------------
    Baseline | empty           |            22.73
    D2264    | empty           |            13.94
    Baseline | bmw             |            56.44
    D2264    | bmw             |            41.32
    Baseline | fishycat        |            59.50
    D2264    | fishycat        |            45.19
    Baseline | barbershop      |           212.28
    D2264    | barbershop      |           169.81
    Baseline | victor          |            67.51
    D2264    | victor          |            53.60
    Baseline | classroom       |            51.46
    D2264    | classroom       |            39.02
    Baseline | koro            |            62.48
    D2264    | koro            |            49.03
    Baseline | pavillion       |            54.37
    D2264    | pavillion       |            38.82
    Baseline | splash279       |            47.43
    D2264    | splash279       |            37.94
    Baseline | volume_emission |           145.22
    D2264    | volume_emission |           121.10

This patch reduced compilation time as the split kernels and base
kernels are compiled in parallel. In cycles debug mode (256) you can set
unmark the opencl single program file, what reduces the compilation time
even further (bmw 17 seconds, barbershop 53 seconds).

Reviewers: brecht, dingto, sergey, juicyfruit, lukasstockner97

Reviewed By: brecht

Subscribers: Loner, jbakker, candreacchio, 3dLuver, LazyDodo, bliblubli

Differential Revision: https://developer.blender.org/D2264
2019-02-15 08:56:20 +01:00
Brecht Van Lommel 4ce9785e01 Cycles: Support multithreaded compilation of kernels
This patch implements a workaround to get the multithreaded compilation from D2231 working.
So far, it only works for Blender, not for Cycles Standalone. Also, I have only tested the Linux codepath in the helper function.
Depends on D2231.

Reviewers: brecht, dingto, sergey, juicyfruit, lukasstockner97

Reviewed By: brecht

Subscribers: Loner, jbakker, candreacchio, 3dLuver, LazyDodo, bliblubli

Differential Revision: https://developer.blender.org/D2264
2019-02-15 08:49:25 +01:00
Brecht Van Lommel 7a41c1634b Merge branch 'blender2.7' 2019-02-14 20:00:37 +01:00
Brecht Van Lommel de0e456a6c Cleanup: fix compiler warnings. 2019-02-14 19:39:39 +01:00
Brecht Van Lommel 9886ae6331 Fix T61470: incorrect saturation clamping in recent bugfix.
We should clamp the result after multiplication.
2019-02-14 19:28:44 +01:00
Brecht Van Lommel fb6f1aa12f Fix Cycles Embree crash on macOS, due to too small thread stack size. 2019-02-14 17:21:55 +01:00
Brecht Van Lommel 93d11edd7e Fix Cycles build error with OpenImageIO 2.x. 2019-02-14 17:20:43 +01:00
Brecht Van Lommel dbd9b7590a Merge branch 'blender2.7' 2019-02-13 19:02:43 +01:00
Brecht Van Lommel ec559912fb Fix T61470: inconsistent HSV node results with saturation > 1.0.
Values outside the 0..1 range produce negative colors, so now clamp to that
range everywhere. Also fixes improper handling of hue > 2.0 in some places.
2019-02-13 17:06:30 +01:00
Brecht Van Lommel 79f5b825a9 Fix T61502: Cycles wrong other object texture coordinates in OSL.
The row/column major matrix conversion was done twice.
2019-02-13 15:03:08 +01:00
Brecht Van Lommel 74a3d9b410 Merge branch 'blender2.7' 2019-02-13 14:34:26 +01:00
Brecht Van Lommel 1bbe770030 Fix missing Cycles cryptomatte metadata in renders. 2019-02-13 14:34:17 +01:00
Brecht Van Lommel 3866161da8 Fix T61457, T61489, T61482: build errors and memory warning in Cycles.
For OIIO 2.x we must use unique_ptr. This also required updating the
guarded allocator for std::move to work. Since C++11 construct/destroy
have a default implementation that also works this case, so we just
leave it out.
2019-02-13 14:00:36 +01:00
Brecht Van Lommel d8888b2f48 Merge branch 'blender2.7' 2019-02-11 18:39:31 +01:00
Brecht Van Lommel 2a9c8da709 Cycles: add animation denoising test, fix operator to work with single frames. 2019-02-11 18:37:02 +01:00
Sergey Sharybin 9efbc8d76f Cycles: backport samples metadata format changes to 2.7.
The render layer name is now always included. Best to keep these consistent,
so that animation denoising and sample merging works the same for both and
tests can be the same. Ref D4311.
2019-02-11 18:18:32 +01:00
Brecht Van Lommel b8d4f06b10 Merge branch 'blender2.7' 2019-02-11 15:25:46 +01:00
Brecht Van Lommel 9359200956 Fix build error on macOS after recent changes. 2019-02-11 15:03:28 +01:00
Lukas Stockner e379a9ba91 Cycles: add animation denoising Python operator.
This adds a cycles.denoise_animation operator, which denoises an animation
sequence or individual file. Renders must be saved as multilayer EXR files
with denoising data passes.

By default file path and frame range come from the current scene, and EXR
files are denoised in-place. Alternatively, a different input and/or output
file path can be provided.

Denoising settings come from the current view layer. Renders can be denoised
again with different settings, as the original noisy image is preserved along
with other passes and metadata.

There is no user interface yet for this feature, that comes later.

Code by Lukas with modifications by Brecht. This feature was originally
developed for Tangent Animation, thanks for the support!

Differential Revision: https://developer.blender.org/D3889
2019-02-11 13:39:08 +01:00
Brecht Van Lommel 3f8e263709 Merge branch 'blender2.7' 2019-02-11 13:37:45 +01:00
Lukas Stockner c10f5d15c2 Cycles: add animation denoising Python operator.
This adds a cycles.denoise_animation operator, which denoises an animation
sequence or individual file. Renders must be saved as multilayer EXR files
with denoising data passes.

By default file path and frame range come from the current scene, and EXR
files are denoised in-place. Alternatively, a different input and/or output
file path can be provided.

Denoising settings come from the current view layer. Renders can be denoised
again with different settings, as the original noisy image is preserved along
with other passes and metadata.

There is no user interface yet for this feature, that comes later.

Code by Lukas with modifications by Brecht. This feature was originally
developed for Tangent Animation, thanks for the support!
2019-02-11 13:32:54 +01:00
Brecht Van Lommel 382fe85e29 Cycles: refactor Blender device settings handling into own file. 2019-02-11 12:53:24 +01:00
Brecht Van Lommel 17300991c3 Fix wrong Cycles render status text when only writing denoising passes.
In that case we do prefiltering for the denoising passes, but don't actually
denoise the image.
2019-02-07 20:59:48 +01:00
Brecht Van Lommel 6fdc688cd0 Windows: refactor GHOST wintab handling.
This is backporting a change from 2.8, which may help solve crashes when
activating a window. Previously bringTabletContextToFront() would call
tablet API functions with NULL tablet, which may crash on some drivers.

Ref T60811.
2019-02-07 15:30:59 +01:00
Sergey Sharybin 8c87af7440 Improvements and fixes to Cycles metadata
This is a request by the studio here to make it possible to see how
many samples were used to render a specific shot or a frame. It is a
bit more tricky than simply stamping number of samples from a scene
since rendering is happening in multiple ranges of samples.

This change makes it so Cycles saves configured number of samples for
the specific view layer, and also stores start sample and number of
samples when rendering only a subrange of all samples.

The format used is "cycles.<view_layer_name>.><field>", which allows
to have information about all layers in a multi-layer EXR file.

Ideally we can store simplified "cycles.<field>" if we know that there
is only one render layer in the file, but detecting this is somewhat
tricky since Cycles operates on an evaluated scene which always have
single view layer.

The metadata is shown in the Metadata panels for clip, image and
sequencer spaces.

Example screenshot which shows the metadata:

{F6527727}

Reviewers: brecht

Reviewed By: brecht

Subscribers: fsiddi

Differential Revision: https://developer.blender.org/D4311
2019-02-06 16:11:51 +01:00
Brecht Van Lommel e21ae0bb26 Merge branch 'blender2.7' 2019-02-06 15:22:53 +01:00
Lukas Stockner fccf506ed7 Cycles: animation denoising support in the kernel.
This is the internal implementation, not available from the API or
interface yet. The algorithm takes into account past and future frames,
both to get more coherent animation and reduce noise.

Ref D3889.
2019-02-06 15:18:42 +01:00
Lukas Stockner c183ac73dc Cycles: tweak outlier detection, preparing for animation denoising.
Ref D3889.
2019-02-06 15:18:38 +01:00
Lukas Stockner 405cacd4cd Cycles: prefilter feature passes separate from denoising.
Prefiltering of feature passes will happen during rendering, which can
then be used for denoising immediately or written as a render pass for
later (animation) denoising.

The number of denoising data passes written is reduced because of this,
leaving out the feature variance passes. The passes are now Normal,
Albedo, Depth, Shadowing, Variance and Intensity.

Ref D3889.
2019-02-06 15:18:29 +01:00
Campbell Barton eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton ab5e69e660 Cleanup: remove contributors for CMake files
Following removal from C source code.

See: 8c68ed6df1
2019-02-05 09:10:32 +11:00
Pablo Vazquez 3be845ce20 Cleanup: Typos in comments (to to) 2019-02-04 01:23:48 +01:00
Campbell Barton 744f633986 Cleanup: trailing commas
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
Campbell Barton 4ef09cf937 Cleanup: remove author/date info from doxy headers 2019-02-02 11:58:24 +11:00
Campbell Barton a3bf8da875 Merge branch 'blender2.7' 2019-02-02 09:37:50 +11:00
Brecht Van Lommel 81159e99b8 Fix T61078: Cycles crash with adaptive smoke sim playback.
3D image dimensions should be updated on the Cycles side before loading
the smoke data.
2019-02-01 19:08:49 +01:00
Campbell Barton d70350403f Cleanup: manually remove header text not handled by automation 2019-02-02 02:41:25 +11:00
Campbell Barton 8c68ed6df1 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 02:40:00 +11:00
Campbell Barton 3b57a0d854 Cleanup: remove original author
Missed when removing contributors.
2019-02-02 02:32:20 +11:00
Campbell Barton 6cbb4c576a Cleanup: manually remove header text not handled by automation 2019-02-02 01:49:31 +11:00
Campbell Barton 65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Brecht Van Lommel 92fa42f2ce Fix T60973: crash baking objects disabled for rendering. 2019-01-31 18:12:26 +01:00
Brecht Van Lommel f4b1f1f0be Merge branch 'blender2.7' 2019-01-30 18:36:54 +01:00
Sybren A. Stüvel 7744203b7f Cycles: improved rounding of sample chunks for resumable renders
When using `--cycles-resumable-num-chunks N` to render a subset of the
samples, having N close to the total number of samples causes rounding
issues.

For example, a file configured for 250 samples and 150 chunks should
have 1.6666 sample per chunk. The old code rounded this to 2 samples per
chunk, which would result in too many samples being rendered. When
rendering a single chunk this doesn't matter much, but when larger chunk
ranges are rendered with `--cycles-resumable-start-chunk` and
`--cycles-resumable-end-chunk` the rounding errors start to add up.

By multiplying with the number of chunks to render first, and only round
to integers after that, this issue is solved. In the above example,
rendering 3 chunks will correctly render 5 samples rather than 6.

When the requested number of chunks is larger than the number of samples
there will be duplicate samples (that is, sample N appearing both in
chunk M and M+1). In this case a warning is printed to stderr.

This is needed for T50977 Progressive render: use non-uniform sample
chunks.

Reviewed by: sergey

Differential Revision: https://developer.blender.org/D4282
2019-01-30 10:51:06 +01:00
Brecht Van Lommel 001414fb2f Cycles: delay CUDA and OpenCL initialization to avoid driver crashes.
We've had many reported crashes on Windows where we suspect there is a
corrupted OpenCL driver. The purpose here is to keep Blender generally
usable in such cases.

Now it always shows None / CUDA / OpenCL in the preferences, and only when
selecting one will it reveal if there are any GPUs available. This should
avoid crashes when opening the preferences or on startup.

Differential Revision: https://developer.blender.org/D4265
2019-01-29 17:00:02 +01:00
Campbell Barton 68ae1f4958 Fix CLOG_STR_AT_SEVERITY macro
Part of D4277 by @sobakasu
2019-01-29 17:28:44 +11:00
Campbell Barton f8ce24f796 Cleanup: sort forward declarations of enum & struct
Done using:
  source/tools/utils_maintenance/c_sort_blocks.py
2019-01-28 22:12:49 +11:00
Brecht Van Lommel 409a21b32e Merge branch 'blender2.7' 2019-01-28 12:05:51 +01:00
Brecht Van Lommel d918217d35 OSL: remove fresnel template that was not public domain.
Convention is to only have public domain code templates. Also fixes wrong
license header in Cycles.
2019-01-28 12:04:54 +01:00
Brecht Van Lommel 801901a652 Fix T57069: macOS window contents scaling bug.
The cause of this is unclear, but delaying querying the native pixel size
appears to help in the one case I could reproduce.
2019-01-28 12:01:29 +01:00
Campbell Barton c0f88ed8a8 Cleanup: sort forward declarations of enum & struct
Done using:
  source/tools/utils_maintenance/c_sort_blocks.py
2019-01-28 21:17:58 +11:00
Brecht Van Lommel 690478027b Merge branch 'blender2.7' 2019-01-27 20:17:11 +01:00
Brecht Van Lommel d377cd5db1 Fix Cycles standalone build as part of Blender. 2019-01-27 20:05:25 +01:00
Brecht Van Lommel 94d88df3a8 Merge branch 'blender2.7' 2019-01-26 15:54:13 +01:00
Robert Guetzkow 115e1d441b Cycles: add missing units for properties.
Differential Revision: https://developer.blender.org/D4258
2019-01-26 15:38:50 +01:00
Brecht Van Lommel 8d4c4775a0 Cleanup: fix compiler warnings. 2019-01-26 14:49:11 +01:00
Dalai Felinto 699b49e8e9 Fix T58142: Crash when use Cycles to render stereoscopy
This is a quick workaround to prevent the crashes with multi-view.
The ultimate solution can be plenty, and would turn around refactoring
Cycles to handle multi-view internally, so that depsgraph could be freed
before render with no problems.

Reviewers: brecht, sergey

For the complete discussion check: https://developer.blender.org/D4239
2019-01-25 16:04:26 -02:00
Campbell Barton 4b8b7c821d Cleanup: sort cmake file lists 2019-01-25 08:49:51 +11:00
Campbell Barton 2218bf02dd Cleanup: sort cmake file lists 2019-01-25 08:30:33 +11:00
Brecht Van Lommel 63bacfed4b Merge branch 'blender2.7' 2019-01-24 19:02:10 +01:00
Brecht Van Lommel 6260b3c15e Fix T60597, T60806: Cycles crash rendering principled BSDF + volume interior.
The integrator maximum number of closures was not set properly for the CPU/mega
kernels to match the actual available memory. Before relatively recent code
refactoring we did not use this value in those kernels so it worked fine.
2019-01-24 18:05:42 +01:00
Philipp Oeser 6100dc6a20 bring back possibility to override camera per view
this can now be found in the sidebar View panel

- uses existing 'lock_camera_and_layers' but renames the property to
'use_local_camera'
- uses RNA_def_property_boolean_negative_sdna to flip the value
- remove the local view code in
rna_SpaceView3D_lock_camera_and_layers_set
- update Python code
- update Addons code will be separate commit

Fixes T60756

Reviewers: billreynish, brecht

Maniphest Tasks: T60756

Differential Revision: https://developer.blender.org/D4247
2019-01-24 17:25:22 +01:00
Brecht Van Lommel 8be7ed1408 Merge branch 'blender2.7' 2019-01-24 15:44:06 +01:00
Brecht Van Lommel 3a527357a5 Cycles: change default displacement method to bump mapping again.
Even though it makes sense logically to have displacement actually displace
the mesh, this is causing a lot of confusion for existing users that are used
to the previous behavior. Further, since Eevee does not support displacement
yet and the discrepancy between the viewport and final render is problematic.
2019-01-24 15:34:47 +01:00
Campbell Barton 4d29312c66 Cleanup: trailing space guardedalloc & memutil 2019-01-24 16:22:44 +11:00
Sergey Sharybin 9770d071ff Fix T54834: VSE can't import OGG Theora video 2019-01-23 17:16:17 +01:00
Sergey Sharybin baa5fe1bfc Cleanup: Spelling in comment 2019-01-23 10:27:55 +01:00
Sergey Sharybin a8902ab49a Fix T58640: Round corner in edge crease of subdivided surfaces
Fix T60502: Creasing behavior on 2.8 seams wrong

Was a mistake in a boundary vertices sharpness calculation.
2019-01-22 15:35:30 +01:00
Sergey Sharybin 0ec77aaea5 Cleanup: space after template bracket 2019-01-22 13:51:21 +01:00
Sergey Sharybin fef20d987c Merge branch 'blender2.7' 2019-01-22 11:57:03 +01:00
Brecht Van Lommel a6e6ad0756 Fix T60683, T60662: Cycles render crash in edit mode for certain meshes. 2019-01-21 16:10:00 +01:00
Brecht Van Lommel 97c7c0abf5 Cleanup: add clarifying comments for recent NUMA fixes. 2019-01-21 10:54:19 +01:00
Campbell Barton 8a61ea7296 Cleanup: add trailing commas
Prevents clang-format merging into a single line.
2019-01-19 13:58:35 +11:00
Brecht Van Lommel c59370bf64 Merge branch 'blender2.7' 2019-01-18 21:00:24 +01:00
Sergey Sharybin 08871b56bc Fix T60627: Cycles render hanging on Windows with threadripper CPU. 2019-01-18 20:59:45 +01:00
Brecht Van Lommel c5eb10b110 Fix T60585: Cycles not using all cores on threadripper, after recent changes. 2019-01-18 20:58:56 +01:00
Brecht Van Lommel be8202d90b Fix T60585: Cycles not using all cores on threadripper, after recent changes. 2019-01-18 19:18:23 +01:00
Brecht Van Lommel c9938ebb00 Fix T60615: Cycles baking not working with some modifiers.
Refactors Cycles mesh export a bit to avoid unnecessary copies and to be in
sync with the Blender baker.
2019-01-18 18:39:43 +01:00
Stefan Werner 5e121c8eab Cycles: Fixed uninitialized memory
Cryptomatte on CPU with accurate mode was hitting uninitialized variables.
This is now explicitly initializing them to NULL.
2019-01-18 15:17:21 +01:00
Lukas Stockner 0ad8f65677 Cycles: Cast to correct base type when checking requested features 2019-01-18 02:59:22 +01:00
Brecht Van Lommel 260b786d07 Fix T60558: Cycles viewport render mismatch when the camera is a light. 2019-01-17 16:36:05 +01:00
Sergey Sharybin 792c453b2a Merge branch 'blender2.7' 2019-01-16 14:58:53 +01:00
Sergey Sharybin 0260d7b726 Cycles: Report whether camera was detected inside volume or not 2019-01-16 14:58:07 +01:00
Sergey Sharybin 6ae72d2d41 OpenSubdiv: Remove topology orientation code
It is no longer used and has some issues in corner cases
which are not handled in a way which OpenSubdiv expects.
2019-01-16 11:00:43 +01:00
Sergey Sharybin 4fe6a2d950 OpenSubdiv: Implement UV topology comparison 2019-01-16 11:00:43 +01:00
Sergey Sharybin e064777cac OpenSubdiv: Correct topology cpmparator
This fixes following errors:

- The code didn't work correctly for edges reconstructed by
  the OpenSubdiv's topology refiner (due to indexing
  difference).

- Sharpness of non-manifold and boundary edges was not
  working correctly.
2019-01-16 11:00:42 +01:00
Sergey Sharybin 5a794c9685 OpenSubdiv: Use own utility header
Replaces direct access to std.
2019-01-16 11:00:42 +01:00
Sergey Sharybin f36f60543f OpenSubdiv: Cleanup, indentation 2019-01-16 11:00:42 +01:00
Campbell Barton c383d74228 Logging: add '--log-show-timestamp' option.
Part of D4214 by @sobakasu w/ edits.
2019-01-16 16:33:05 +11:00
Campbell Barton 5f22de8439 Merge branch 'blender2.7' 2019-01-16 00:27:10 +11:00
Campbell Barton 165caafb99 Revert fix for T48901: Use of XIWarpPointer
Xorg's XIWarpPointer doesn't support multi-head display while
XWarpPointer does.

Revert since this is a known TODO in Xorg and setting a custom
xinput matrix seems not to be used often.

Resolves T50383
2019-01-15 16:49:44 +11:00
Campbell Barton 9461af299c Revert fix for T48901: Use of XIWarpPointer
Xorg's XIWarpPointer doesn't support multi-head display while
XWarpPointer does.

Revert since this is a known TODO in Xorg and setting a custom
xinput matrix seems not to be used often.

Resolves T50383
2019-01-15 16:44:08 +11:00
Christopher Peerman 4693207918 Windows: add support for Windows Ink.
Before this Blender always needed the Wintab driver. This adds support for the
native pressure API in Windows 8+, making it possible to get pressure sensitivity
on e.g. Microsoft Surface hardware without any extra drivers.

By default Blender will automatically use Wintab if available, and if not use
Windows Ink instead. There is also a new user preference to explicitly specify
which API to use if automatic detection fails.

Fixes T57869: no pressure sensitivity with Surface pen or laptop.

Code by Christopher Peerman with some tweaks by Brecht Van Lommel.

Differential Revision: https://developer.blender.org/D4165
2019-01-14 20:48:11 +01:00
Brecht Van Lommel eaf282b375 Cleanup: refactor GHOST wintab handling. 2019-01-14 20:48:07 +01:00
Alex Fuller c08c6c8336 Cleanup: add begin/end iterators to Cycles NodeEnum.
Differential Revision: https://developer.blender.org/D4173
2019-01-14 15:57:53 +01:00
Alex Fuller 867ffacabf Fix Cycles node definition typos and incorrect enum value.
Differential Revision: https://developer.blender.org/D4174
2019-01-14 15:57:53 +01:00
Brecht Van Lommel 7707bf203c Merge branch 'blender2.7' 2019-01-14 12:43:34 +01:00
Christopher Peerman 19fba61d46 Fix T55589: drawing strokes with Microsoft surface pen misses first part.
This disables touch gesture recognition in Blender, avoiding any initial delay
when drawing with grease pencil, texture paint, etc.

Differential Revision: https://developer.blender.org/D4203
2019-01-14 12:25:42 +01:00
Brecht Van Lommel 728f43d585 Merge branch 'blender2.7' 2019-01-14 12:13:10 +01:00
Brecht Van Lommel 10fa3b790f Fix T60450: Cycles broken GPU denoising after recent changes. 2019-01-14 11:42:38 +01:00
Sergey Sharybin 1c7695b848 Merge branch 'blender2.7' 2019-01-11 18:09:05 +01:00
Sergey Sharybin 48506a3431 Fix T60145: Cycles resets manually set affinity
This change brings back old original logic which was checking
whether worker threads do fit into an active CPU group. But
it does it a bit smarter now and is also checking affinity
within that group. This way Cycles will use all threads on a
Threadripper2 CPU if it's set to automatic number of threads,
but on another hand will not change affinity if user requested
16 threads and changed Blender affinity.
2019-01-11 17:55:36 +01:00
Sergey Sharybin ff44a9957e Update bundled version of NUMA API library 2019-01-11 17:47:10 +01:00
Sergey Sharybin cca35c1013 Merge branch 'blender2.7' 2019-01-11 15:09:46 +01:00
Sergey Sharybin c1dd74580e Fix T60227: Crash when Cycles uses more than system threads
Tweaked scheduling so it survives this situation by scattering
"extra" threads uniformly over all the NUMA nodes.

There are still tweaks possible to make some specific hardware
configurations work better.
2019-01-11 15:03:48 +01:00
Brecht Van Lommel e5a1a9288c Fix T60320: Cycles OpenCL denoising filter errors on some drivers. 2019-01-11 11:25:37 +01:00
Campbell Barton b1e286bbfe MSVC: remove compiler __func__ define
No longer needed and exposes a bug in clang-format see: D4185
2019-01-11 09:33:20 +11:00
Campbell Barton 302970b7a5 MSVC: remove compiler __func__ define
No longer needed and exposes a bug in clang-format see: D4185
2019-01-11 09:22:21 +11:00
Campbell Barton 5100e4419e Cleanup: ensure header guards come first
Causes clang-format not to detect header guards,
indenting all preprocessor lines in the header.
2019-01-10 09:04:44 +11:00
Campbell Barton 5681631109 Cleanup: ensure header guards come first
Causes clang-format not to detect header guards,
indenting all preprocessor lines in the header.
2019-01-10 08:46:38 +11:00
Brecht Van Lommel 60799d6fee Merge branch 'blender2.7' 2019-01-09 17:20:58 +01:00
Brecht Van Lommel 0bb0e07e61 Fix Cycles viewport render doing some unnecessary work at the start.
In some cases it would load adaptive kernels or even start rendering
twice because the first time the scene was not fully synced yet.
2019-01-09 17:16:29 +01:00
Brecht Van Lommel b7fb3296c1 Fix T60300, T57774: Cycles OpenCL viewport crash with subsurface scattering. 2019-01-09 16:42:03 +01:00
Sergey Sharybin ddabad2410 Merge branch 'blender2.7' 2019-01-09 12:56:50 +01:00
Sergey Sharybin 1a6a80270d Cycles: Add utility to dump BVH tree as graphviz file 2019-01-09 12:14:20 +01:00
Sergey Sharybin 8044e5f2d7 Cycles: Make BVH wider prior to packing
This allows to do more non-trivial tree modifications to make
it more dense and more friendly for vectorization.
2019-01-09 12:14:20 +01:00
Jacques Lucke ff6ff90cbe Fix T60342: exception when creating cycles integrator or sampling preset 2019-01-09 11:58:48 +01:00
Brecht Van Lommel b486088218 Fix T60320: Cycles OpenCL volume rendering error on some drivers. 2019-01-08 15:59:10 +01:00
Brecht Van Lommel 8491dba0c6 Fix T60300: Cycles SSS render hanging with AMD OpenCL. 2019-01-08 15:37:16 +01:00
Sergey Sharybin f19b3f9b77 OpenSundiv: Simplify tweaking of shared stencil/patch settings 2019-01-07 10:33:40 +01:00
Severin a77b63c569 UI: Preferences Redesign Part 2
(Part 1 was 00963afc14978b)

Does the following changes visible to users:
* Use panels and sub-panels for more structured & logical grouping
* Re-organized options more logically than before (see images in D4148)
* Use flow layout (single column by default).
* New layout uses horizontal margin if there's enough space.
* Change size of Preferences window to suit new layout.
* Move keymap related options from "Input" into own section.
* Own, left-bottom aligned region for Save Preferences button.
* Adjustments of names, tooltips & icons.
* Move buttons from header into the main region (except editor switch).
* Hide Preferences header when opened in temporary window.
* Use full area width for header.
* Don't use slider but regular number widget for UI scale.
* Gray out animation player path option if player isn't "Custom"

Internal changes:
* Rearrange RNA properties to match changed UI structure.
* Introduces new "EXECUTE" region type, see reasoning in D3982.
* Changes to panel layout and AZone code for dynamic panel region.
* Bumps subversion and does versioning for new regions.

RNA changes are documented in the release notes:
https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Preferences_API

Design & implementation mostly done by @billreynish and myself.
I recommend checking out the screenshots posted by William:
https://developer.blender.org/D4148#93787

Reviewed By: brecht

Maniphest Tasks: T54115

Differential Revision: https://developer.blender.org/D4148
2019-01-04 22:18:23 +01:00
Campbell Barton 79d3b0b733 Haiku: build fix
D4130 by @miqlas
2019-01-04 17:05:40 +11:00
Campbell Barton f489db1c6b Haiku: build fix
D4130 by @miqlas
2019-01-04 17:04:07 +11:00
Brecht Van Lommel bdfc10e482 Fix T59349: Cycles viewport render flickering when changing some settings. 2019-01-03 19:21:10 +01:00
Brecht Van Lommel 88e45b8c99 Merge branch 'blender2.7' 2019-01-03 18:32:51 +01:00
Brecht Van Lommel aa175e0033 Fix for T58250 fix: Blender failing to start with OpenGL context < 4.5. 2019-01-03 18:31:32 +01:00
Brecht Van Lommel fffdedbcc1 Fix T54962: Cycles crash using subsurface scattering texture blur. 2019-01-03 17:10:37 +01:00
Brecht Van Lommel 3c411f5ba1 Fix T58250: crash starting Blender on X11 without OpenGL 3.3.
Instead display an error message and exit.
2019-01-03 16:43:09 +01:00
Brecht Van Lommel 017573495e Merge branch 'blender2.7' 2019-01-02 19:58:26 +01:00
Brecht Van Lommel f7e9642da9 Fix T60061: Cycles OSL point density not working.
Add override keywords so we can detect when the function definitions change.
2019-01-02 19:56:49 +01:00
Brecht Van Lommel f694d37929 Fix T59792: Cycles crash rendering motion pass with motion blur enabled. 2019-01-02 17:47:27 +01:00
Brecht Van Lommel d903eb6129 Fix T60046: crash with Cycles viewport render and particle info node.
This code was not correctly ported to 2.8.
2019-01-02 17:19:45 +01:00
Brecht Van Lommel 3f4e3f718f Cycles: restore old sample and material override settings for view layers.
Since there will be no view layer overrides in 2.80, this is needed still.
2018-12-28 18:59:33 +01:00
Bastien Montagne 111179beb0 Fix (unreported) broken Cycles tests after numaapi changes today.
Please always build tests when messing with build system/libs, am tired
of fixing that kind of issues...

Also, that fix is probably not working for standalone, no idea where's
the numaapi lib then, but committing since I need a building blender
here (with the tests, yes).
2018-12-27 23:20:37 +01:00
Bastien Montagne cd36f54611 Fix (unreported) broken Cycles tests after numaapi changes today.
Please always build tests when messing with build system/libs, am tired
of fixing that kind of issues...

Also, that fix is probably not working for standalone, no idea where's
the numaapi lib then, but committing since I need a building blender
here (with the tests, yes).
2018-12-27 22:40:08 +01:00
Sergey Sharybin 3e5374bf1e Merge branch 'blender2.7' 2018-12-27 19:13:27 +01:00
Sergey Sharybin 826d7adde7 Fix T59874: Cycles CPU 25% load only during rendering
The issue was introduced by a Threadripper2 commit back in
ce927e15e0. This boils down to threads inheriting affinity
from the parent thread. It is a question how this slipped
through the review (we definitely run benchmark round).

Quick fix could have been to always set CPU group affinity
in Cycles, and it would work for Windows. On other platforms
we did not have CPU groups API finished.

Ended up making Cycles aware of NUMA topology, so now we
bound threads to a specific NUMA node. This required adding
an external dependency to Cycles, but made some code there
shorter.
2018-12-27 19:12:59 +01:00
Brecht Van Lommel 7bed048243 X11: support multiple tablet devices.
Previously we would try to guess what the main tablet device is, but this is
error prone. Now we keep a list of X11 devices and try to match events to
them. On the Blender side there are still some limitations in regards to using
multiple devices at the same time, but this should improve things already.

Fixes T59645.
2018-12-27 16:44:19 +01:00
Brecht Van Lommel 53a6a0b258 X11: support multiple tablet devices.
Previously we would try to guess what the main tablet device is, but this is
error prone. Now we keep a list of X11 devices and try to match events to
them. On the Blender side there are still some limitations in regards to using
multiple devices at the same time, but this should improve things already.

Fixes T59645.
2018-12-27 16:18:37 +01:00
Brecht Van Lommel 5216dd5fce Merge branch 'blender2.7' 2018-12-27 10:53:02 +01:00
Bastien Montagne 6d89337257 Fix/cleanup typos and such in UI messages (and some comments). 2018-12-24 15:03:49 +01:00
Brecht Van Lommel 8e331c3431 Fix T59565: NaN/crash with zero radius tip of hair curves. 2018-12-21 18:54:45 +01:00
Brecht Van Lommel 275c627b5e Merge branch 'blender2.7' 2018-12-21 17:05:56 +01:00
Brecht Van Lommel 4eeab96f10 Cleanup: fix ATTR_FALLTHROUGH warnings.
Ref D3960.
2018-12-21 17:02:04 +01:00
Brecht Van Lommel 0edd93effb Fix inconsistent/broken Cycles object visibility for instances.
Object visibility is now handled by the depsgraph iterator, but this API
was incomplete as it made no distinction for visibility of the object itself,
particles and generated instances.

The depsgraph iterator API now includes information about which part of the
object is visible, and this is used by Cycles to replace the old custom logic.
Cycles and EEVEE visibility should now be consistent, which unfortunately does
means some subtle compatibility breakage for both.

Fixes T58956, T58202, T59284.

Differential Revision: https://developer.blender.org/D4109
2018-12-21 16:05:48 +01:00
Campbell Barton 63fcbfc3a7 RNA: naming, user-preferences -> preferences 2018-12-21 12:55:02 +11:00
Sergey Sharybin d08db7aef0 Merge branch 'master' into blender2.8 2018-12-20 16:48:41 +01:00
Sergey Sharybin b52465bd32 Cycles: Fixes for recent curve robustness
The key indices were wrong: need to offset curve key index
by first curve key index. Also corrected calculation of the
interpolation step.

Annoyingly, can not reproduce this on a simple file, need
production rig. For the possible future look the following
file from Spring was used: 03_005_A.lighting.debug.blend
2018-12-20 16:45:38 +01:00
Jacques Lucke 42bf7e440c Fix T58376: incorrect tooltip in subsurf modifier 2018-12-19 17:00:20 +01:00
Brecht Van Lommel 8c4ae8961c Fix T59564: Huion pen pressure not working on Linux, after recent changes. 2018-12-18 15:07:04 +01:00
Philipp Oeser ac68f44b8a fix shader editor errors when showing world shader tree
probably an oversight in rBd40bffa17f6d

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4079
2018-12-14 19:01:22 +01:00
Brecht Van Lommel f527ce5b2f Color management: add OCIO aware utility functions for transform to/from XYZ. 2018-12-13 19:25:46 +01:00
Sergey Sharybin b8cb08fa56 Merge branch 'master' into blender2.8 2018-12-13 14:32:32 +01:00
Sergey Sharybin 2947882bb1 Cycles: Update standalone app to OIIO 2.0 2018-12-13 14:31:38 +01:00
Campbell Barton 5b6cb2de9a RNA: revert recent rename 'updated' -> 'dirty'
Partially reverts 45fdf41be8 & 6d38d82437,
added comment why term 'updated' is used in this case.
2018-12-13 23:19:01 +11:00
Sergey Sharybin 4d115f2159 Merge branch 'master' into blender2.8 2018-12-11 15:56:04 +01:00
Sergey Sharybin 66d8bfb85c Update code to be compatible with OIIO 2.0
There are some changes in API of OpenImageIO, but those are quite
simple to keep working with older and newer library versions.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4064
2018-12-11 15:50:02 +01:00
Brecht Van Lommel f60018e425 Merge branch 'master' into blender2.8 2018-12-11 15:18:43 +01:00
Brecht Van Lommel 84b02dc54a Cleanup: remove accidentally committed debug code. 2018-12-11 15:18:15 +01:00
Sergey Sharybin ece109dd60 Cycles: Add strict assert when assigning input socket stack offset 2018-12-11 14:34:52 +01:00
Sergey Sharybin b45b082531 Cycles: Remove old nasty workaround
It used to be used for some sort of ignoring automatically
generated bump nodes. But nowadays it causes one of the shaders
in Classroom demo file to be compiled wrong.
2018-12-11 14:34:52 +01:00
Brecht Van Lommel 765795aed7 Fix macOS buildbot build, wrong CUDA version check. 2018-12-11 14:16:48 +01:00
Sergey Sharybin 39d24ffccb Cycles: Cleanup, indentation 2018-12-11 12:57:57 +01:00
Sergey Sharybin d7e7c4ddf7 Cycles: Restore properties in the interface
They got lost in one of the merges it seems.
2018-12-10 15:54:45 +01:00
Sergey Sharybin 4fe578c827 Merge branch 'master' into blender2.8 2018-12-07 15:00:48 +01:00
Sergey Sharybin 3b1f90ed84 Cycles: Do more user-friendly indication that GPU devices are not found 2018-12-07 14:53:29 +01:00
Sergey Sharybin bb0d812d98 Cycles: Disable OpenCL on macOS
This is unfortunate, but the number of bugs in this configuration
keeps growing, and almost all of them are caused by bug in OpenCL
compiler.

The compiler is not likely to be fixed, since Apple declared OpenCL
deprecated.

This evil commit is aimed to keep officially supported features
of Blender in a good working and stable state.
2018-12-07 14:37:47 +01:00
Dalai Felinto cc61b21dff Partial fix to T58917 - No valid cage
The fix itself simply is to store the cage object as a pointer instead
of a string/name.

That said baking with or without cage is yielding very different results
than in 2.7.
2018-12-07 10:44:19 -02:00
Campbell Barton 606223f6a6 Merge branch 'master' into blender2.8 2018-12-07 15:54:17 +11:00
Lucas Boutrot d40bffa17f UI: add material settings in shader editor sidebar.
Differential Revision: https://developer.blender.org/D3926
2018-12-07 00:57:20 +01:00
Brecht Van Lommel cccc40db51 Fix T57963: Cycles crash using AO for displacement.
Note this is not supported, there exists no geometry at this point, but
it should not crash at least.
2018-12-06 19:50:05 +01:00
Sergey Sharybin 0e5f97a3a1 Fix T58816: Color management Display Device other than sRGB crashes
This fixes our workaround for until proper solution is accepted
in upstream.

Now, when default view behaves same as it was supposed to (and
as it behaves in OCIO-1.0.9) it is obvious that our configuration
violates own design -- default view  is used for cases when
images don't want to be displays using "render" settings.
2018-12-06 10:55:31 +01:00
Sergey Sharybin a60536956e Color management: Fix issue when active views/displays are not specified 2018-12-06 09:16:52 +01:00
Clément Foucault 5584cad5d9 GHOST: WGL: Silence Errors when testing opengl context versions 2018-12-05 21:57:49 +01:00
Bastien Montagne a3b03b8146 Merge branch 'master' into blender2.8 2018-12-05 15:15:06 +01:00
Bastien Montagne 834fa06614 Fix (unreported) building Cycles tests with Embree enabled. 2018-12-05 15:14:16 +01:00
Bastien Montagne fb3f1a3567 Merge branch 'master' into blender2.8 2018-12-05 14:41:00 +01:00
Sergey Sharybin 6122e1d6c0 Color management: Fix/workaround broken getDefaultDisplay()
This is something what is caused by OCIO library. The patch
has been submitted there:

  https://github.com/imageworks/OpenColorIO/pull/638

For until it is refined and checked we do workaround from
our side.
2018-12-05 14:11:21 +01:00
Brecht Van Lommel c9344d6c5b Fix T58776, T58030: pressure sensitivity on Linux not working for some tablets. 2018-12-05 14:02:37 +01:00
Brecht Van Lommel 4a21345665 Merge branch 'master' into blender2.8 2018-12-05 12:54:45 +01:00
Brecht Van Lommel f5b46daf52 Fix build with old CMake versions. 2018-12-05 12:53:19 +01:00
Gaia Clary 5c3955452b Merge branch 'master' into blender2.8 2018-12-04 19:48:21 +01:00
Niels 8908670623 Fix T58466: bug in macOS GHOST_GetSwapInterval.
No user level changes since this function is not used in active code.
2018-12-04 18:44:42 +01:00
Brecht Van Lommel b9b88d59dd Merge branch 'master' into blender2.8 2018-12-04 16:35:16 +01:00
Brecht Van Lommel f63da3dcf5 Buildbot: enable support for NVIDIA Turing cards in Cycles (like GTX 20xx).
We currently only build the sm_7x kernels with CUDA 10.0, older cards still
use 9.1 until rendering errors are solved for them.
2018-12-04 16:03:18 +01:00
Brecht Van Lommel b14ec18601 Cycles: add initial CUDA 10.0 support, but only recommend use for Turing cards.
There may still be rendering errors when used for older graphics cards.
2018-12-04 16:03:18 +01:00
Sergey Sharybin df2635099b Merge branch 'master' into blender2.8 2018-12-04 11:45:22 +01:00
Shane Ambler 5a6f1fa563 Fix T58600: update OSL scripts to work with OSL 1.10.x. 2018-12-03 15:14:21 +01:00
Bastien Montagne 394b086b9c Fix T58556: Some remaining 'dupli_types' in pycode after renaming. 2018-12-03 10:39:54 +01:00
Antony Ryakiotakis 0f5b53ba4d Revert "Win32: Use the nicer looking blender-drawn confirmation message box when"
This reverts commit 60d6eb0b5d.

There is already a full patch (D3118) by brecht for this, will leave it up to him.
2018-11-30 23:29:32 +01:00
Antony Ryakiotakis 60d6eb0b5d Win32: Use the nicer looking blender-drawn confirmation message box when
quitting with unsaved changes, instead of an ugly messagebox
2018-11-30 21:11:59 +01:00
Campbell Barton cb8afaf5db Merge branch 'master' into blender2.8 2018-11-30 17:07:59 +11:00