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
2021-07-28Cycles: remove WITH_CYCLES_DEBUG, add WITH_CYCLES_DEBUG_NANBrecht Van Lommel
WITH_CYCLES_DEBUG was used for rendering BVH debugging passes. But since we mainly use Embree an OptiX now, this information is no longer important. WITH_CYCLES_DEBUG_NAN will enable additional checks for NaNs and invalid values in the kernel, for Cycles developers. Previously these asserts where enabled in all debug builds, but this is too likely to crash Blender in scenes that render fine regardless of the NaNs. So this is behind a CMake option now. Fixes T90240
2021-06-22OptiX: select BVH build options from Scene paramsKévin Dietrich
Currently, the OptiX BVH build options are selected based on whether we are in background mode (final renders) or not (viewport renders). In background mode, the BVH is built for fast path tracing and low memory footprint, while in viewport, it is built for fast updates. However, on platforms without OpenGL support, the background flag is always set to true and prevents using fast BVH builds in the viewport. Now, the BVH options derive from the Scene BVH settings: * if BVH is static, a fast to trace BVH is built * if BVH is dynamic, a fast to update BVH is built Reviewed By: #cycles, brecht Differential Revision: https://developer.blender.org/D11154
2021-05-25Fix T88096: Baking with OptiX and displacement failsPatrick Mours
Using displacement runs the shader eval kernel, but since OptiX modules are not loaded when baking is active, those were not available and therefore failed to launch. This fixes that by falling back to the CUDA kernels.
2021-05-20Merge remote-tracking branch 'origin/blender-v2.93-release'Sybren A. Stüvel
2021-05-19Fix T87793: Cycles OptiX crash hiding objects in viewport renderBrecht Van Lommel
2021-04-26Cycles: Fix build with OptiX 7.3 SDKPatrick Mours
2021-04-13Cycles: Initialize all OptiX structs to zero before usePatrick Mours
This is done to ensure building with newer OptiX SDK releases that add new struct fields gives deterministic results (no uninitialized fields and therefore random data is passed to OptiX).
2021-03-11Cycles: Change device-only memory to actually only allocate on the devicePatrick Mours
This patch changes the `MEM_DEVICE_ONLY` type to only allocate on the device and fail if that is not possible anymore because out-of-memory (since OptiX acceleration structures may not be allocated in host memory). It also fixes high peak memory usage during OptiX acceleration structure building. Reviewed By: brecht Maniphest Tasks: T85985 Differential Revision: https://developer.blender.org/D10535
2021-01-20Fix T84872: OptiX GPU + CPU rendering uses branched path samplesBrecht Van Lommel
Branched path tracing is not supported for OptiX, and it would still use the number of AA samples from there when branched path was enabled by the user earlier but auto disabled and hidden in the UI when using OptiX. Ref D10159
2021-01-11Fix T82351: Cycles: Tile stealing glitches with adaptive samplingLukas Stockner
In my testing this works, but it requires me to remove the min(start_sample...) part in the adaptive sampling kernel, and I assume there's a reason why it was there? Reviewed By: brecht Maniphest Tasks: T82351 Differential Revision: https://developer.blender.org/D9445
2021-01-08Fix Cycles rendering with OptiX after instance limit increase when building ↵Patrick Mours
with old SDK Commit d259e7dcfbbd37cec5a45fdfb554f24de10d0268 increased the instance limit, but only provided a fall back for the host code for older OptiX SDKs, not for kernel code. This caused a mismatch when an old SDK was used (as is currently the case on buildbot) and subsequent rendering artifacts. This fixes that by moving the bit that is checked to a common location that works with both old an new SDK versions.
2021-01-07Cycles: Increase instance limit for OptiX acceleration structure buildingPatrick Mours
For a while now OptiX had support for 28-bits of instance IDs, instead of the initial 24-bits (see also value reported by OPTIX_DEVICE_PROPERTY_LIMIT_MAX_INSTANCE_ID). This change makes use of that and also adds an error reported when the number of instances an OptiX acceleration structure is created with goes beyond the limit, to make this clear instead of just rendering an image with artifacts. Manifest Tasks: T81431
2020-12-24Fix T84016: Cycles baking crash with OptiX after recent changesBrecht Van Lommel
This worked for CPU + GPU, but not GPU only.
2020-12-22Fix Cycles OptiX runtime compilation broken after shader raytracingBrecht Van Lommel
Need to pass the appropriate flags as we do for compilation as part of the CMake build.
2020-12-11Cycles: Add CPU+GPU rendering support with OptiXPatrick Mours
Adds support for building multiple BVH types in order to support using both CPU and OptiX devices for rendering simultaneously. Primitive packing for Embree and OptiX is now standalone, so it only needs to be run once and can be shared between the two. Additionally, BVH building was made a device call, so that each device backend can decide how to perform the building. The multi-device for instance creates a special multi-BVH that holds references to several sub-BVHs, one for each sub-device. Reviewed By: brecht, kevindietrich Differential Revision: https://developer.blender.org/D9718
2020-12-08Cycles: Enable baking panel in OptiX and redirect those requests to CUDA for nowPatrick Mours
This enables support for baking when OptiX is active, but uses CUDA for that behind the scenes, since the way baking is currently implemented does not work well with OptiX. Reviewed By: brecht Differential Revision: https://developer.blender.org/D9784
2020-12-04Cycles: Add support for shader raytracing in OptiXPatrick Mours
Support for the AO and bevel shader nodes requires calling "optixTrace" from within the shading VM, which is only allowed from inlined functions to the raygen program or callables. This patch therefore converts the shading VM to use direct callables to make it work. To prevent performance regressions a separate kernel module is compiled and used for this purpose. Reviewed By: brecht Differential Revision: https://developer.blender.org/D9733
2020-11-04Cycles API: encapsulate Node socket membersKévin Dietrich
This encapsulates Node socket members behind a set of specific methods; as such it is no longer possible to directly access Node class members from exporters and parts of Cycles. The methods are defined via the NODE_SOCKET_API macros in `graph/ node.h`, and are for getting or setting a specific socket's value, as well as querying or modifying the state of its update flag. The setters will check whether the value has changed and tag the socket as modified appropriately. This will let us know how a Node has changed and what to update, which is the first concrete step toward a more granular scene update system. Since the setters will tag the Node sockets as modified when passed different data, this patch also removes the various modified methods on Nodes in favor of Node::is_modified which checks the sockets' update flags status. Reviewed By: brecht Maniphest Tasks: T79174 Differential Revision: https://developer.blender.org/D8544
2020-11-03Cycles: add support for BVH refit in OptiXKévin Dietrich
This avoids recomputing the BVH for geometries that do not have changes in topology but whose vertices are modified (like a simple character animation), and gives up to 40% speedup for BVH building. This is only available for viewport renders at the moment. Reviewed By: pmoursnv, brecht Differential Revision: https://developer.blender.org/D9353
2020-10-27Revert "Cycles API: encapsulate Node socket members"Brecht Van Lommel
This reverts commit 527f8b32b32187f754e5b176db6377736f9cb8ff. It is causing motion blur test failures and crashes in some renders, reverting until this is fixed.
2020-10-27Cycles API: encapsulate Node socket membersKévin Dietrich
This encapsulates Node socket members behind a set of specific methods; as such it is no longer possible to directly access Node class members from exporters and parts of Cycles. The methods are defined via the NODE_SOCKET_API macros in `graph/ node.h`, and are for getting or setting a specific socket's value, as well as querying or modifying the state of its update flag. The setters will check whether the value has changed and tag the socket as modified appropriately. This will let us know how a Node has changed and what to update, which is the first concrete step toward a more granular scene update system. Since the setters will tag the Node sockets as modified when passed different data, this patch also removes the various `modified` methods on Nodes in favor of `Node::is_modified` which checks the sockets' update flags status. Reviewed By: brecht Maniphest Tasks: T79174 Differential Revision: https://developer.blender.org/D8544
2020-10-26Cycles: Add support for OptiX 7.2 SDKPatrick Mours
2020-08-19Cycles : add a Volume Geometry NodeKévin Dietrich
This splits the volume related data (properties for rendering and attributes) of the Mesh node into a new `Volume` node type. This `Volume` node derives from the `Mesh` class since we generate a mesh for the bounds of the volume, as such we can safely work on `Volumes` as if they were `Meshes`, e.g. for BVH creation. However such code should still check for the geometry type of the object to be `MESH` or `VOLUME` which may be bug prone if this is forgotten. This is part of T79131. Reviewed By: brecht Maniphest Tasks: T79131 Differential Revision: https://developer.blender.org/D8538
2020-07-27Cycles: Enable OptiX on first generation Maxwell GPUs againPatrick Mours
2020-07-24Fix OptiX being shown as available on first generation Maxwell GPUsPatrick Mours
The OptiX kernels are compiled for target "compute_sm_52", which is only available on second generation Maxwell GPUs, so disable support for older ones.
2020-07-13Fix T78881: Cycles OpenImageDenoise not using albedo and normal correctlyBrecht Van Lommel
Properly normalize buffers now. Also expose option to not use albedo and normal just like OptiX.
2020-07-10Cleanup: reduce hardcoded numbers in denoising neighbor tiles codeBrecht Van Lommel
2020-07-07Cycles: Add support for native OptiX curve primitivePatrick Mours
This patch adds support for the curve primitive from OptiX to Cycles. It's currently hidden behind a debug option, since there can be some slight rendering differences still (because no backface culling is performed and something seems off with endcaps). The curve primitive was added with the OptiX 7.1 SDK and requires a r450 driver or newer, so this also updates the codebase to be able to build with the new SDK. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8223
2020-06-24Cleanup: compiler warningsBrecht 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-06-22Cycles: port curve-ray intersection from Embree for use in Cycles GPUBrecht Van Lommel
This keeps render results compatible for combined CPU + GPU rendering. Peformance and quality primitives is quite different than before. There are now two options: * Rounded Ribbon: render hair as flat ribbon with (fake) rounded normals, for fast rendering. Hair curves are subdivided with a fixed number of user specified subdivisions. This gives relatively good results, especially when used with the Principled Hair BSDF and hair viewed from a typical distance. There are artifacts when viewed closed up, though this was also the case with all previous primitives (but different ones). * 3D Curve: render hair as 3D curve, for accurate results when viewing hair close up. This automatically subdivides the curve until it is smooth. This gives higher quality than any of the previous primitives, but does come at a performance cost and is somewhat slower than our previous Thick curves. The main problem here is performance. For CPU and OpenCL rendering performance seems usually quite close or better for similar quality results. However for CUDA and Optix, performance of 3D curve intersection is problematic, with e.g. 1.45x longer render time in Koro (though there is no equivalent quality and rounded ribbons seem fine for that scene). Any help or ideas to optimize this are welcome. Ref T73778 Depends on D8012 Maniphest Tasks: T73778 Differential Revision: https://developer.blender.org/D8013
2020-06-22Cleanup: remove task pool stop() and finished()Brecht Van Lommel
2020-06-22Cleanup: use lambdas instead of functors for task pools, remove threadidBrecht Van Lommel
2020-06-22Cleanup: minor refactoring around DeviceTaskBrecht Van Lommel
2020-06-12Cycles: Improve CUDA and OptiX error reporting in the viewportPatrick Mours
This patch makes the infamous "Cancel" error in the viewport a thing of the past. Instead it now shows a more useful error message and streamlines the error handling process in CUDA. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8008
2020-06-05Cycles: Enable OptiX on all Maxwell+ GPUsPatrick Mours
2020-05-27Fix T76947: Optix realtime denoiser progressively reduces brightness of very ↵Patrick Mours
bright objects The input data to the OptiX denoiser was clamped to 0..10000 as required, but it could easily exceed that range with a high number of samples (since the data contains the overall sum). To fix that, divide by the number of samples first and multiply it back in after the denoiser ran.
2020-05-14Fix --debug-cycles printing CUDA devices twiceBrecht Van Lommel
Reuse the CUDA devices list for Optix device detection.
2020-04-11Cycles/Optix: Support building the optix kernels on demand.Ray Molenkamp
CMake: `WITH_CYCLES_DEVICE_OPTIX` did not respect `WITH_CYCLES_CUDA_BINARIES` causing the optix kernel to be always build at build time. Code: `device_optix.cpp` did not count on the optix kernel not existing in the default location. For this to work, one should have before starting blender 1) working nvcc environment 2) Optix SDK installed and the OPTIX_ROOT_DIR environment variable pointing to it which is not set by default Differential Revision: https://developer.blender.org/D7400 Reviewed By: Brecht
2020-03-26Cycles/Optix: Add CYCLES_OPTIX_TEST overrideRay Molenkamp
This works similarly to the CYCLES_OPENCL_TEST environment variable to allow testing on unsupported hardware. Note: like the OPENCL test override, this is for *testing* only and bug reports on unsupported hardware will *not* be accepted at this point in time.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-11Fix Optix build error on Linux with some compilersBrecht Van Lommel
2020-03-07Fix error in Cycles Optix adaptive sampling after recent cleanupBrecht Van Lommel
2020-03-06Cycles: cleanup warningDalai 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-28Fix CUDA out of memory error with OptiX viewport denoising on small GPUsPatrick Mours
This makes the memory allocation for the denoiser state use the memory allocator in Cycles, which will evict textures to host memory when there is not enough space on the device. This means the allocation for the denoiser state won't just fail if there is no more space and instead more space is made for it to work. Also simplifies code somewhat.
2020-02-17Cycles: Add support for adaptive kernel compilation to OptiX devicePatrick Mours
This modifies the common CUDA implementation for adaptive kernel compilation slightly to support both CUBIN and PTX output (the latter which is then used in the OptiX device). It also fixes adaptive kernel compilation on Windows. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6851
2020-02-13Fix OptiX denoising when multiple CUDA streams are activePatrick Mours
2020-02-13Cleanup: Remove some unnecessary OptiX device codePatrick Mours