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-10-26Cleanup: compiler warningsBrecht Van Lommel
2021-10-26Cycles: add additive AO support through Fast GI settingsBrecht Van Lommel
Add a Fast GI Method, either Replace for the existing behavior, or Add to add ambient occlusion like the old world settings. This replaces the old Ambient Occlusion settings in the world properties.
2021-10-26Cycles: restore Denoising Depth pass, when enabling Denoising Data passesBrecht Van Lommel
This is still useful in some cases even if not used by OpenImageDenoise. In the future this may be replaced with a more generic system to control render passes and filtering, but for now this just does what it did before.
2021-10-25Cleanup: clang-tidy, spellingCampbell Barton
2021-10-25Cycles: More accurate volume stack size calculationSergey Sharybin
The idea is to allow having a lot of non-intersecting volumes without allocating volume stack to its full size. With the F11285472 file the memory usage goes from 1400 MiB to 1000 on the RTX6000 card. The fix makes it so the integrator work memory is allocated after scene update which has downside of possible less efficient update when some textures don't fit GPU memory, but has an advantage of making proper decision and having a clear and consistent internal API. Fixes memory part of T92014. Differential Revision: https://developer.blender.org/D12966
2021-10-25Cycles: Revert all host update specific changesSergey Sharybin
The approach didn't turn out to be that useful after all as there are unavoidable dependencies of data from the device. For example, to know whether object intersects volume or not it is required to run displacement kernels. The way of splitting host and device updates caused state where some data is not yet available, causing confusion and leaving code to be error-prone.
2021-10-24Cleanup: spelling in commentsCampbell Barton
2021-10-20Cycles: make ambient occlusion pass take into account transparency againBrecht Van Lommel
Taking advantage of the new decoupled main and shadow paths. For CPU we just store two nested structs in the integrator state, one for direct light shadows and one for AO. For the GPU we restrict the number of shade surface states to be executed based on available space in the shadow paths queue. This also helps improve performance in benchmark scenes with an AO pass, since it is no longer needed to use the shader raytracing kernel there, which has worse performance. Differential Revision: https://developer.blender.org/D12900
2021-10-19Cycles: bake transparent shadows for hairBrecht Van Lommel
These transparent shadows can be expansive to evaluate. Especially on the GPU they can lead to poor occupancy when only some pixels require many kernel launches to trace and evaluate many layers of transparency. Baked transparency allows tracing a single ray in many cases by accumulating the throughput directly in the intersection program without recording hits or evaluating shaders. Transparency is baked at curve vertices and interpolated, for most shaders this will look practically the same as actual shader evaluation. Fixes T91428, performance regression with spring demo file due to transparent hair, and makes it render significantly faster than Blender 2.93. Differential Revision: https://developer.blender.org/D12880
2021-10-19Cleanup: Unused device argument in host update functionsSergey Sharybin
Better not to tempt anyone from using unsafe access to device functionality during host update.
2021-10-19Fix invalid OSL shader compilation stateSergey Sharybin
The lookup tables are to be initialized after device free. On Linux was only noticeable when rendering default cube scene with an extra assert. On Windows it was causing an assert in STL in debug builds. Differential Revision: https://developer.blender.org/D12918
2021-10-18Cleanup: fix compiler warningBrecht Van Lommel
2021-10-15Cleanup: don't copy constant memory to GPU multiple times for displacementBrecht Van Lommel
2021-10-15Cleanup: refactor to make number of channels for shader evaluation variableBrecht Van Lommel
2021-10-11Cycles: restore Christensen-Burley SSSBrecht Van Lommel
There is not enough time before the release to improve Random Walk to handle all cases this was used for, so restore it for now. Since there is no more path splitting in cycles-x, this can increase noise in non-flat areas for the sample number of samples, though fewer rays will be traced also. This is fundamentally a trade-off we made in the new design and why Random Walk is a better fit. However the importance resampling we do now does help to reduce noise. Differential Revision: https://developer.blender.org/D12800
2021-10-11Cycles: Improve volume stack size calculationSergey Sharybin
Only count volume objects after shader optimization. Allows to discard objects which don't have effective volume BSDF connected to the shader output (i.e. constant folded, or non-volume BSDF used by mistake). Solves memory regression reported in T92014. There is still possibility to improve memory even further for cases when there are a lot of non-intersecting volume objects, but that requires a deeper refactor of update process. Will happen as a followup development. Differential Revision: https://developer.blender.org/D12797
2021-10-11Cycles: Introduce scene host_update functionSergey Sharybin
The longer-term goal is to separate host-only scene update from device update: make it possible to make kernel features depend on actual scene state and flags. This change makes it so shaders are compiled before kernel load, making checks like "has_volume" available at the kernel features calculation state. No functional changes are expected at this point. Differential Revision: https://developer.blender.org/D12795
2021-10-08Fix T90666: Toggling motion blur while persistent data is enabled results in ↵Patrick Mours
artifacts Enabling or disabling motion blur requires rebuilding the BVH of affected geometry and uploading modified vertices to the device (since without motion blur the transform is applied to the vertex positions, whereas with motion blur this is done during traversal). Previously neither was happening when persistent data was enabled, since the relevant node sockets were not tagged as modified after toggling motion blur. The change to blender_object.cpp makes it so `geom->set_use_motion_blur()` is always called (regardless of motion blur being toggled on or off), which will tag the geometry as modified if that value changed and ensures the BVH is updated. The change to hair.cpp/mesh.cpp was necessary since after motion blur is disabled, the transform is applied to the vertex positions of a mesh, but those changes were not uploaded to the device. This is fixed now that they are tagged as modified. Maniphest Tasks: T90666 Differential Revision: https://developer.blender.org/D12781
2021-10-08Fix T91999: wrong Cycles updates with mesh deformation, after recent changesBrecht Van Lommel
2021-10-08Cleanup: spellingCampbell Barton
2021-10-07Fix wrong tile size calculated in CyclesSergey Sharybin
Was causing extra overscan pixels, and was confusing multiple workers check after fix T91994.
2021-10-07Fix T91994: Cycles crash when rendering on multiple devicesSergey Sharybin
The overscan change from D12599 lacked proper handling of window when slicing buffer for multiple devices.
2021-10-06Cycles: fully decouple triangle and curve primitive storage from BVH2Brecht Van Lommel
Previously the storage here was optimized to avoid indirections in BVH2 traversal. This helps improve performance a bit, but makes performance and memory usage of Embree and OptiX BVHs a bit worse also. It also adds code complexity in other parts of the code. Now decouple triangle and curve primitive storage from BVH2. * Reduced peak memory usage on all devices * Bit better performance for OptiX and Embree * Bit worse performance for CUDA * Simplified code: ** Intersection.prim/object now matches ShaderData.prim/object ** No more offset manipulation for mesh displacement before a BVH is built ** Remove primitive packing code and flags for Embree and OptiX ** Curve segments are now stored in a KernelCurve struct * Also happens to fix a bug in baking with incorrect prim/object Fixes T91968, T91770, T91902 Differential Revision: https://developer.blender.org/D12766
2021-10-06Fix T91922: Cycles artifacts with high volume nested levelSergey Sharybin
Make volume stack allocated conditionally, potentially based on the actual nested level of objects in the scene. Currently the nested level is estimated by number of volume objects. This is a non-expensive check which is probably enough in practice to get almost perfect memory usage and performance. The conditional allocation is a bit tricky. For the CPU we declare and define maximum possible volume stack, because there are only that many integrator states on the CPU. On the GPU we declare outer SoA to have all volume stack elements, but only allocate actually needed ones. The actually used volume stack size is passed as a pre-processor, which seems to be easiest and fastest for the GPU state copy. There seems to be no speed regression in the demo files on RTX6000. Note that scenes with high nested level of volume will now be slower but correct. Differential Revision: https://developer.blender.org/D12759
2021-10-06Cleanup: spelling in commentsCampbell Barton
2021-10-05Fix adaptive sampling artifacts on tile boundariesSergey Sharybin
Implement an overscan support for tiles, so that adaptive sampling can rely on the pixels neighbourhood. Differential Revision: https://developer.blender.org/D12599
2021-10-05Fix T91955: Cycles crash with denoising on non-available deviceSergey Sharybin
For example, crash when attempting to use OptiX denoiser on systems without OptiX-capable device. Perform check that scene update happened without errors. Note that `et_error` makes progress to cancel, so the code was simplified a bit.
2021-10-04Fix Cycles render time pass being available in UI, but it was removedBrecht Van Lommel
This previously only work for CPU rendering, and isn't that practical to get working in the new architecture.
2021-09-30Cycles: refactor API for render outputBrecht Van Lommel
* Add OutputDriver, replacing function callbacks in Session. * Add PathTraceTile, replacing tile access methods in Session. * Add more detailed comments about how this driver should be implemented. * Add OIIOOutputDriver for Cycles standalone to output an image. Differential Revision: https://developer.blender.org/D12627
2021-09-30Cycles: refactor API for GPU displayBrecht Van Lommel
* Split GPUDisplay into two classes. PathTraceDisplay to implement the Cycles side, and DisplayDriver to implement the host application side. The DisplayDriver is now a fully abstract base class, embedded in the PathTraceDisplay. * Move copy_pixels_to_texture implementation out of the host side into the Cycles side, since it can be implemented in terms of the texture buffer mapping. * Move definition of DeviceGraphicsInteropDestination into display driver header, so that we do not need to expose private device headers in the public API. * Add more detailed comments about how the DisplayDriver should be implemented. The "driver" terminology might not be obvious, but is also used in other renderers. Differential Revision: https://developer.blender.org/D12626
2021-09-30Nodes: Add Float Curve for GN and Shader nodes.Charlie Jolly
Replacement for float curve in legacy Attribute Curve Map node. Float Curve defaults to [0.0-1.0] range. Reviewed By: JacquesLucke, brecht Differential Revision: https://developer.blender.org/D12683
2021-09-28Fix wrong update with shadow catcher and transparent filmSergey Sharybin
This change fixes an issue when scene has a shadow catcher and film is configured to be transparent. Starting viewport render and making the background non-transparent will cause bad memory access (wrong render and possibly crash). Film passes depends on transparency of background, so check for this. Demo file: F10650585 Differential Revision: https://developer.blender.org/D12666
2021-09-28Cycles: Improve handling of tile file errorSergey Sharybin
Expose them to the interface, and stop rendering as soon as possible. Differential Revision: https://developer.blender.org/D12617
2021-09-24Fix T91639: Cycles crash rendering high resolution images with multiple passesBrecht Van Lommel
We were writing large 2048x2048 tiles into EXR files, which appears to cause integer overflow inside the OpenEXR library when there are multiple passes. Now use smaller tiles in the image file, while still rendering large tiles. This adds the requirement that the render tile size must be a multiple of 128 or be smaller than 128, this is adjusted automatically.
2021-09-24Fix T91660: Cycles remaining render time does not take into account time limitBrecht Van Lommel
2021-09-24Cleanup: remove unused device code and includesBrecht Van Lommel
2021-09-24Cleanup: clang formatPhilipp Oeser
2021-09-24Hair Info Length AttributeJeroen Bakker
Goal is to add the length attribute to the Hair Info node, for better control over color gradients or similar along the hair. Reviewed By: #eevee_viewport, brecht Differential Revision: https://developer.blender.org/D10481
2021-09-24Cleanup: spelling in commentsCampbell Barton
2021-09-23Cleanup: spelling in commentsCampbell Barton
2021-09-23Cleanup: spelling in commentsCampbell Barton
2021-09-22Fix T91598: Decreasing sample count causes viewport to resetSergey Sharybin
Differential Revision: https://developer.blender.org/D12601
2021-09-22Fix T91592: Negative Cycles remaining render timeSergey Sharybin
For the default startup was showing -14:-08.-48 as a remaining time. Was an integer overflow when specifying total number of pixel-samples.
2021-09-22Fix T91603: Cycles crash when volume becomes visibleSergey Sharybin
Making object which uses volume shader invisible will mark the shader as not having a volume, forcing re-compilation of the shader to bring it back to a consistent state. The compilation is happening as part of scene update, which needs to know kernel features. So there is a feedback loop. Use more relaxed way of knowing whether there is a volume in the shader for the kernel features, which doesn't require shader to be compiled first. Solves issues from the report, but potentially causes extra memory allocated if the volume part of graph is fully optimized out. This downside is solvable, but would need to split scene update into two steps (the one which requires on kernel, and the one which does not). It will be an interesting project to tackle, but for a bug fix is better to use simpler solution.
2021-09-22Fix T91576: Cycles attribute node with name N for smooth normal no longer ↵Brecht Van Lommel
working There was an optimization to remove duplicate storage of normals as attributes when using normal maps. However for named attributes like this we still need to store the attribute. Don't request normal attribute from the normal map node now, instead of skipping it in the geometry code.
2021-09-22Fix missing samples count pass when using tilesSergey Sharybin
Samples count pass is normalized to the overall number of samples. This means that we need to store actual value of the samples in the tile buffer file. A bit annoying to pull all those settings to BufferParams and need to find a more generic solution, but for now this is easiest and a quickest solution. Differential Revision: https://developer.blender.org/D12597
2021-09-22Cleanup: spelling in commentsCampbell Barton
2021-09-21Cycles: merge of cycles-x branch, a major update to the rendererBrecht Van Lommel
This includes much improved GPU rendering performance, viewport interactivity, new shadow catcher, revamped sampling settings, subsurface scattering anisotropy, new GPU volume sampling, improved PMJ sampling pattern, and more. Some features have also been removed or changed, breaking backwards compatibility. Including the removal of the OpenCL backend, for which alternatives are under development. Release notes and code docs: https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles https://wiki.blender.org/wiki/Source/Render/Cycles Credits: * Sergey Sharybin * Brecht Van Lommel * Patrick Mours (OptiX backend) * Christophe Hery (subsurface scattering anisotropy) * William Leeson (PMJ sampling pattern) * Alaska (various fixes and tweaks) * Thomas Dinges (various fixes) For the full commit history, see the cycles-x branch. This squashes together all the changes since intermediate changes would often fail building or tests. Ref T87839, T87837, T87836 Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-13Cleanup: clang-formatCampbell Barton
2021-09-09Cleanup: use NODE_SOCKET_API_ARRAY for array socketsKévin Dietrich
This prevents copying the arrays when setting new values in the sockets. No functional changes.