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-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-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-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.
2021-05-14Cleanup: clang-formatCampbell Barton
2021-05-14Fix T87929: Cycles, missing update when visibility is modifiedKévin Dietrich
This issue originates from a missing BVH packing for visibility data when it is modified. To fix this, this adds update flags to the managers to carry the modified visibility information from the Objects' modified flag to the GeometryManager. Another set of flags is added to determine which data need to be packed: geometry, vertices, or visibility. Those flags are then used when packing the primivites. Reviewed By: brecht Maniphest Tasks: T87929 Differential Revision: https://developer.blender.org/D11219
2021-01-22Cycles: optimize device updatesKévin Dietrich
This optimizes device updates (during user edits or frame changes in the viewport) by avoiding unnecessary computations. To achieve this, we use a combination of the sockets' update flags as well as some new flags passed to the various managers when tagging for an update to tell exactly what the tagging is for (e.g. shader was modified, object was removed, etc.). Besides avoiding recomputations, we also avoid resending to the devices unmodified data arrays, thus reducing bandwidth usage. For OptiX and Embree, BVH packing was also multithreaded. The performance improvements may vary depending on the used device (CPU or GPU), and the content of the scene. Simple scenes (e.g. with no adaptive subdivision or volumes) rendered using OptiX will benefit from this work the most. On average, for a variety of animated scenes, this gives a 3x speedup. Reviewed By: #cycles, brecht Maniphest Tasks: T79174 Differential Revision: https://developer.blender.org/D9555
2020-12-11Cleanup: compiler warningsBrecht Van Lommel
If you mark one function as override in a class, all must be marked.
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-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: immediately store the used_shader list in Blender interface.Alexander Gavrilov
Uniform attributes require immediate access to the shader list in object update code, so setting the field can't be deferred to a background task. This required adding a parameter to the clear method of Geometry. Ref D2057
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-06-22Cycles: internal refactoring to make thick/ribbon curve separate primitivesBrecht Van Lommel
Also removing the curve system manager which only stored a few curve intersection settings. These are all changes towards making shape and subdivision settings per-object instead of per-scene, but there is more work to do here. Ref T73778 Depends on D8013 Maniphest Tasks: T73778 Differential Revision: https://developer.blender.org/D8014
2020-02-07Cleanup: split Cycles Hair and Mesh classes, with Geometry base classBrecht Van Lommel