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
2015-01-12Cycles: Add leaf primitives sanity check asserts to the kernelSergey Sharybin
This way we'll notice that leaf splitting didn't happen correct pretty easily in debug builds. There'll be absolutely no impact on release builds.
2015-01-12Cycles: Enable leaf split by primitive type and adopt BVH traversal for thisSergey Sharybin
This commit enables BVH leaf nodes split by the primitive type and makes it so BVH traversal code is now aware and benefits from this. As was mentioned in original commit, this change is crucial to be able to do single ray to multiple triangle intersection. But it also appears to give barely visible speedup in some scene. In any case there should be no noticeable slowdown, and this change is what we need to have anyway.
2015-01-12Cycles: BVH params option to split leaf node by primitive typesSergey Sharybin
The idea of this change is make it possible to split leaf nodes by primitive type, making leaf containing primitives of the same type. This would become handy when working on a single ray to multiple triangles intersection code, plus with careful implementation it might give some extra benefits on BVH traversal code by avoiding primitive type fetch and check for each primitive in the node. But that's a bit tricky to have benefits on this change only because depth of BVH increases. This option is not exposed to the interface at all and not used even secretly, the commit is only needed to help working further in this direction without messing around with local patches and worrying of them running out of date.
2015-01-02Cycles: Fix unneeded int/float conversion happened in previous commitSergey Sharybin
2015-01-02Fix T43027: OpenCL kernel compilation broken after QBVHSergey Sharybin
OpenCL apparently does not support templates, so the idea of generic function for swapping is a bit of a failure. Now it is either inlined into the code (in triangle intersection) or has specific implementation for QBVH. This is probably even better, because we can't create QBVH-specific function in util_math anyway.
2014-12-31Cycles: Post-reintegration tweaks to ensure things do compileSergey Sharybin
This commit contains all the tweaks which were missing in initial patch re-integration from the standalone Cycles repository. This commit also contains an utility cmake macro to help linking targets with different libraries for release/debug builds, the name currently is target_link_libraries_decoupled it gets a target and list of libraries and makes sure debug builds are using libraries with "_d" suffix. After all this changes it'll hopefully be easier to interchange patches between blender and standalone repositories, because they're now quite identical.
2014-12-31Cycles: Be ready for gflags namespace auto-detectSergey Sharybin
This way it is now possible to use gflags >= 2.1, where all the functions were moved from google to gflags namespace. This isn't currently used in blender, but for standalone repository this change is essential.
2014-12-31Cycles: Fix compilation error with compilers which doesn't support AVXSergey Sharybin
For SSE checks still could be decoupled to be able to compile SSE2 kernel and not SSE4 depending on the CPU or so.
2014-12-29Cycles: Fix MSVC which desn't like condition to be split by preprocessorSergey Sharybin
2014-12-29Revert "Fix T42888: Separate and Combine HSV distorts the hue value"Sergey Sharybin
This reverts commit 1549fea9995c348bc14a9105df5e460644e2b33a. After some further discussion with other developers in the team it becomes clear there's no correct solution here. It is just more matter of what's more convenient in particular case. We're just going back to old code to avoid possible frustration with the older files in newer blenders. This also means all HSV/HSL is considered to be "linear" in the shading nodes. Would be ported to 2.73 final.
2014-12-29Cycles: Add asserts around BVH stack pushesSergey Sharybin
This way we're kind of safer to troubleshoot possible stack overflow issues.
2014-12-29Cycles: Bump stack size for QBVH traversal codeSergey Sharybin
Traversal now can push up to 2x of nodes to the stack, so need some tweaks to the stack size.
2014-12-29Cycles: Add some sanity check asserts in the traversal codeSergey Sharybin
This way we'll be sure (in debug builds) that regular BVH traversal is not used for QBVH tree (could happen because of mismatch of logic in kernel and render).
2014-12-27Cycles: Fix visibility check for instanced nodesSergey Sharybin
The issue is that only instance node contains proper visibility flags, nodes from instanced BVH are not correct.
2014-12-25Cycles: Distance optimization for QBVHSergey Sharybin
This commit implements heuristic which allows to skip nodes pushed to the stack from intersection if distance to them is larger than the distance to the current intersection. This should solve speed regression which i didn't notice in the original QBVH commit (which could have because i had WIP version of this patch applied in my local branch). From quick tests speed seems to be much closer to what is was with regular BVH. There's still some possible code cleanup, but they'll need a bit of assembly code check and now i want to make it so artists can happily use Cycles over the holidays.
2014-12-25Cycles: Fix really bad bug with shadow rays on non-SSE CPUsSergey Sharybin
basically shadow rays were totally broken and most of the time did not record any intersections, leading to really ad rendering artifacts. This commit makes it so regardless of enabled optimization level render result would be the same.
2014-12-25Cycles: Workaround CUDA 6.5.16 error after watertight commitSergey Sharybin
This issue doesn't happen with 6.5.12 and there's slight piece of hope it'll be fixed in next toolkit releases.. For now we're forcing CUDA to not inline ray precalculation. This could lead to some speed regression, but wouldn't expect it to be huge -- this code does not run that often comparing to actual triangle intersection.
2014-12-25Cycles: Fix compilation error on non-SSE2 architecturesSergey Sharybin
2014-12-25Cleanup: Fix Cycles Apache header.Thomas Dinges
This was already mixed a bit, but the dot belongs there.
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.