Commit Graph

8746 Commits

Author SHA1 Message Date
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
Campbell Barton 6e253fc627 Correct missing semicolon in recent commit 2018-11-30 17:07:13 +11:00
Brecht Van Lommel 63c0653170 Merge branch 'master' into blender2.8 2018-11-29 23:54:30 +01:00
Brecht Van Lommel a8b8da5567 Fix T58183: crash with CPU + GPU rendering after profiling changes.
Multi-device was not passing along profiler to the CPU.
2018-11-29 23:43:27 +01:00
Campbell Barton 6af997710b Merge branch 'master' into blender2.8 2018-11-30 08:39:59 +11:00
Campbell Barton 8ac2d85d2f Cleanup: trailing space 2018-11-30 08:38:25 +11:00
Brecht Van Lommel 7c6fc8b275 Merge branch 'master' into blender2.8 2018-11-29 16:49:21 +01:00
Brecht Van Lommel 2c154399a2 Fix internal compiler error when building with VS 2017 (15.9.3).
It doesn't like alignment for function arguments, and I don't think this
alignment is needed.

Solution found by Ray Molenkamp.
2018-11-29 16:42:52 +01:00
Sergey Sharybin f24147d459 Merge branch 'master' into blender2.8 2018-11-29 09:35:39 +01:00
Sergey Sharybin b00819bcca Atomic: Avoid conflicts with definitions in other areas
While atomics library was trying to use "user-space" defined
LIKELY() and UNLIKELY(), this is not always true that user
code was checking for those macro coming from an unrelated
area.
2018-11-29 09:33:50 +01:00
Campbell Barton 9893fee4e6 Merge branch 'master' into blender2.8 2018-11-29 12:55:58 +11:00
Campbell Barton 140f2209b6 Cleanup: correct typo, no need for ./ prefix 2018-11-29 12:54:30 +11:00
Lukas Stockner 7fa6f72084 Cycles: Add sample-based runtime profiler that measures time spent in various parts of the CPU kernel
This commit adds a sample-based profiler that runs during CPU rendering and collects statistics on time spent in different parts of the kernel (ray intersection, shader evaluation etc.) as well as time spent per material and object.

The results are currently not exposed in the user interface or per Python yet, to see the stats on the console pass the "--cycles-print-stats" argument to Cycles (e.g. "./blender -- --cycles-print-stats").

Unfortunately, there is no clear way to extend this functionality to CUDA or OpenCL, so it is CPU-only for now.

Reviewers: brecht, sergey, swerner

Reviewed By: brecht, swerner

Differential Revision: https://developer.blender.org/D3892
2018-11-29 02:45:24 +01:00
Sergey Sharybin 7c7f3776dd Use collection and instance terminology in Python API
This follows naming convention agreed on in T56648.
2018-11-28 18:22:51 +01:00
Sergey Sharybin 91795e756c Merge branch 'master' into blender2.8 2018-11-28 18:05:59 +01:00
Sergey Sharybin 2b371b65bc More fixes for NUMA on macOS 2018-11-28 18:05:35 +01:00
Sergey Sharybin 11ff47a134 Merge branch 'master' into blender2.8 2018-11-28 17:57:37 +01:00
Sergey Sharybin 8a6aa15903 Fix compilation error on macOS 2018-11-28 17:57:04 +01:00
Sergey Sharybin bef9f42ef0 Merge branch 'master' into blender2.8 2018-11-28 17:55:27 +01:00
Sergey Sharybin 547bc2a620 Fix compilation error on 32bit Windows 2018-11-28 17:54:58 +01:00
Bastien Montagne 6fd5f95ca1 Fix (unreported) Cycles not rendering correctly modified curves/surfaces/texts.
Meshes from evaluated objects may already have modifiers applied, but
that's not the case for curves, we need to do that when converting them
to meshes.
2018-11-28 16:25:15 +01:00
Sergey Sharybin 3ed0d5b4d4 Merge branch 'master' into blender2.8 2018-11-28 14:42:38 +01:00
Sergey Sharybin 683662e630 Add cross-platform NUMA library
Makes it simple to use NUMA libraries on various platforms.
2018-11-28 14:35:26 +01:00
Sergey Sharybin 0970ed0550 Merge branch 'master' into blender2.8 2018-11-26 12:00:36 +01:00
Sergey Sharybin acd1d1a31d CMake: Remove Cycles specific OpenSubdiv options
Just use one flag which enables OpenSubdiv globally for all the
areas of Blender.
2018-11-26 11:41:38 +01:00
Campbell Barton a0cde8ed08 Cleanup: unused vars 2018-11-26 09:26:38 +11:00
Brecht Van Lommel a2e209f20a Merge branch 'master' into blender2.8 2018-11-24 23:44:17 +01:00
Brecht Van Lommel 7c19d9e9af Fix X11 tablet pen and eraser distinction being wrong in some cases.
This extends the earlier fix to use the latest logic from Wine's wintab.c,
to better handle eraser detection.
2018-11-24 23:24:32 +01:00
Campbell Barton 059c119719 Merge branch 'master' into blender2.8 2018-11-25 08:01:53 +11:00
Campbell Barton e742e0934d Cleanup: trailing space 2018-11-25 08:01:14 +11:00
Brecht Van Lommel fa0fcbe4d6 Fix T56374, T57066, T58037: crash on startup on macOS when using translation. 2018-11-24 20:04:53 +01:00
Jens Verwiebe e5bc9fae54 Fix penpressure for tablets that use libinput on linux 2018-11-24 18:26:20 +01:00
Sergey Sharybin d891c8f1f8 Merge branch 'master' into blender2.8 2018-11-23 14:41:21 +01:00
Stefan Werner 874f12480f Cycles: Fixed a warning. 2018-11-23 13:47:25 +01:00
Stefan Werner aa000400dc Cycles: Improved robustness of hair motion blur.
In some instances, the number of control vertices of a hair could change mid-frame.
Cycles would then be unable to calculate proper motion blur for those hairs. This adds
interpolated CVs to fill in for the missing data. While this will not necessarily result in
a fully accurate reconstruction of the guide hair, it preserves motion blur instead of disabling it.

