Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-12Merge branch 'blender-v2.91-release'Brecht Van Lommel
2020-11-12Fix T82607: crash cancelling Cycles render during adaptive subdivision updateBrecht Van Lommel
Now that the Blender sync mechanism deletes nodes from the scene, we need to ensure scene update is stopped before we do this. Also add some more early out in scene geometry update to ensure we do not continue working on incomplete geometry data, though that was not the cause of this crash.
2020-10-31Cycles: Implement tile stealing to improve CPU+GPU rendering performanceLukas Stockner
While Cycles already supports using both CPU and GPU at the same time, there currently is a large problem with it: Since the CPU grabs one tile per thread, at the end of the render the GPU runs out of new work but the CPU still needs quite some time to finish its current times. Having smaller tiles helps somewhat, but especially OpenCL rendering tends to lose performance with smaller tiles. Therefore, this commit adds support for tile stealing: When a GPU device runs out of new tiles, it can signal the CPU to release one of its tiles. This way, at the end of the render, the GPU quickly finishes the remaining tiles instead of having to wait for the CPU. Thanks to AMD for sponsoring this work! Differential Revision: https://developer.blender.org/D9324
2020-08-18Cycles: move some Scene related methods out of SessionKévin Dietrich
This moves `Session::get_requested_device_features`, `Session::load_kernels`, and `Session::update_scene` out of `Session` and into `Scene`, as mentioned in D8544. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8590
2020-07-10Cleanup: reduce hardcoded numbers in denoising neighbor tiles codeBrecht Van Lommel
2020-06-24Cycles: add denoising settings to the render propertiesBrecht Van Lommel
Enabling render and viewport denoising is now both done from the render properties. View layers still can individually be enabled/disabled for denoising and have their own denoising parameters. Note that the denoising engine also affects how denoising data passes are output even if no denoising happens on the render itself, to make the passes compatible with the engine. This includes internal refactoring for how denoising parameters are passed along, trying to avoid code duplication and unclear naming. Ref T76259
2020-05-15Cycles: code refactor to bake using regular render session and tilesBrecht Van Lommel
There should be no user visible change from this, except that tile size now affects performance. The goal here is to simplify bake denoising in D3099, letting it reuse more denoising tiles and pass code. A lot of code is now shared with regular rendering, with the two main differences being that we read some render result passes from the bake API when starting to render a tile, and call the bake kernel instead of the path trace kernel. With this kind of design where Cycles asks for tiles from the bake API, it should eventually be easier to reduce memory usage, show tiles as they are baked, or bake multiple passes at once, though there's still quite some work needed for that. Reviewers: #cycles Subscribers: monio, wmatyjewicz, lukasstockner97, michaelknubben Differential Revision: https://developer.blender.org/D3108
2020-04-28Fix T75432: Cycles progressive refine render slow with denoising dataBrecht Van Lommel
Only perform denoising prefilter for the last sample, not every sample.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-05Adaptive Sampling for Cycles.Stefan Werner
This feature takes some inspiration from "RenderMan: An Advanced Path Tracing Architecture for Movie Rendering" and "A Hierarchical Automatic Stopping Condition for Monte Carlo Global Illumination" The basic principle is as follows: While samples are being added to a pixel, the adaptive sampler writes half of the samples to a separate buffer. This gives it two separate estimates of the same pixel, and by comparing their difference it estimates convergence. Once convergence drops below a given threshold, the pixel is considered done. When a pixel has not converged yet and needs more samples than the minimum, its immediate neighbors are also set to take more samples. This is done in order to more reliably detect sharp features such as caustics. A 3x3 box filter that is run periodically over the tile buffer is used for that purpose. After a tile has finished rendering, the values of all passes are scaled as if they were rendered with the full number of samples. This way, any code operating on these buffers, for example the denoiser, does not need to be changed for per-pixel sample counts. Reviewed By: brecht, #cycles Differential Revision: https://developer.blender.org/D4686
2020-02-28Cycles: Rework tile scheduling for denoisingPatrick Mours
This fixes denoising being delayed until after all rendering has finished. Instead, tile-based denoising is now part of the "RENDER" task again, so that it is all in one task and does not cause issues with dedicated task pools where tasks are serialized. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6940
2020-02-25Cycles: Add option to change which sample to start viewport denoising atPatrick Mours
This patch adds a new user-configurable option to change at which sample viewport denoising should kick in. Setting it to zero retains previous behavior (start immediately), while other values will defer denoising until the particular sample has been reached. Default is now at one, to avoid the weirdness that is AI denoising at small resolutions. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6906
2020-02-11Cycles: Add support for denoising in the viewportPatrick Mours
The OptiX denoiser can be a great help when rendering in the viewport, since it is really fast and needs few samples to produce convincing results. This patch therefore adds support for using any Cycles denoiser in the viewport also (but only the OptiX one is selectable because the NLM one is too slow to be usable currently). It also adds support for denoising on a different device than rendering (so one can e.g. render with the CPU but denoise with OptiX). Reviewed By: #cycles, brecht Differential Revision: https://developer.blender.org/D6554
2020-01-08Cycles: Add OptiX AI denoiser supportPatrick Mours
This patch adds support for the OptiX denoiser as an alternative to the existing NLM denoiser in Cycles. It's re-using the same denoising architecture based on tiles and therefore implicitly also works with multiple GPUs. Reviewed By: sergey Differential Revision: https://developer.blender.org/D6395
2019-09-11Cycles: Display RenderPass in ViewportJeroen Bakker
This change allows the user to select a renderpass in the 3d viewport. Added support for external renderers to extend the `View3DShading` struct. This way Blender doesn't need to know the features an external render engine wants to support. Note that the View3DShading is also available in the scene->display.shading; although this is supported, it does not make sense for render engines to put something here as it is really scene/workbench related. Currently cycles assumes that it always needs to calculate the combined pass; it ignores the `pass_flag` in KernelFilm. We could optimize this but that was not in scope of this change Reviewed By: brecht Differential Revision: https://developer.blender.org/D5689
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-15Cycles/OpenCL: Compile Kernels During Scene UpdateJeroen Bakker
The main goals of this change is faster starting when using foreground rendering. This patch will build kernels in parallel to the update process of the scene. When these optimized kernels are not available (yet) an AO kernel will be used. These AO kernels are fast to compile (3-7 seconds) and can be reused by all scenes. When the final kernels become available we will switch to these kernels. In background mode the AO kernels will not be used. Some kernels are being used during Scene update (displace, background light). When these kernels are being used the process can halt until these become available. Reviewed By: brecht, #cycles Maniphest Tasks: T61752 Differential Revision: https://developer.blender.org/D4428
2019-03-14Fix T57138: Cycles CMJ failing with viewport samples set to 0.Brecht Van Lommel
Can't use INT_MAX, CMJ runs into precision/overflow issues before that.
2019-02-11Cycles: add animation denoising Python operator.Lukas Stockner
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-06Cycles: prefilter feature passes separate from denoising.Lukas Stockner
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.
2018-11-30Fix T58183: crash with CPU + GPU rendering after profiling changes.Brecht Van Lommel
Multi-device was not passing along profiler to the CPU.
2018-11-29Cycles: Add sample-based runtime profiler that measures time spent in ↵Lukas Stockner
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-09Cycles: Cleanup, spacing after preprocessorSergey Sharybin
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-10-29Cycles: Support generating Denoising passes without actually denoisingLukas Stockner
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-07-06Cleanup: strip trailing space for cyclesCampbell Barton
2018-03-16Code refactor: move OIIO image buffer writing outside session, into callback.Guillaume Chereau
Original patch by Guillaume, modifications by Brecht. Differential Revision: https://developer.blender.org/D3102
2017-10-21Cycles: disable progressive refine if denoising or save buffers is used.Brecht Van Lommel
Progressive refine undoes memory saving from save buffers, so enabling both does not make much sense. Previously enabling progressive refine would disable denoising, but it should be the other way around since denoise actually affects the render result. Includes some code refactor for progressive refine render buffers, and avoids recomputing tiles for each progressive sample.
2017-08-15Cycles/BI: Add a pixel size option for speeding up viewport renderingLukas Stockner
This patch adds "Pixel Size" to the performance options, which allows to render in a smaller resolution, which is especially useful for displays with high DPI. Reviewers: Severin, dingto, sergey, brecht Reviewed By: brecht Subscribers: Severin, venomgfx, eyecandy, brecht Differential Revision: https://developer.blender.org/D1619
2017-05-30Fix T51652: Cycles - Persistant Images not storing imagesLukas Stockner
Denoising was setting session parameters for every frame, which was detected as a change and therefore caused a resync. Since the parameter modification change is only needed for viewport rendering (which doesn't support denoising anyways) and resyncing after a frame change (which isn't affected by denoising settings), an easy fix is to just ignore the denoising parameters like it's currently done with the samples.
2017-05-19Cycles: Reload kernels from Session when requested features changeMai Lavelle
This fixes T49496.
2017-05-07Cycles: Implement denoising option for reducing noise in the rendered imageLukas Stockner
This commit contains the first part of the new Cycles denoising option, which filters the resulting image using information gathered during rendering to get rid of noise while preserving visual features as well as possible. To use the option, enable it in the render layer options. The default settings fit a wide range of scenes, but the user can tweak individual settings to control the tradeoff between a noise-free image, image details, and calculation time. Note that the denoiser may still change in the future and that some features are not implemented yet. The most important missing feature is animation denoising, which uses information from multiple frames at once to produce a flicker-free and smoother result. These features will be added in the future. Finally, thanks to all the people who supported this project: - Google (through the GSoC) and Theory Studios for sponsoring the development - The authors of the papers I used for implementing the denoiser (more details on them will be included in the technical docs) - The other Cycles devs for feedback on the code, especially Sergey for mentoring the GSoC project and Brecht for the code review! - And of course the users who helped with testing, reported bugs and things that could and/or should work better!
2017-03-29Cycles: Make all #include statements relative to cycles source directorySergey Sharybin
The idea is to make include statements more explicit and obvious where the file is coming from, additionally reducing chance of wrong header being picked up. For example, it was not obvious whether bvh.h was refferring to builder or traversal, whenter node.h is a generic graph node or a shader node and cases like that. Surely this might look obvious for the active developers, but after some time of not touching the code it becomes less obvious where file is coming from. This was briefly mentioned in T50824 and seems @brecht is fine with such explicitness, but need to agree with all active developers before committing this. Please note that this patch is lacking changes related on GPU/OpenCL support. This will be solved if/when we all agree this is a good idea to move forward. Reviewers: brecht, lukasstockner97, maiself, nirved, dingto, juicyfruit, swerner Reviewed By: lukasstockner97, maiself, nirved, dingto Subscribers: brecht Differential Revision: https://developer.blender.org/D2586
2016-12-03Cycles: Refactor Progress system to provide better estimatesLukas Stockner
The Progress system in Cycles had two limitations so far: - It just counted tiles, but ignored their size. For example, when rendering a 600x500 image with 512x512 tiles, the right 88x500 tile would count for 50% of the progress, although it only covers 15% of the image. - Scene update time was incorrectly counted as rendering time - therefore, the remaining time started very long and gradually decreased. This patch fixes both problems: First of all, the Progress now has a function to ignore time spans, and that is used to ignore scene update time. The larger change is the tile size: Instead of counting samples per tile, so that the final value is num_samples*num_tiles, the code now counts every sample for every pixel, so that the final value is num_samples*num_pixels. Along with that, some unused variables were removed from the Progress and Session classes. Reviewers: brecht, sergey, #cycles Subscribers: brecht, candreacchio, sergey Differential Revision: https://developer.blender.org/D2214
2016-11-07Cycles: Refactor Device selection to allow individual GPU compute device ↵Lukas Stockner
selection Previously, it was only possible to choose a single GPU or all of that type (CUDA or OpenCL). Now, a toggle button is displayed for every device. These settings are tied to the PCI Bus ID of the devices, so they're consistent across hardware addition and removal (but not when swapping/moving cards). From the code perspective, the more important change is that now, the compute device properties are stored in the Addon preferences of the Cycles addon, instead of directly in the User Preferences. This allows for a cleaner implementation, removing the Cycles C API functions that were called by the RNA code to specify the enum items. Note that this change is neither backwards- nor forwards-compatible, but since it's only a User Preference no existing files are broken. Reviewers: #cycles, brecht Reviewed By: #cycles, brecht Subscribers: brecht, juicyfruit, mib2berlin, Blendify Differential Revision: https://developer.blender.org/D2338
2016-05-11Cycles: Use explicit qualifier for single-argument constructorsSergey Sharybin
Almost in all cases we want such constructors to be explicit, there are exceptions but only in few places.
2016-04-06Cycles: Fix misleading remaining time report when using infinite number of ↵Sergey Sharybin
samples in viewport
2015-05-09Cycles: Add utility function to count maximum number of closures used by sessionSergey Sharybin
This will be used by split kernel in order to compile most optimal kernel. Maximum number of closures is actually being cached in the session, so viewport rendering will not trigger kernel re-loading when number of closures goes down.
2015-05-09Cycles: Change the way how we pass requested capabilities to the deviceSergey Sharybin
Previously we only had experimental flag passed to device's load_kernel() which was all fine. But since we're gonna to have some extra parameters passed there it makes sense to wrap them into a single struct, which will make it easier to pass stuff around.
2015-03-29Optionally use c++11 stuff instead of boost in cycles where possible. We do ↵Martijn Berger
and continue to depend on boost though Reviewers: dingto, sergey Reviewed By: sergey Subscribers: #cycles Differential Revision: https://developer.blender.org/D1185
2015-02-21Cycles: Use lower progressive update timeout for preview renderingSergey Sharybin
This ways previews are refreshing with the same ratio as job was expecting this to happen, giving more instant feedback on the changes.
2014-12-25Cleanup: Fix Cycles Apache header.Thomas Dinges
This was already mixed a bit, but the dot belongs there.
2014-05-19Fix T40262: cycles GPU bake crash due to kernels not loaded, randomly due to ↵Brecht Van Lommel
thread timing.
2014-05-19Move ShadingSystem enum to shader.hNathan Letwory
Add SHADINGSYSTEM_ to enum member names, so it is clear where they are from. Revert BVHType enum changes, as there's no need for code dedup here.
2014-05-19Move BVHType and shadingsystem enums to top-level of Cycles namespace.Nathan Letwory
Easier access of BVHType and deduplication for ShadingSystem. Reviewers: dingto, brecht Differential Revision: https://developer.blender.org/D534
2014-05-03Cycles BakeDalai Felinto
Expand Cycles to use the new baking API in Blender. It works on the selected object, and the panel can be accessed in the Render panel (similar to where it is for the Blender Internal). It bakes for the active texture of each material of the object. The active texture is currently defined as the active Image Texture node present in the material nodetree. If you don't want the baking to override an existent material, make sure the active Image Texture node is not connected to the nodetree. The active texture is also the texture shown in the viewport in the rendered mode. Remember to save your images after the baking is complete. Note: Bake currently only works in the CPU Note: This is not supported by Cycles standalone because a lot of the work is done in Blender as part of the operator only, not the engine (Cycles). Documentation: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Bake Supported Passes: ----------------- Data Passes * Normal * UV * Diffuse/Glossy/Transmission/Subsurface/Emit Color Light Passes * AO * Combined * Shadow * Diffuse/Glossy/Transmission/Subsurface/Emit Direct/Indirect * Environment Review: D421 Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge Original design by Brecht van Lommel. The entire commit history can be found on the branch: bake-cycles
2014-04-16Fix cycles standalone file saving not taking number of samples into account ↵Brecht Van Lommel
properly.
2014-03-26Fix T39420: Cycles viewport/preview flickers, when moving mouse across editorsSergey Sharybin
Issue was caused by the wrong usage of OCIO GLSL binding API. To make it work properly on pre-GLSL-1.3 drivers shader is to be enabled after the texture is binded to the opengl context. Otherwise it wouldn't know the proper texture size. This is actually a regression in 2.70 and to be ported to 'a'.
2014-01-25Cycles: Set samples to USHRT_MAX per default in the constructor, this is ↵Thomas Dinges
already used elsewhere.
2013-09-04Fix a few issues reported by coverity scan.Brecht Van Lommel
2013-08-31Cycles: viewport render now takes scene color management settings into account,Brecht Van Lommel
except for curves, that's still missing from the OpenColorIO GLSL shader. The pixels are stored in a half float texture, converterd from full float with native GPU instructions and SIMD on the CPU, so it should be pretty quick. Using a GLSL shader is useful for GPU render because it avoids a copy through CPU memory.