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
2022-09-13Cycles: Make OSL implementation independent from SVMPatrick Mours
Cleans up the file structure to be more similar to that of the SVM and also makes it possible to build kernels with OSL support, but without having to include SVM support. This patch was split from D15902. Differential Revision: https://developer.blender.org/D15949
2022-09-02Cleanup: refactoring of kernel film function names and organizationBrecht Van Lommel
2022-07-15Cycles: refactor rays to have start and end distance, fix precision issuesBrecht Van Lommel
For transparency, volume and light intersection rays, adjust these distances rather than the ray start position. This way we increment the start distance by the smallest possible float increment to avoid self intersections, and be sure it works as the distance compared to be will be exactly the same as before, due to the ray start position and direction remaining the same. Fix T98764, T96537, hair ray tracing precision issues. Differential Revision: https://developer.blender.org/D15455
2022-07-14Cleanup: replace state flow macros in the kernel with functionsBrecht Van Lommel
2022-06-20Cleanup: renaming and consistency for kernel dataBrecht Van Lommel
* Rename "texture" to "data array". This has not used textures for a long time, there are just global memory arrays now. (On old CUDA GPUs there was a cache for textures but not global memory, so we used to put all data in textures.) * For CUDA and HIP, put globals in KernelParams struct like other devices. * Drop __ prefix for data array names, no possibility for naming conflict now that these are in a struct.
2022-05-31Fix Cycles MNEE not working for MetalBrecht Van Lommel
Move MNEE to own kernel, separate from shader ray-tracing. This does introduce the limitation that a shader can't use both MNEE and AO/bevel, but that seems like the better trade-off for now. We can experiment with bigger kernel organization changes later. Differential Revision: https://developer.blender.org/D15070
2022-04-01Cycles: approximate shadow caustics using manifold next event estimationOlivier Maury
This adds support for selective rendering of caustics in shadows of refractive objects. Example uses are rendering of underwater caustics and eye caustics. This is based on "Manifold Next Event Estimation", a method developed for production rendering. The idea is to selectively enable shadow caustics on a few objects in the scene where they have a big visual impact, without impacting render performance for the rest of the scene. The Shadow Caustic option must be manually enabled on light, caustic receiver and caster objects. For such light paths, the Filter Glossy option will be ignored and replaced by sharp caustics. Currently this method has a various limitations: * Only caustics in shadows of refractive objects work, which means no caustics from reflection or caustics that outside shadows. Only up to 4 refractive caustic bounces are supported. * Caustic caster objects should have smooth normals. * Not currently support for Metal GPU rendering. In the future this method may be extended for more general caustics. TECHNICAL DETAILS This code adds manifold next event estimation through refractive surface(s) as a new sampling technique for direct lighting, i.e. finding the point on the refractive surface(s) along the path to a light sample, which satisfies Fermat's principle for a given microfacet normal and the path's end points. This technique involves walking on the "specular manifold" using a pseudo newton solver. Such a manifold is defined by the specular constraint matrix from the manifold exploration framework [2]. For each refractive interface, this constraint is defined by enforcing that the generalized half-vector projection onto the interface local tangent plane is null. The newton solver guides the walk by linearizing the manifold locally before reprojecting the linear solution onto the refractive surface. See paper [1] for more details about the technique itself and [3] for the half-vector light transport formulation, from which it is derived. [1] Manifold Next Event Estimation Johannes Hanika, Marc Droske, and Luca Fascione. 2015. Comput. Graph. Forum 34, 4 (July 2015), 87–97. https://jo.dreggn.org/home/2015_mnee.pdf [2] Manifold exploration: a Markov Chain Monte Carlo technique for rendering scenes with difficult specular transport Wenzel Jakob and Steve Marschner. 2012. ACM Trans. Graph. 31, 4, Article 58 (July 2012), 13 pages. https://www.cs.cornell.edu/projects/manifolds-sg12/ [3] The Natural-Constraint Representation of the Path Space for Efficient Light Transport Simulation. Anton S. Kaplanyan, Johannes Hanika, and Carsten Dachsbacher. 2014. ACM Trans. Graph. 33, 4, Article 102 (July 2014), 13 pages. https://cg.ivd.kit.edu/english/HSLT.php The code for this samping technique was inserted at the light sampling stage (direct lighting). If the walk is successful, it turns off path regularization using a specialized flag in the path state (PATH_MNEE_SUCCESS). This flag tells the integrator not to blur the brdf roughness further down the path (in a child ray created from BSDF sampling). In addition, using a cascading mechanism of flag values, we cull connections to caustic lights for this and children rays, which should be resolved through MNEE. This mechanism also cancels the MIS bsdf counter part at the casutic receiver depth, in essence leaving MNEE as the only sampling technique from receivers through refractive casters to caustic lights. This choice might not be optimal when the light gets large wrt to the receiver, though this is usually not when you want to use MNEE. This connection culling strategy removes a fair amount of fireflies, at the cost of introducing a slight bias. Because of the selective nature of the culling mechanism, reflective caustics still benefit from the native path regularization, which further removes fireflies on other surfaces (bouncing light off casters). Differential Revision: https://developer.blender.org/D13533
2022-02-11Cycles: use SPDX license headersBrecht Van Lommel
* Replace license text in headers with SPDX identifiers. * Remove specific license info from outdated readme.txt, instead leave details to the source files. * Add list of SPDX license identifiers used, and corresponding license texts. * Update copyright dates while we're at it. Ref D14069, T95597
2022-01-26Cycles: explicitly skip self-intersectionWilliam Leeson
Remember the last intersected primitive and skip any intersections with the same primitive. Ref D12954
2021-12-01Cycles: fix bugs in point and spot light multiple importance samplingSebastian Herholz
* Spot lights are now handled as disks aligned with the direction of the spotlight instead of view aligned disks. * Point light is now handled separately from the spot light, to fix a case where multiple lights are intersected in a row. Before the origin of the ray was the previously intersected light and not the origin of the initial ray traced from the last surface/volume interaction. This makes both strategies in multiple importance sampling converge to the same result. It changes the render results in some scenes, for example the junkshop scene where there are large point lights overlapping scene geometry and each other. Differential Revision: https://developer.blender.org/D13233
2021-11-11Fix T92868: Cycles catcher with transparency crashesSergey Sharybin
The issue was caused by splitting happening twice. Fixed by checking for split flag which is assigned to the both states during split. The tricky part was to write catcher data at the moment of split: the transparency and shadow catcher sample count is to be accumulated at that point. Now it is happening in the `intersect_closest` kernel. The downside is that render buffer is to be passed to the kernel, but the benefit is that extra split bounce check is not needed now. Had to move the passes write to shadow catcher header, since include of `film/passes.h` causes all the fun of requirement to have BSDF data structures available. Differential Revision: https://developer.blender.org/D13177
2021-11-05Fix T91733, T92486: Cycles wrong shadow catcher with volumesBrecht Van Lommel
Changes: * After hitting a shadow catcher, re-initialize the volume stack taking into account shadow catcher ray visibility. This ensures that volume objects are included in the stack only if they are shadow catchers. * If there is a volume to be shaded in front of the shadow catcher, the split is now performed in the shade_volume kernel after volume shading is done. * Previously the background pass behind a shadow catcher was done as part of the regular path, now it is done as part of the shadow catcher path. For a shadow catcher path with volumes and visible background, operations are done in this order now: * intersect_closest * shade_volume * shadow catcher split * intersect_volume_stack * shade_background * shade_surface The world volume is currently assumed to be CG, that is it does not exist in the footage. We may consider adding an option to control this, or change the default. With a volume object this control is already possible. This includes refactoring to centralize the logic for next kernel scheduling in intersect_closest.h. Differential Revision: https://developer.blender.org/D13093
2021-11-04Fix T92450: Cycles wrong render with overlapping glass, transparency and volumesBrecht Van Lommel
We need to store the continuation probability used to make the termination decision in intersect_closest, instead of recomputing it in shade_surface. Because otherwise a shade_volume in between can change the throughput and change the probability.
2021-10-28Fix T92158: Cycles crash with Fast GI and area light MISBrecht Van Lommel
2021-10-26Cycles: remove prefix from source code file namesBrecht Van Lommel
Remove prefix of filenames that is the same as the folder name. This used to help when #includes were using individual files, but now they are always relative to the cycles root directory and so the prefixes are redundant. For patches and branches, git merge and rebase should be able to detect the renames and move over code to the right file.