Commit Graph

5170 Commits

Author SHA1 Message Date
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
c5f13ecbc0 Merge branch 'blender2.7' 2019-02-17 15:57:34 +01:00
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
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
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
7a41c1634b Merge branch 'blender2.7' 2019-02-14 20:00:37 +01:00
de0e456a6c Cleanup: fix compiler warnings. 2019-02-14 19:39:39 +01:00
9886ae6331 Fix T61470: incorrect saturation clamping in recent bugfix.
We should clamp the result after multiplication.
2019-02-14 19:28:44 +01:00
fb6f1aa12f Fix Cycles Embree crash on macOS, due to too small thread stack size. 2019-02-14 17:21:55 +01:00
93d11edd7e Fix Cycles build error with OpenImageIO 2.x. 2019-02-14 17:20:43 +01:00
dbd9b7590a Merge branch 'blender2.7' 2019-02-13 19:02:43 +01:00
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
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
74a3d9b410 Merge branch 'blender2.7' 2019-02-13 14:34:26 +01:00
1bbe770030 Fix missing Cycles cryptomatte metadata in renders. 2019-02-13 14:34:17 +01:00
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
d8888b2f48 Merge branch 'blender2.7' 2019-02-11 18:39:31 +01:00
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
b8d4f06b10 Merge branch 'blender2.7' 2019-02-11 15:25:46 +01:00
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
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
382fe85e29 Cycles: refactor Blender device settings handling into own file. 2019-02-11 12:53:24 +01:00
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
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
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
Pablo Vazquez
3be845ce20 Cleanup: Typos in comments (to to) 2019-02-04 01:23:48 +01:00
Campbell Barton
a3bf8da875 Merge branch 'blender2.7' 2019-02-02 09:37:50 +11:00
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
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
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
92fa42f2ce Fix T60973: crash baking objects disabled for rendering. 2019-01-31 18:12:26 +01:00
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
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
409a21b32e Merge branch 'blender2.7' 2019-01-28 12:05:51 +01:00
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
690478027b Merge branch 'blender2.7' 2019-01-27 20:17:11 +01:00
d377cd5db1 Fix Cycles standalone build as part of Blender. 2019-01-27 20:05:25 +01:00
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
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