Reviewers: #cycles, sergey

Reviewed By: #cycles, sergey

Subscribers: sergey, brecht, #cycles

Tags: #cycles

Differential Revision: https://developer.blender.org/D3695
2018-11-23 13:25:26 +01:00
Campbell Barton 4b9d242be5 Merge branch 'master' into blender2.8 2018-11-22 15:16:45 +11:00
Sergey Sharybin 968bf0df14 Fix T57811: Render crashes in certain scenes when AO Bounces are used 2018-11-21 14:17:26 +01:00
Sergey Sharybin 6f48bfc7a8 Cycles: Cleanup, use utility function
Replaces inlined platform-specific code.
2018-11-21 13:51:18 +01:00
Sergey Sharybin 65143542af Cycles: Cleanup, reduce indentation level 2018-11-21 12:41:24 +01:00
Sergey Sharybin 700330afe8 Cycles: Cleanup, comments and dead code 2018-11-21 11:33:11 +01:00
Sergey Sharybin 65d01def80 Cycles: Cleanup, CUDA code path is not possible inside AVX2 2018-11-21 11:28:49 +01:00
Sergey Sharybin 8610b57271 Cycles: Cleanup, code style 2018-11-15 17:19:26 +01:00
Sergey Sharybin c617fcad10 Merge branch 'master' into blender2.8 2018-11-15 17:17:37 +01:00
Sergey Sharybin cd9ab9d99e Cycles: Cleanup, code style 2018-11-15 17:16:40 +01:00
Clément Foucault c3d03b4434 Lamps: Remove HEMI light type
This type is not supported by either Eevee or Cycles. If other types of
lamps are needed by external engines, we should support adding custom types.
2018-11-14 11:50:37 +01:00
Campbell Barton 55e719ec35 Merge branch 'master' into blender2.8 2018-11-14 17:21:34 +11:00
Campbell Barton d7f55c4ff5 Cleanup: comment block tabs 2018-11-14 17:10:56 +11:00
Sergey Sharybin 3a05331445 Merge branch 'master' into blender2.8 2018-11-12 12:16:31 +01:00
Sergey Sharybin d23a53c74a Cycles: Fix/workaround for gcc-7.2
For some reason when building with gcc-7.2 (which is default
in previous Ubuntu LTS) the guarded allocator is not being
properly instantiated.

Doesn't happen with newer version of gcc-7 which is 7.3, and
also doesn't happen with gcc-6 and gcc-8.

Would be nice to know what is wrong, but for the time being
committing workaround which keeps Blender users happy.
2018-11-12 12:16:07 +01:00
Sergey Sharybin a0022f80f4 Merge branch 'master' into blender2.8 2018-11-12 11:02:46 +01:00
Sergey Sharybin e732c6af3b Cycles: Proper comment for closing header guard 2018-11-12 11:02:10 +01:00
Sergey Sharybin 8d07af5d10 Merge branch 'master' into blender2.8 2018-11-09 17:56:28 +01:00
Sergey Sharybin 65e9388440 Revert "Cycles: Cleanup, move Embree BVH logic to own file"
While we shouldn't have logic in an entry point, and since one should
not be making typos when moving lines around, there is bigger entanglement
issue with BVH host code using kernel function. This is bad violation,
but is tricky to get solved moments before the weekly.

