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: Fix crash after recent BVH changes on empty BVH treesSergey Sharybin
It's apparently not nice to access 0th element of zero-size vector in C++.
2015-01-12Cycles: Fix compilation error on platforms without SSE supportSergey Sharybin
Overview this in one of the previous BVH commits.
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: Optimize leaf splitting code by avoid vector allocationSergey Sharybin
Use variables allocated in the stack and avoid heap allocation which should make leaf splitting code a bit faster.
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-02cleanup: styleCampbell Barton
2014-12-27Cycles: Mark visibility TODO as resolvedSergey Sharybin
2014-12-25Cleanup: Typo fixes for comments.Thomas Dinges
2014-12-25Cycles: Correction for node tail copy on packing BVHSergey Sharybin
This is harmless for now because tail of the node is zero in there, but better to fix it early so in the case of extending BVH nodes this code doesn't give issues.
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: Store proper empty boundbox for missing child nodes in QBVHSergey Sharybin
The idea is to make sure those childs would never be intersected with a ray in order to make it so kernel never worries about number of child nodes.
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: Optimize storage of QBVH node by one float4Sergey Sharybin
The idea is to store visibility flags for leaf nodes only since visibility check for inner nodes costs too much for QBVH hence it is not optimal to perform. Leaf QBVH nodes have plenty of space to store all sort of flags, so we can make nodes one element smaller, saving noticeable amount of memory.
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: Replace magic constant in the code with actual node sizeSergey Sharybin
2014-12-25Cycles: Avoid over-allocation in packing BVH instancesSergey Sharybin
This solves quite an over-allocation in BVH instances packing code, unfortunately, it's not a magic bullet to solve memory bump caused by the recent QBVH changes. For that we'll likely need to decouple storage for leaf and inner nodes. However, it's not really clear for now if it's something important since that'd still be just a fraction of memory comparing to all the hi-res textures.
2014-12-25Cycles: Implement refit_nodes for QBVHSergey Sharybin
Title says it all, quite straightforward implementation. Would only mention that there's a bit of code duplication around packing node into pack.nodes. Trying to de-duplicate it ends up in quite hairy code (like functions with loads of arguments some of which could be NULL in certain circumstances etc..). Leaving solving this duplication for later.
2014-12-25Cycles: Use proper node counter to allocate QBVH nodesSergey Sharybin
Before all the nodes were counted and allocated, leading to situations when bunch of allocated memory is not used because reasonable amount of nodes are simply ignored.
2014-12-09Cycles: Code cleanup, typoSergey Sharybin
2014-11-24Cycles: Speedup BVH build for certain compilersSergey Sharybin
The issue was noticed with gcc-4.7 (used by the release build environment) which didn't generate optimal enough code for BVH references swap. Seems it looked up for the assign operator for each of the reference structure members even though nothing special was required for assignment. Forcing compiler to use simple memory copy gives speedup of like 2-3 times. The issue doesn't happen with OSX's clang and new gcc-4.9, but since we're gonna to stick to gcc-4.7 for official releases for quite some time still it's nice to have performance issues resolved for all the compilers. Didn't put the code into #ifdef so if in the future some issues appears with alignment or assignment which need to happen as an operator we notice this earlier.
2014-11-24Cycles: Log time spent on the BVH buildSergey Sharybin
2014-09-01Cycles: Rebuild BVH from scratch if loading cache failedSergey Sharybin
Before this Cycles used to try using the cache even so it knew for the fact that reading it from the disk failed. This change doesn't make it more stable if someone will try to trick Cycles and give malformed data but it solves general cases when Blender crashed during the cache write and will preserve rendering from crashing when trying to use that partial cache.
2014-08-02SpellingCampbell Barton
2014-05-03Code cleanup: Add -Werror=float-conversion to CyclesCampbell Barton
2014-04-22Cycles: optimization for hair BVH build, allow max 2 hair curves per leaf.Brecht Van Lommel
This gives me 14% reduction in render time for koro_final.blend.
2014-04-21Code cleanup: add some asserts and fix a typo in BVH build.John Pavel
Reviewed By: brecht Differential Revision: https://developer.blender.org/D467
2014-04-02Fix T39523: cycles cache BVH not working correct with deformation motion blur.Brecht Van Lommel
2014-03-29Cycles: add support for curve deformation motion blur.Brecht Van Lommel
2014-03-29Cycles: add support for mesh deformation motion blur.Brecht Van Lommel
2014-03-29Cycles code refactor: change curve key to float4 for easier storage as ↵Brecht Van Lommel
attribute.
2014-03-29Cycles code refactor: changes to make adding new primitive types easier.Brecht Van Lommel
2013-10-26spelling: use American spelling for canceledCampbell Barton
2013-09-17Fix #36750: windows crash with empty cycles scene, can't do &references[0] withBrecht Van Lommel
MSVC when references is an empty vector.
2013-09-17Fix #36738: object ray visibility flags not working in cycles viewport if thereBrecht Van Lommel
is only a single object in the scene.
2013-08-18Updates for the Cycle Hair UI. With the following changesStuart Broadfoot
- Removed the cycles subdivision and interpolation of hairkeys. - Removed the parent settings. - Removed all of the advanced settings and presets. - This simplifies the UI to a few settings for the primitive type and a shape mode.
2013-07-30Cycles:Thomas Dinges
* Increase the maximum amount of closures per shader from 16 to 64, so more complex closure trees can be rendered. I measured performance on CPU and GPU (Geforce 540M) and couldn't find a performance impact, but if someone encounters a noticeable impact on his system, please report.
2013-06-18Cycles: attempt to fix internal compile error with some visual studio buildsBrecht Van Lommel
2013-06-18Cycles: optimization for BVH traveral on CPU's with SSE3, using code from ↵Brecht Van Lommel
Embree. On the BMW scene, this gives roughly a 10% speedup overall with clang/gcc, and 30% speedup with visual studio (2008). It turns out visual studio was optimizing the existing code quite poorly compared to pretty good autovectorization by clang/gcc, but hand written SSE code also gives a smaller speed boost there. This code isn't enabled when using the hair minimum width feature yet, need to make that work with the SSE code still.
2013-06-04Cycles:Thomas Dinges
* Revert r57203 (len() renaming) There seems to be a problem with nVidia OpenCL after this and I haven't figured out the real cause yet. Better to selectively enable native length() later, after figuring out what's wrong. This fixes [#35612].
2013-06-03Cycles / Math functions:Thomas Dinges
* Rename some math functions: len -> length len_squared -> length_squared normalize_len -> normalize_length * This way OpenCL uses its inbuilt length() function, rather than our own. The other two functions have been renamed for consistency. * Tested CPU, CUDA and OpenCL compile, should be no functional changes.
2013-05-14Cycles :Thomas Dinges
* Use is_zero(a) rather than dot(a, a) == 0, saves some calculations.
2013-04-26Fix #34172: cycles BVH build crashing in some rare circumstances on 32 bit ↵Brecht Van Lommel
linux. The problem was (again) the x86 extended precision float register being used for one float value while the other was rounded to lower precision. This caused the strictly weak order requirement for std::sort to be broken.
2013-04-16Cycles Hair: Strand Minimum Pixel SizeStuart Broadfoot
Code is added to restrict the pixel size of strands in cycles. It works best with ribbon primitives and a preset for these is included. It uses distance dependent expansion of the strands and then stochastic strand removal to give a fading. To prevent a slowdown for triangle mesh objects in the BVH an extra visibility flag has been added. It is also only applied for camera rays. The strand width settings are also changed, so that the particle size is not included in the width calculation. Instead there is a separate particle system parameter for width scaling.
2013-04-09Fix #34921: cycles rendered a specific scene with a small high poly objectBrecht Van Lommel
contained in a large low poly object very slow, due to failure case of fast multithread BVH binning. Tweaked parameter now to avoid this.
2013-02-13Fix cycles issue with BVH cache created with 64 bits and used for 32 bits ↵Brecht Van Lommel
binary, and vice versa.
2013-02-12Fix some (quite harmless) use of uninitialized memory reported by valgrind.Brecht Van Lommel
2013-01-15Cycles Hair: Introduction of Cardinal Spline Curve Segments and minor fixes.Stuart Broadfoot
The curve segment primitive has been added. This includes an intersection function and changes to the BVH. A few small errors in the line segment intersection routine are also fixed.
2013-01-03Cycles Hair: refactoring to store curves with the index of the first key and theBrecht Van Lommel
number of keys in the curve, rather than curve segments with the indices of two keys. ShaderData.segment now stores the segment number in the curve.
2013-01-03Cycles Hair: refactoring to support generic attributes for hair curves. ThereBrecht Van Lommel
should be no functional changes yet. UV, tangent and intercept are now stored as attributes, with the intention to add more like multiple uv's, vertex colors, generated coordinates and motion vectors later. Things got a bit messy due to having both triangle and curve data in the same mesh data structure, which also gives us two sets of attributes. This will get cleaned up when we split the mesh class.
2012-12-28New featureStuart Broadfoot
Patch [#33445] - Experimental Cycles Hair Rendering (CPU only) This patch allows hair data to be exported to cycles and introduces a new line segment primitive to render with. The UI appears under the particle tab and there is a new hair info node available. It is only available under the experimental feature set and for cpu rendering.