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
2017-09-13Code cleanup: abstract shadow catcher logic more into accumulation code.Brecht Van Lommel
2017-09-13Code cleanup: deduplicate some branched and split kernel code.Brecht Van Lommel
Benchmarks peformance on GTX 1080 and RX 480 on Linux is the same for bmw27, classroom, pabellon, and about 2% faster on fishy_cat and koro.
2017-09-13Code cleanup: tweak inlining for 2% better CUDA performance with hair.Brecht Van Lommel
2017-09-12Cycles: change AO bounces approximation to do more glossy and transmission.Mathieu Menuet
Rather than treating all ray types equally, we now always render 1 glossy bounce and unlimited transmission bounces. This makes it possible to get good looking results with low AO bounces settings, making it useful to speed up interior renders for example. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2818
2017-09-05Fix T52433: Volume Absorption color tintSergey Sharybin
Need to exit the volume stack when shadow ray laves the medium. Thanks Brecht for review and help in troubleshooting!
2017-08-24Code cleanup: remove shader context.Brecht Van Lommel
This was needed when we accessed OSL closure memory after shader evaluation, which could get overwritten by another shader evaluation. But all closures are immediatley converted to ShaderClosure now, so no longer needed.
2017-08-19Code cleanup: move rng into path state.Brecht Van Lommel
Also pass by value and don't write back now that it is just a hash for seeding and no longer an LCG state. Together this makes CUDA a tiny bit faster in my tests, but mainly simplifies code.
2017-08-13Code cleanup: make L_transparent part of PathRadiance.Brecht Van Lommel
2017-08-13Code cleanup: make DebugData part of PathRadiance.Brecht Van Lommel
2017-08-12Code cleanup: remove unused Cycles random number code.Brecht Van Lommel
2017-08-12Code cleanup: fix warning and improve terminology.Brecht Van Lommel
2017-08-11Fix T52229: Shadow Catcher artifacts when under transparencySergey Sharybin
Added some extra tirckery to avoid background being tinted dark with transparent surface. Maybe a bit hacky, but seems to work fine.
2017-08-07Fix Cycles shadow catcher objects influencing each other.Brecht Van Lommel
Since all the shadow catchers are already assumed to be in the footage, the shadows they cast on each other are already in the footage too. So don't just let shadow catchers skip self, but all shadow catchers. Another justification is that it should not matter if the shadow catcher is modeled as one object or multiple separate objects, the resulting render should be the same. Differential Revision: https://developer.blender.org/D2763
2017-08-07Fix Cycles CUDA adaptive megakernel build error.Brecht Van Lommel
2017-07-18Fix T52021: Shadow catcher renders wrong when catcher object is behind ↵Sergey Sharybin
transparent object Tweaked the path radiance summing and alpha to accommodate for possible contribution of light by transparent surface bounces happening prior to shadow catcher intersection. This commit will change the way how shadow catcher results looks when was behind semi transparent object, but the old result seemed to be fully wrong: there were big artifacts when alpha-overing the result on some actual footage.
2017-05-17Fix T50937: baking with OpenCL and CPU have slightly different brightnessHristo Gueorguiev
OpenCL baking with SSS and Volume are not supported.
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-05-02Cycles: Branched path tracing for the split kernelMai Lavelle
This implements branched path tracing for the split kernel. General approach is to store the ray state at a branch point, trace the branched ray as normal, then restore the state as necessary before iterating to the next part of the path. A state machine is used to advance the indirect loop state, which avoids the need to add any new kernels. Each iteration the state machine recreates as much state as possible from the stored ray to keep overall storage down. Its kind of hard to keep all the different integration loops in sync, so this needs lots of testing to make sure everything is working correctly. We should probably start trying to deduplicate the integration loops more now. Nonbranched BMW is ~2% slower, while classroom is ~2% faster, other scenes could use more testing still. Reviewers: sergey, nirved Reviewed By: nirved Subscribers: Blendify, bliblubli Differential Revision: https://developer.blender.org/D2611
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
2017-03-27Cycles: Remove ccl_addr_space from RNG passed to functionsHristo Gueorguiev
Simplifies code quite a bit, making it shorter and easier to extend. Currently no functional changes for users, but is required for the upcoming work of shadow catcher support with OpenCL.
2017-03-27Cycles: First implementation of shadow catcherSergey Sharybin
It uses an idea of accumulating all possible light reachable across the light path (without taking shadow blocked into account) and accumulating total shaded light across the path. Dividing second figure by first one seems to be giving good estimate of the shadow. In fact, to my knowledge, it's something really similar to what is happening in the denoising branch, so we are aligned here which is good. The workflow is following: - Create an object which matches real-life object on which shadow is to be catched. - Create approximate similar material on that object. This is needed to make indirect light properly affecting CG objects in the scene. - Mark object as Shadow Catcher in the Object properties. Ideally, after doing that it will be possible to render the image and simply alpha-over it on top of real footage.
2017-03-09Cycles: SSS and Volume rendering in split kernelHristo Gueorguiev
Decoupled ray marching is not supported yet. Transparent shadows are always enabled for volume rendering. Changes in kernel/bvh and kernel/geom are from Sergey. This simiplifies code significantly, and prepares it for record-all transparent shadow function in split kernel.
2017-03-08Cycles: Remove ccl_fetch and SOAMai Lavelle
2017-01-27Cycles: Add option to replace GI with AO approximation after certain amount ↵Sergey Sharybin
of bounces This is a speed up option which is mainly useful for viewport. Gives nice speedup in the barbershop scene of 2x when replacing GI with AO after 2nd bounce without loosing too much details. Reviewers: brecht Subscribers: eyecandy, venomgfx Differential Revision: https://developer.blender.org/D2383
2017-01-23Cycles: Split ShaderData object and shader flagsSergey Sharybin
We started to run out of bits there, so now we separate flags which came from __object_flags and which are either runtime or coming from __shader_flags. Rule now is: SD_OBJECT_* flags are to be tested against new object_flags field of ShaderData, all the rest flags are to be tested against flags field of ShaderData. There should be no user-visible changes, and time difference should be minimal. In fact, from tests here can only see hardly measurable difference and sometimes the new code is somewhat faster (all within a noise floor, so hard to tell for sure). Reviewers: brecht, dingto, juicyfruit, lukasstockner97, maiself Differential Revision: https://developer.blender.org/D2428
2017-01-23Cycles: Make object flag names more obvious that hey are object and not shaderSergey Sharybin
2017-01-12Cycles: Use dedicated debug passes for traversed nodes and intersection testsSergey Sharybin
This way it's more clear whether some issue is caused by lots of geometry in the node or by lots of "transparent" BVH nodes.
2016-12-08Fix emissive volumes generates unexpected fireflies around intersectionsSergey Sharybin
Discard the whole volume stack on the last bounce (but keep world volume if present). Volumes are expected to be closed manifol meshes, meaning if ray entered the volume there should be an intersection event of ray exisintg the volume. Case when ray hit nothing and there are still non-world volumes in the stack can happen in either of cases. 1. Mesh is not closed manifold. Such configurations are not really supported anyway and should not be used. Previous code would have consider the infinite length of the ray to sample across, so render result wasn't really correct anyway. 2. Exit intersection is more far away than the camera far clip distance. This case also will behave differently now, but previously it wasn't really correct either, so it's not like we're breaking something which was working as expected. 3. We missed exit event due to intersection precision issues. This is exact the case which this patch fixes and avoid fireflies. 4. Volume has Camera only visibility (all the rest visibility is set to off) This is what could be considered a regression but could be solved quite easily by checking volume stack's objects flags and keep entries which doesn't have Volume Scatter visibility (or even better: ensure Volume Scatter visibility for objects with volume closure), Fixes T46108: Cycles - Overlapping emissive volumes generates unexpected bright hotspots around the intersection Also fixes fireflies appearing on the edges of cube with emissive volue. Reviewers: juicyfruit, brecht Reviewed By: brecht Maniphest Tasks: T46108 Differential Revision: https://developer.blender.org/D2212
2016-11-11Cycles: Add comments to endif directivesMai Lavelle
`kernel_path.h` and `kernel_path_branched.h` have a lot of conditional code and it was kind of hard to tell what code belonged to which directive. Should be easier to read now.
2016-10-31Cycles: Deduplicate AO calculationLukas Stockner
No functional changes.
2016-10-30Cycles: Add optional probabilistic termination of light samples based on ↵Lukas Stockner
their expected contribution In scenes with many lights, some of them might have a very small contribution to some pixels, but the shadow rays are traced anyways. To avoid that, this patch adds probabilistic termination to light samples - if the contribution before checking for shadowing is below a user-defined threshold, the sample will be discarded with probability (1 - (contribution / threshold)) and otherwise kept, but weighted more to remain unbiased. This is the same approach that's also used in path termination based on length. Note that the rendering remains unbiased with this option, it just adds a bit of noise - but if the setting is used moderately, the speedup gained easily outweighs the additional noise. Reviewers: #cycles Subscribers: sergey, brecht Differential Revision: https://developer.blender.org/D2217
2016-10-03Fix Cycles CUDA performance on CUDA 8.0.Brecht Van Lommel
Mostly this is making inlining match CUDA 7.5 in a few performance critical places. The end result is that performance is now better than before, possibly due to less register spilling or other CUDA 8.0 compiler improvements. On benchmarks scenes, there are 3% to 35% render time reductions. Stack memory usage is reduced a little too. Reviewed By: sergey Differential Revision: https://developer.blender.org/D2269
2016-08-03Cycles: Recent SSS inline changes broke CPU testsSergey Sharybin
Very weird, but let's just fall back a bit for now.
2016-08-01Cycles: Tweaks to support CUDA 8 toolkitSergey Sharybin
All the changes are mainly giving explicit tips on inlining functions, so they match how inlining worked with previous toolkit. This make kernel compiled by CUDA 8 render in average with same speed as previous kernels. Some scenes are somewhat faster, some of them are somewhat slower. But slowdown is within 1% so far. On a positive side it allows us to enable newer generation cards on buildbots (so GTX 10x0 will be officially supported soon).
2016-07-11Cycles: Move BVK kernel files to own directorySergey Sharybin
BVH traversal is not really that much a geometry and we've got quite some traversals now. Makes sense to keep them separate in the name of source structure clarity.
2016-06-23Cycles: Add multi-scattering, energy-conserving GGX as an option to the ↵Lukas Stockner
Glossy, Anisotropic and Glass BSDFs This commit adds a new distribution to the Glossy, Anisotropic and Glass BSDFs that implements the multiple-scattering microfacet model described in the paper "Multiple-Scattering Microfacet BSDFs with the Smith Model". Essentially, the improvement is that unlike classical GGX, which only models single scattering and assumes the contribution of multiple bounces to be zero, this new model performs a random walk on the microsurface until the ray leaves it again, which ensures perfect energy conservation. In practise, this means that the "darkening problem" - GGX materials becoming darker with increasing roughness - is solved in a physically correct and efficient way. The downside of this model is that it has no (known) analytic expression for evalation. However, it can be evaluated stochastically, and although the correct PDF isn't known either, the properties of MIS and the balance heuristic guarantee an unbiased result at the cost of slightly higher noise. Reviewers: dingto, #cycles, brecht Reviewed By: dingto, #cycles, brecht Subscribers: bliblubli, ace_dragon, gregzaal, brecht, harvester, dingto, marcog, swerner, jtheninja, Blendify, nutel Differential Revision: https://developer.blender.org/D2002
2016-05-25Cycles CUDA: reduce branched path stack memory by sharing indirect ShaderData.Brecht Van Lommel
Saves about 15% for the branched path kernel.
2016-05-23Cycles CUDA: reduce stack memory by reusing ShaderData.Brecht Van Lommel
57% less for path and 48% less for branched path.
2016-03-25Cycles: Cleanup, indent nested preprocessor directivesSergey Sharybin
Quite straightforward, main trick is happening in path_source_replace_includes(). Reviewers: brecht, dingto, lukasstockner97, juicyfruit Differential Revision: https://developer.blender.org/D1794
2016-02-19Workaround for T47213: branched path sampling issues with CUDA 7.5.Brecht Van Lommel
2016-01-14Cycles: Tweak inline policy for some functionsSergey Sharybin
The goal is to make Experimental kernel closer in performance to the official kernel, avoiding spills and such. There should not be big impact on official kernel, own tests showed few percent performance drop on laptop's GPU. CPU was always the same speed on AVX, AVX2 and SSE4.1 CPUs i've been testing here. This seems to be the last essential step before we can get rid of Experimental kernel and enable SSS officially on GPU without causing some major performance issues. Surely some more tweaks are possibly required, but that we can do for until cows go home anyway.
2016-01-07Cycles: Refactor how we pass bounce info to light path node.Thomas Dinges
This commit changes the way how we pass bounce information to the Light Path node. Instead of manualy copying the bounces into ShaderData, we now directly pass PathState. This reduces the arguments that we need to pass around and also makes it easier to extend the feature. This commit also exposes the Transmission Bounce Depth to the Light Path node. It works similar to the Transparent Depth Output: Replace a Transmission lightpath after X bounces with another shader, e.g a Diffuse one. This can be used to avoid black surfaces, due to low amount of max bounces. Reviewed by Sergey and Brecht, thanks for some hlp with this. I tested compilation and usage on CPU (SVM and OSL), CUDA, OpenCL Split and Mega kernel. Hopefully this covers all devices. :)
2015-12-02Cycles: Fix SSS object not properly reflected in glossy object with indirect ↵Sergey Sharybin
clamping This fixes remained issues reported in T46908.
2015-11-28Cycles: Fix wrong volume stack after SSS bounceSergey Sharybin
Was introduced by a recent fixes, now it should be all correct and additionally it solves the TODO mentioned in the code.
2015-11-28Cycles: Fix wrong original ray used for SSS bakingSergey Sharybin
Also de-duplicated some code by moving to an utility function.
2015-11-28Cycles: Set of fixes for delayed SSS ray tracingSergey Sharybin
There were multiple issues which are solved now: - It was possible that ray wouldn't be bounced off the BSSRDF, for example when PDF or shader eval is zero. In this case PathState might have been left in pre-bounced state which would have been gave incorrect shading results. This is solved by having separate PathState for each of the hits. - Path radiance summing wasn't happening correct as well, indirect rays were using wrong path radiance in the case when there were more than one hit recorded. This is now using a bit trickier state machine which calculates path radiance for just SSS (both direct and indirect) and then sums it back to the final radiance. - Previous commit wasn't totally correct either and was an induced bug due to wrong path state left from the "un-happened" ray bounce. There should be no special case happening here, BSSRDFs will be replaced with diffuse ones due to PATH_RAY_DIFFUSE_ANCESTOR flag. - Merged back codebases for "delayed" and "immediate" indirect SSS ray tracing, hopefully making it easier to maintain the codebase. Sure this changes brings memory usage back by about 4-5%, but overall it's still about 2x memory reduction for the experimental kernel here. Thanks Brecht for the review!
2015-11-28Cycles: Fallback to diffuse BSDF for the indirect SSS rays when BSSRDF is hitSergey Sharybin
This is actually how it was intended to work, just didn't notice it wasn't really happening in the main ray loop. Solves some memory issues reported in T46880.
2015-11-27Cycles: Fully roll-back to non-delayed SSS indirect rays for CPUSergey Sharybin
There are some issues to be solved with the recent optimization we did for the indirect rays for the SSS. Those issues will take a bit of a time to be fully solved still and we need to unlock Caminandes team now, so let's revert some changes back. CUDA will still use delayed indirect rays since it's an experimental feature. For the details about what's to be done still please refer to T46880.
2015-11-27Revert "Cycles: Fix wrong SSS with regular path tracing and clamping enabled"Sergey Sharybin
This wasn't really a complete fix and only worked if there was a single scatter event recorded only. Proper fix requires some more thoughts to make it correct without memory use increase. This reverts commit bf9e88bfbebaf5c6228363560970fa526e779c8b.
2015-11-26Cycles: Fix wrong SSS with regular path tracing and clamping enabledSergey Sharybin
Radiance sum and reset was happening in different order after 26f1c51. This is a quick fix to unlock Caminandes team, perhaps we can avoid having separate variable to detect when radiance is to be sum.