In order to keep things in a (less) broken state than before own cleanup
reverting the changes.

This reverts commit 2bad10be96.
This reverts commit ddabb21d05
2018-11-09 17:54:09 +01:00
Sergey Sharybin 5494683651 Cycles: Free Blender side data as soon as we don't need it
Currently this is possible after built-in images are loaded in memory.
Allows to save memory used by dependency graph and copy-on-write.

In practice this lowers peak system memory usage from 52GB to 42GB on
a production file of spring 03_035_A.lighting.

Note, that this only applies to F12 and command line renders.

Bigger note, that this optimization is currently only possible if
there are no grease pencil objects to be rendered.
2018-11-09 17:53:02 +01:00
Sergey Sharybin cbbf991f62 Cycles: Add name field to scene
Doesn't mean much for Cycles itself, but allows to have nice logs
and progress reports without access of original scene.
2018-11-09 17:53:02 +01:00
Sergey Sharybin 9c1c2a40bf Merge branch 'master' into blender2.8 2018-11-09 15:22:21 +01:00
Sergey Sharybin e6573138f7 Cycles: Cleanup, remove unused method declaration
Was never defined. If it's really needed, consider using `const string&`.
2018-11-09 15:21:19 +01:00
Sergey Sharybin 78a6689aea Merge branch 'master' into blender2.8 2018-11-09 14:34:33 +01:00
Sergey Sharybin ddabb21d05 Cycles; Cleanup, line length
There are some more sanitization which would be cool to be done
in the neighbourhood of those functions, but that could also happen
later.
2018-11-09 12:31:46 +01:00
Sergey Sharybin 2bad10be96 Cycles: Cleanup, move Embree BVH logic to own file
There is no way we can keep generic entry point functions easy to
follow if we start adding actual logic in them.
2018-11-09 12:28:55 +01:00
Sergey Sharybin 2d98b198e9 Cycles: Cleanup, indentation in preprocessor 2018-11-09 12:12:11 +01:00
Sergey Sharybin 3e76cc494a Cycles: Cleanup, indentation 2018-11-09 12:10:48 +01:00
Sergey Sharybin 203de0bbf0 Cycles: Cleanup, space after (void)
It was used in like 95% of places.
2018-11-09 12:08:51 +01:00
Sergey Sharybin 2330cadb0f Cycles: Cleanup, don't use strict C prototypes
Those are more like a legacy of language, which is not
needed in C++.
2018-11-09 12:04:41 +01:00
Sergey Sharybin c86d4b1d80 Cycles: Cleanup, split array from vector
Those are similar but different types, no reason to keep
their definitions in a single file.
2018-11-09 11:54:24 +01:00
Sergey Sharybin b394e05118 Cycles: Cleanup, some documentation 2018-11-09 11:46:09 +01:00
Sergey Sharybin a15e631537 Cycles: Cleanup, remove unneeded manual constructors specification 2018-11-09 11:44:33 +01:00
Sergey Sharybin 0e9be6fd7d Cycles: Cleanup, remove unneeded method from vector
Since we've defaulted to C++11, no need to override this
method manually anymore.
2018-11-09 11:42:12 +01:00
Sergey Sharybin cb4b5e12ab Cycles: Cleanup, spacing after preprocessor
It is supposed to be two spaces before comment stating which if
else/endif statements corresponds to. Was mainly violated in the
header guards.
2018-11-09 11:34:54 +01:00
Brecht Van Lommel c39f34def9 Fix Cycles viewport render info overlapping other text.
Now it shows more compact info below the view/object name. Render time and
memory usage is left out, as in most cases this is not so important. These
could be added back optionally if needed.
2018-11-08 18:31:33 +01:00
Brecht Van Lommel 146b39a45d Merge branch 'master' into blender2.8 2018-11-08 15:15:29 +01:00
Brecht Van Lommel 116be3deff Fix build on 32bit after Embree changes. 2018-11-08 14:58:01 +01:00
Lukas Stockner 47c77cd89c Cycles: Write Cryptomatte metadata according to the specification
Reviewers: brecht, sergey, swerner

Subscribers: creamsurfer, Tanguy, Noss, SteffenD

