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-11-09Cycles: Replace __MAX_CLOSURE__ build option with runtime integrator variableMai Lavelle
Goal is to reduce OpenCL kernel recompilations. Currently viewport renders are still set to use 64 closures as this seems to be faster and we don't want to cause a performance regression there. Needs to be investigated. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2775
2017-11-08Cycles: add bevel shader, for raytrace based rounded edges.Brecht Van Lommel
The algorithm averages normals from nearby surfaces. It uses the same sampling strategy as BSSRDFs, casting rays along the normal and two orthogonal axes, and combining the samples with MIS. The main concern here is that we are introducing raytracing inside shader evaluation, which could be quite bad for GPU performance and stack memory usage. In practice it doesn't seem so bad though. Note that using this feature can easily slow down renders 20%, and that if you care about performance then it's better to use a bevel modifier. Mainly this is useful for baking, and for cases where the mesh topology makes it difficult for the bevel modifier to work well. Differential Revision: https://developer.blender.org/D2803
2017-11-08Cycles: antialias normal baking if the mesh has a bump map.Brecht Van Lommel
2017-11-05Cycles: reduce closure memory usage for emission/shadow shader data.Brecht Van Lommel
With a Titan Xp, reduces path trace local memory from 1092MB to 840MB. Benchmark performance was within 1% with both RX 480 and Titan Xp. Original patch was implemented by Sergey. Differential Revision: https://developer.blender.org/D2249
2017-10-05Code refactor: split displace/background into separate kernels, remove luma.Brecht Van Lommel
2017-10-04Fix use of uninitialized memory in Cycles normal baking.Brecht Van Lommel
2017-09-28Cycles: reduce subsurface stack memory usage.Brecht Van Lommel
This is done by storing only a subset of PathRadiance, and by storing direct light immediately in the main PathRadiance. Saves about 10% of CUDA stack memory, and simplifies subsurface indirect ray code.
2017-09-20Cycles: slightly improve BSDF sample stratification for path tracing.Brecht Van Lommel
Similar to what we did for area lights previously, this should help preserve stratification when using multiple BSDFs in theory. Improvements are not easily noticeable in practice though, because the number of BSDFs is usually low. Still nice to eliminate one sampling dimension.
2017-09-13Code cleanup: store branch factor in PathState.Brecht Van Lommel
2017-09-13Code cleanup: abstract shadow catcher logic more into accumulation code.Brecht Van Lommel
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-20Cycles: support baking normals plugged into BSDFs, averaged with closure weight.Brecht Van Lommel
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-02-25Fix T50698: Cycles baking artifacts with transparent surfaces.Brecht Van Lommel
2017-01-23Cycles: Make object flag names more obvious that hey are object and not shaderSergey Sharybin
2016-10-31Cycles: Deduplicate AO calculationLukas Stockner
No functional changes.
2016-10-29Cycles: Implement texture coordinates for Point, Spot and Area LampsLukas Stockner
When using the Normal output of the Texture Coordinate node on Point and Spot lamps, the coordinates now depend on the rotation of the lamp. On Area lamps, the Parametric output of the Geometry node now returns UV coordinates on the area lamp. Credit for the Area lamp part goes to Stefan Werner (from D1995).
2016-09-11Cycles: Replace object index hack with actual checks for SD_TRANSFORM_APPLIEDMai Lavelle
Using ones complement for detecting if transform has been applied was confusing and led to several bugs. With this proper checks are made. Also added a few transforms where they were missing, mostly affecting baking and displacement when `P` is used in the shader (previously `P` was in the wrong space for these shaders) Also removed `TIME_INVALID` as this may have resulted in incorrect transforms in some cases. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2192
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-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-31Fix T46207: Slow OpenCL GPU bake and blown out baking Cycles renderSergey Sharybin
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-05-18Fix T47727: Weird bake results with non integer color valuesSergey Sharybin
2016-05-07Some fixes for CUDA runtime compile:Thomas Dinges
* When Baking wasn't used we got an error. * On top of Volume Nodes (NODES_FEATURE_VOLUME), we now also check if we need volume sampling code, so we can disable that as well and save some further compilation time.
2016-04-23Fix T48216: Cycles light fallof node gives black emission in baking.Brecht Van Lommel
2016-02-21Fix T43388, fix T40369: Cycles baking not antialiasing textures.Lukas Stockner
This re-enables the AA jittering, but with proper clamping so that u >= 0, v >= 0 and u+v <= 1. Differential Revision: https://developer.blender.org/D1254
2016-02-19Workaround for T47213: branched path sampling issues with CUDA 7.5.Brecht Van Lommel
2016-02-06Fix T46550: Cycles combined baking black in some cases.Brecht Van Lommel
Now pass_filter is modified to have exactly the flags for the light components that need to be baked, based on the shader type. This simplifies the logic.
2016-02-05Cycles: ifdef some extra code when building split kernelsSergey Sharybin
2016-01-20Cycles: Fix OpenCL kernel compilation after the bake commitSergey Sharybin
There is no function pointers in OpenCL specification. For as long as we want to support this platform we should follow the specifications. While the code is not totally optimal now, it should not be that huge of performance issue on CPU since it does jump tables just nicely, so it's not that much extra computation here.
2016-01-15Cycles-Bake: Custom Baking passesDalai Felinto
The combined pass is built with the contributions the user finds fit. It is useful for lightmap baking, as well as non-view dependent effects baking. The manual will be updated once we get closer to the 2.77 release. Meanwhile the new page can be found here: http://dalaifelinto.com/blender-manual/render/cycles/baking.html Reviewers: sergey, brecht Differential Revision: https://developer.blender.org/D1674
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-30Cycles: Optionally output luminance from the shader evaluation kernelSergey Sharybin
This makes it possible to move some parts of evaluation from host to the device and hopefully reduce memory usage by avoid having full RGBA buffer on the host. Reviewers: juicyfruit, lukasstockner97, brecht Reviewed By: lukasstockner97, brecht Differential Revision: https://developer.blender.org/D1702
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: Fix missing indirect subsurface initialization in the bake codeSergey Sharybin
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.
2015-11-25Cycles: Trace indirect subsurface rays by restarting the integrator loopSergey Sharybin
This gives much lower stack usage on GPU and reduces kernel memory size to around 448MB on GTX560Ti (comparing to 652MB with previous commit and 946MB with official release). There's also a barely measurable speedup of around 5%, but this is to be confirmed still. At this stage we're using only ~3% for the experimental kernel and SSS rendering seems to be faster by 40% and after some further testing we might consider making SSS and CMJ official features and remove experimental precompiled kernels.
2015-11-25Cycles: Delay shooting SSS indirect raysSergey Sharybin
The idea is to delay shooting indirect rays for the SSS sampling and trace them after the main integration loop was finished. This reduces GPU stack usage even further and brings it down to around 652MB (comparing to 722MB before the change and 946MB with previous stable release). This also solves the speed regression happened in the previous commit and now simple SSS scene (SSS suzanne on the floor) renders in 0:50 (comparing to 1:16 with previous commit and 1:03 with official release).
2015-10-08Cycles: Cleanup, whitespace around keywordsSergey Sharybin
2015-08-26Fix T45232: Cycles bake artifacts with transparent texturesSergey Sharybin
The issue was caused by uninitialized ray used for composite and AO evaluation. Can;t really think of "proper" ray configuration here, it's all a bit arbitrary but think initializing the ray in a way so we look at the surface in a negative normal direction is much better alternative to uninitialized ray. Open for alternative suggestions tho.
2015-05-07Correct typo: ifdef'd now, but obviously wrongCampbell Barton
2015-03-27Cycles: Code cleanup, spaces around keywordsSergey Sharybin
This inconsistency drove me totally crazy, it's really confusing when it's inconsistent especially when you work on both Cycles and Blender sides. Shouldn;t cause merge PITA, it's whitespace changes only, Git should be able to merge it nicely.
2015-02-23Disable Bake Jitter code (recently added)Dalai Felinto
The following commits were supposed to add anti-alias and help with OSL baking: 7b16fda3799d5b7167ef7ffe533d654810f44e36 1b92dfa96160f8151972d73337d5a927d8b89297 However they introduced other issues (artifacts mostly), see T43550 . Leaving the code ifdef'ed for now.
2015-02-20Fix T43550: Bug in Cycles Bake TextureSergey Sharybin
Issue was caused by the changes in 7b16fda which changed the initial state for rng. This commit makes it so the same initial hash is used (which solves the regression without distorting AA-looking image. It also makes it so OpenCL compiler is happy about this code (before this change it'll complain about trying to cast private variable to global one).
2015-01-27Fix T43388 Cycles Baking gives different results than Cycles RenderDalai Felinto
Reported and nailed down by Michale (MeshLogic). The code that fixes this was commented out, but Brecht gave the go ahead to use it even if it is not the real solution