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
2014-12-25Cleanup: Typo fixes for comments.Thomas Dinges
2014-12-25Cycles: Implement QBVH tree traversalSergey Sharybin
This commit implements traversal for QBVH tree, which is based on the old loop code for traversal itself and Embree for node intersection. This commit also does some changes to the loop inspired by Embree: - Visibility flags are only checked for primitives. Doing visibility check for every node cost quite reasonable amount of time and in most cases those checks are true-positive. Other idea here would be to do visibility checks for leaf nodes only, but this would need to be investigated further. - For minimum hair width we extend all the nodes' bounding boxes. Again doing curve visibility check is quite costly for each of the nodes and those checks returns truth for most of the hierarchy anyway. There are number of possible optimization still, but current state is good enough in terms it makes rendering faster a little bit after recent watertight commit. Currently QBVH is only implemented for CPU with SSE2 support at least. All other devices would need to be supported later (if that'd make sense from performance point of view). The code is enabled for compilation in kernel. but blender wouldn't use it still.
2014-12-25Cycles: Code cleanup, de-duplicate definition of FEATURESergey Sharybin
Previously every BVH traversal file was defining macro to check which features should be compiled in, now this macro is defined in the parent header.
2014-12-25Cycles: Rework BVH functions calls a little bitSergey Sharybin
Basic idea is to allow multiple implementation per feature-set, meaning this commit tries to make it easier to hook new algorithms for BVH traversal.
2014-12-25Cycles: Add some utility functions and structuresSergey Sharybin
Most of them are not currently used but are essential for the further work. - CPU kernels with SSE2 support will now have sse3b, sse3f and sse3i - Added templatedversions of min4, max4 which are handy to use with register variables. - Added util_swap function which gets arguments by pointers. So hopefully it'll be a portable version of std::swap.
2014-12-25Cycles: Implement watertight ray/triangle intersectionSergey Sharybin
Using this paper: Sven Woop, Watertight Ray/Triangle Intersection http://jcgt.org/published/0002/01/05/paper.pdf This change is expected to address quite reasonable amount of reports from the bug tracker, plus it might help reducing the noise in some scenes. Unfortunately, it's currently about 7% slower than the previous solution with pre-computed triangle plane equations, but maybe with some smart tweaks to the code (tests reshuffle, using SIMD in a nice way or so) we can avoid the speed regression. But perhaps smartest thing to do here would be to change single triangle / ray intersection with multiple triangles / ray intersections. That's how Embree does this and it's watertight single ray intersection is not any faster that this. Currently only triangle intersection is modified accordingly to the paper, in the future we would also want to modify the node / ray intersection. Reviewers: brecht, juicyfruit Subscribers: dingto, ton Differential Revision: https://developer.blender.org/D819
2014-12-25Cycles; Code cleanup, make it more obvious what #endif belongs toSergey Sharybin
2014-12-25Cycles: Make it more clear offsets in BVH constructionSergey Sharybin
Previously offsets were calculated based on the BVH node size, which is wrong and real PITA in cases when some extra data is to be added into (or removed from) the node. Now use offsets which are not calculated form the node size.
2014-12-25Cycles: Don't do node visibility check in subsurface and volume traversalSergey Sharybin
Visibility flags are set to all visibility anyway, So there was no reason to perform that test. TODO: We need to investigate if having primitive intersection functions which doesn't do visibility check gives any speedup here as well.
2014-12-25Cycles: Move triangle intersection functions into own fileSergey Sharybin
This way extending intersection routines with some pre-calculation step wouldn't explode the single file size, hopefully keeping them all in a nice maintainable state.
2014-12-25Cycles: Optimize vector math node without links to single values.Thomas Dinges
2014-12-16Fix T42888: Separate and Combine HSV distorts the hue valueSergey Sharybin
These nodes were assuming sRGB input/output which is for sure wrong for the shader pipeline which works in the linear space. So now conversion to/from linear space happens in these nodes which makes them making sence in the shader context but which might change look and feel of existing scenes.
2014-12-10Cycles: Fix difference between SVM and OSL implementation of Normal nodeSergey Sharybin
SVM was normalizing the input normal, OSL did not. This lead to render result differences across this shading systems.
2014-12-10Fix T42818: Cycles SSS passes are incorrect for SSS size of 0Sergey Sharybin
This was caused by some internal optimization which evaluated SSS with size of zero as BSDF but used different ID so the evaluation result didn't appear in regular diffuse pass. This lead to situation when SSS data was nowhere stored if the size was zero. Now SSS with zero size and close-to-zero sizes will be handled in the same way from the passes point of view.
2014-12-08Cleanup: spellingCampbell Barton
2014-12-03Cycles: Synchronize SCons with CMake in regard of loggingSergey Sharybin
2014-12-03Cycles: Remove workaround in ShaderClosureSergey Sharybin
Since the aligned allocation of shader closures in OSL memory pool this workaround is no longer needed. Also put a comment which describes the desired layout of the structure so array of shader closures is all nicely aligned.
2014-12-03Cycles: Use 16 bytes aligned closures in OSLSergey Sharybin
This solves bugs like T42210 which are caused by compiler being smart and using some SSE instructions to operate with closure classes, which was failing because those classes are not allocated by the regular allocator but allocated in memory pool in OSL. With newer versions of OSL it is now possible to force closure classes being aligned to a given boundary and this commit uses this new functionality. Unfortunately, it means we're no longer compatible with older versions of OSL, only latest git version from upstream and our branch at github are supported: https://github.com/Nazg-Gul/OpenShadingLanguage/tree/blender-fixes For OSX and Windows it's not an issue because libraries are already updated there, Linux users would need to run install_deps script.
2014-12-02Cycles: Tweak to the include paths after recent atomics changeSergey Sharybin
Who could knew that include directories are not inherited in scons..
2014-11-28Cycles: Code cleanup, remove dead codeSergey Sharybin
2014-11-20Cleanup: Remove SD_BSDF_GLOSSY flag, unused.Thomas Dinges
2014-11-19Cycles: Missed some changes in the previous hair motion blur fixSergey Sharybin
So now cases when object has both hair motion blur and deformation motion blur vector pass is all correct. We could get rid of the flag in the future, still need to look deeper into all the areas trying to find a more clear solution.
2014-11-18Fix T42475: Vector motion blur on hairSergey Sharybin
Issue was caused by mismatch in pre/post transform matrix spaces for mesh and curve vectors. This happened because of current way how static transform apply works: it only stores post/pre in the world space if there's triangle motion exists. This lead to situation when there's no triangle motion happening but was hair motion happening. After long time of trying to solve it in a nice way, ended up solving it in a bit slow way -- pre/post transform is still storing in the same spaces as they used to be stored and just convert hair pre/post position to a world space in the kernel. This is because currently it's not so clear how to deal with cases when curve and mesh motion needs different space of pre/post transform (which happens in cases when only one of the motions exists). Would think of some magic, and meanwhile artists could be happy with proper render results.
2014-11-13Cycles: Update some comments in volume code.Thomas Dinges
2014-11-12Cycles: Prevent NaN and inf in area lamp sampling caused by precision issuesSergey Sharybin
This doesn't have noticeable affect on the render times, but avoids possible numerical issues.
2014-11-12Fix T41066: MSVC + AVX2 kernel causes artifacts in hair render.Thomas Dinges
The issue lies in the FMA functions, so disable them on Windows for now.
2014-11-12Cleanup, please follow existing style when adding new flags. ;)Thomas Dinges
2014-11-12Cleanup, typo fixes.Thomas Dinges
2014-11-11Fix T41783: Cycles baking ignores displacementDalai Felinto
Create unique flag for output shaders with displacement data and use it to calculate transformed normal. Implementation suggested by Brecht Van Lommel. Reviewers: brecht Differential Revision: https://developer.blender.org/D890
2014-11-11Fix T41873: Different 'seed' values do not yield different noise patterns ↵Dalai Felinto
when using cycles texture bake As per instructions by Brecht Van Lommel.
2014-11-10Cycles: Speedup for homogenous volumes in decoupled volume samplingSergey Sharybin
The idea is to avoid memory allocation when only one segment step is to be allocated. This gives some speedup which is difficult to measure on this trashcan from hell, but it's about from 7% to 10% in the extreme case with single volume filling the whole of the viewport. This seems to depends on the phase of the bug-o-meter in the studio. On the linux boxes it's not that spectacular speedup, it's about 2% on my laptop and about 3% on the studio desktop. This is likely because of the awesomeness of jemalloc.
2014-11-08Cycles: Remove dead branch for Distant lamps, ls->t is always FLT_MAX here.Thomas Dinges
2014-11-08Cleanup: cycles whitespaceCampbell Barton
2014-11-07Cycles: Tweak to the expf() speed workaroundSergey Sharybin
Add compile-time check for particular glibc version which fixed the issue. This makes it so own-compiled blender is the fastest in the world, and the only issue remains what should we do for release builds. After some discussion with Campbell we decided to keep it as is for now because slowdown is not that much noticeable. We'll disable this workaround for release builds when all the majority of the distros will switch to the new version of glibc.
2014-11-06Cycles: Add "Max Bounce" control for lampsThomas Dinges
With this setting, we can limit the influence of a lamp to a certain amount of bounces. 0 = Only direct light contribution 1 = 1 light bounce ... Differential revision: https://developer.blender.org/D860 You can find an example render in the release logs: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.73/Cycles
2014-11-04Cycles: Don't check shader for volume when checking if camera is inside volumeSergey Sharybin
Intersection code already ignores objects without volume closure so checking it afterwards is not needed.
2014-11-04Fix T42411: Camera inside volume + particle dupli (object/group) doesn't workSergey Sharybin
The issue was caused by missing current object instance initialization after object was ignored for instance push.
2014-11-04Cycles: Remove compatibility code for OSL-1.4Sergey Sharybin
That code was mainly needed for the transition period, now we've got all platforms updated to new OSL. Plus there are some crucial fixes baking in the current upstream sources which we'll need to have for the next Blender release.
2014-11-04Cycles: Be ready for new OIIO and OSL librariesSergey Sharybin
Even tho it's not 100% clear when we'll switch to OSL-1.6 we'd better start preparing earlier for this, so we don't spend time on this later. Plus this code helps troubleshooting some OSL issues, which requires testing with latest versions of OSL.
2014-11-01Cleanup: Remove unused light function.Thomas Dinges
2014-10-31Fix T42391: HSV correction shader node gives negative valuesSergey Sharybin
This mainly happens when over-saturating already saturated color. After some discussion with Campbell and loads of tests we decided to clamp the result RGB color. As an alternative we might want to clamp corrected HSV values instead, but that would lead to some larger changes in the render results. TODO: The same is to be done for compositor nodes.
2014-10-30Cycles / OSL: Support microfacet() closure color function from OSL 1.5Thomas Dinges
This is basically just a wrapper class, which maps the generic call from the OSL spec to our closures. Example usage: shader microfacet_osl( color Color = color(0.8), int Distribution = 0, normal Normal = N, vector Tangent = normalize(dPdu), float RoughnessU = 0.0, float RoughnessV = 0.0, float IOR = 1.4, int Refract = 0, output closure color BSDF = 0) { if (Distribution == 0) BSDF = Color * microfacet("ggx", Normal, Tangent, RoughnessU, RoughnessV, IOR, Refract); else BSDF = Color * microfacet("beckmann", Normal, Tangent, RoughnessU, RoughnessV, IOR, Refract); }
2014-10-29Cycles: Optimize math node without links to a single value nodeSergey Sharybin
Pretty straightforward implementation. Just needed to move some functions around to make them available at shader compile time.
2014-10-29Cleanup: Style fixes for closures, mainly bitflags and conditions.Thomas Dinges
2014-10-29Cleanup: Remove unused function in Translucent BSDF.Thomas Dinges
2014-10-23Cleanup: spellingCampbell Barton
2014-10-22Cycles: Code cleanup -- use bitshifts instead of hardcoded constantsSergey Sharybin
This way it's easier to extend bitfields and see when we start running out of free bits. Plus added brief description of what SD_VOLUME_CUBIC flag means.
2014-10-22Cycles: Expose volume voxel data interpolation to the interfaceSergey Sharybin
It is per-material setting which could be found under the Volume settings in the material and world context buttons. There could still be some code-wise improvements, like using variable-size macro for interp3d instead of having interp3d_ex to which you can pass the interpolation method.
2014-10-22Cycles: Implement tricubic b-spline interpolation for CPU texture_imageSergey Sharybin
This is the first step towards supporting cubic interpolation for voxel data (such as smoke and fire). It is not epxosed to the interface at all yet, this is to be done soon after this change.
2014-10-16Cycles: Implement an area preserving parameterization sampling for area lampsSergey Sharybin
Replace old code for area lamps which was more like incorrect with more correct one using the following paper as a reference: Carlos Urena et al. An Area-Preserving Parametrization for Spherical Rectangles. https://www.solidangle.com/research/egsr2013_spherical_rectangle.pdf Implementation is straight from the paper, currently the rectangle constants are calculated for each of the samples. Ideally we need to pre-calculate them. Some comparison images are available there http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.73/Cycles Reviewers: brecht, juicyfruit Subscribers: dingto, ton Differential Revision: https://developer.blender.org/D823