Differential Revision: https://developer.blender.org/D3862
2018-11-08 01:07:54 +01:00
Stefan Werner a0d8e52b54 Cycles: Fixed BVH UI options enabling/disabling when Embree is enabled. 2018-11-07 20:50:45 +01:00
Stefan Werner 85a9744905 Merge branch 'master' into blender2.8 2018-11-07 20:44:40 +01:00
Stefan Werner d3320c5488 Cycles: Rearranged macros in kernel_types.h to fix Embree build. 2018-11-07 15:20:24 +01:00
Brecht Van Lommel 4610ca599a Merge branch 'master' into blender2.8 2018-11-07 14:54:32 +01:00
Brecht Van Lommel 33201a48b0 Fix build with OSL, remove unneeded file after Embree changes. 2018-11-07 14:38:07 +01:00
Stefan Werner 9d0eac6ba5 Merge branch 'master' into blender2.8 2018-11-07 14:30:09 +01:00
Stefan Werner d3dd3739f6 Cycles: Fixed a warning. 2018-11-07 14:04:22 +01:00
Stefan Werner e96986fa47 Cycles: Fixed OpenCL render after the Embree checkin. 2018-11-07 13:53:56 +01:00
Stefan Werner 2c5531c0a5 Cycles: Added Embree as BVH option for CPU renders.
Note that this is turned off by default and must be enabled at build time with the CMake WITH_CYCLES_EMBREE flag.
Embree must be built as a static library with ray masking turned on, the `make deps` scripts have been updated accordingly.
There, Embree is off by default too and must be enabled with the WITH_EMBREE flag.

Using Embree allows for much faster rendering of deformation motion blur while reducing the memory footprint.

TODO: GPU implementation, deduplication of data, leveraging more of Embrees features (e.g. tessellation cache).

Differential Revision: https://developer.blender.org/D3682
2018-11-07 12:58:12 +01:00
Brecht Van Lommel d323c0ad9c UI: change Cycles render panels organization.
Move geometry panels to top level, move device/OSL back to top, and
various other changes.
2018-11-06 20:04:04 +01:00
Brecht Van Lommel b04c856122 UI: some reordering of Cycles panels. 2018-11-06 17:51:58 +01:00
Brecht Van Lommel 1e56c8c47d Merge branch 'master' into blender2.8 2018-11-05 00:30:33 +01:00
Brecht Van Lommel ea8e45de29 Fix assert rendering hair tests on some systems. 2018-11-04 20:25:57 +01:00
Brecht Van Lommel db59f30f2b Fix assert rendering with denoising, after recent changes. 2018-11-04 20:15:33 +01:00
Campbell Barton bc870f17a7 Cleanup: style, shadow warning 2018-11-04 10:10:00 +11:00
Pablo Vazquez 4affea081a UI: Move Simplify panel from Scene to Render properties.
It mainly contains properties that affect the final render/viewport and it's handy
to see if it's enabled or not while going through the render settings.
2018-11-03 05:12:45 +01:00
Pablo Vazquez 1f4068214f UI Cycles: Open "Sampling" panel by default
Now that the Dimensions panel moved to Output, we can have the Sampling panel as the only one open by default.
2018-11-02 02:29:09 +01:00
Brecht Van Lommel 86b2f8ef38 UI: add render output tab to properties editor 2018-11-02 11:58:56 +11:00
William Reynish 4b7b1ba114 UI: more single column layout for brush and render properties. 2018-10-31 17:58:57 +01:00
Sergey Sharybin a2a8e71210 OpenSubdiv: API, expose vertex boundary interpolation option
Only affects internal API, bout could be exposed as an option for
the compatibility reasons with other software.

Is a part of some ongoing development of multires, but might or
might not be used.
2018-10-31 17:47:40 +01:00
Sergey Sharybin fc12a736bb Merge branch 'master' into blender2.8 2018-10-31 11:49:04 +01:00
Sergey Sharybin e0cc3e9809 Cycles: Fix wrong BVH used when disabling AVX2 in debug settings
Mainly useful for debugging. Previously, when AVX2 was disabled
in the debug panel but BVH layout was kept on BVH8 nothing was
rendered.

Needed to make it so supported BVH layout mask for devices is
queried in "dynamic", so it is possible to use DebugFlags there.
2018-10-31 11:46:52 +01:00
Brecht Van Lommel 6e04c8e3ff UI: update Cycles passes panel for single column. 2018-10-30 14:14:56 +01:00
Brecht Van Lommel dffde4a49c Merge branch 'master' into blender2.8 2018-10-30 14:13:47 +01:00
Brecht Van Lommel 7c0d37deca Fix build error on Windows 32bit, alignment was wrong. 2018-10-30 11:39:44 +01:00
Lukas Stockner e3817e5ec1 Cycles: Support generating Denoising passes without actually denoising
Needed for the animation denoiser since the denoising filter is done separately there.

Reviewers: brecht, sergey

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3833
2018-10-29 15:50:01 +01:00
Pablo Vazquez 2a9b53b970 UI: Typo in tooltip 2018-10-29 14:43:12 +01:00
Brecht Van Lommel e7f423dffd Merge branch 'master' into blender2.8 2018-10-29 13:26:09 +01:00