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
2019-04-16CMake: cleanup, arg rename, add definitions lastCampbell Barton
2019-03-20Cycles: Made Embree ignore curve intersections with SSS.Stefan Werner
2019-03-20Cycles: Performance optimization for Embree, resizing arrays once instead of ↵Stefan Werner
per object.
2019-01-26Cleanup: fix compiler warnings.Brecht Van Lommel
2019-01-09Cycles: Add utility to dump BVH tree as graphviz fileSergey Sharybin
2019-01-09Cycles: Make BVH wider prior to packingSergey Sharybin
This allows to do more non-trivial tree modifications to make it more dense and more friendly for vectorization.
2018-11-25Cleanup: trailing spaceCampbell Barton
2018-11-09Cycles: Cleanup, split array from vectorSergey Sharybin
Those are similar but different types, no reason to keep their definitions in a single file.
2018-11-09Cycles: Cleanup, spacing after preprocessorSergey Sharybin
It is supposed to be two spaces before comment stating which if else/endif statements corresponds to. Was mainly violated in the header guards.
2018-11-07Cycles: Added Embree as BVH option for CPU renders.Stefan Werner
Note that this is turned off by default and must be enabled at build time with the CMake WITH_CYCLES_EMBREE flag. Embree must be built as a static library with ray masking turned on, the `make deps` scripts have been updated accordingly. There, Embree is off by default too and must be enabled with the WITH_EMBREE flag. Using Embree allows for much faster rendering of deformation motion blur while reducing the memory footprint. TODO: GPU implementation, deduplication of data, leveraging more of Embrees features (e.g. tessellation cache). Differential Revision: https://developer.blender.org/D3682
2018-09-27Cycles: CleanupSergey Sharybin
2018-09-27Cycles: Sync BVH8 unaligned node packing code with BVH4Sergey Sharybin
Similar to dfae3de6bdf.
2018-08-30Fix T56612: crash in Cycles viewport render update, after recent changes.Brecht Van Lommel
BVH8 refitting code had a bug.
2018-08-30Cleanup: license header formatting.Brecht Van Lommel
2018-08-29Cleanup: trailing spaceCampbell Barton
2018-08-29Cycles: Add BVH8 and packeted triangle intersectionSergey Sharybin
This is an initial implementation of BVH8 optimization structure and packated triangle intersection. The aim is to get faster ray to scene intersection checks. Scene BVH4 BVH8 barbershop_interior 10:24.94 10:10.74 bmw27 02:41.25 02:38.83 classroom 08:16.49 07:56.15 fishy_cat 04:24.56 04:17.29 koro 06:03.06 06:01.45 pavillon_barcelona 09:21.26 09:02.98 victor 23:39.65 22:53.71 As memory goes, peak usage raises by about 4.7% in a complex scenes. Note that BVH8 is disabled when using OSL, this is because OSL kernel does not get per-microarchitecture optimizations and hence always considers BVH3 is used. Original BVH8 patch from Anton Gavrikov. Batched triangles intersection from Victoria Zhislina. Extra work and tests and fixes from Maxym Dmytrychenko.
2018-07-06Cleanup: strip trailing space for cyclesCampbell Barton
2018-06-11Cycles: Cleanup, silence strict compiler warningSergey Sharybin
There is one legit place in the code where memcpy was used as an optimization trick. Was needed for older version of GCC, but now it should be re-evaluated and checked if it still helps to have that trick. In other places it's somewhat lazy programming to zero out all object members. That is absolutely unsafe, at the moment when less trivial class is used as a member in that object things will break. Other cases were using memcpy into an object which comes from an external library. We don't control that object, and we can not guarantee it will always be safe for such memory tricks and debugging bugs caused by such low level access is far fun. Ideally we need to use more proper C++, but needs to be done with big care, including benchmarks of each change, For now do annoying but simple cast to void*.
2018-02-04msvc: Use source folder structure for project file.Ray Molenkamp
This patch changes the huge list of projects in visual studio into a nice tree matching the source folder structure. see D2823 for details. Differential Revision: http://developer.blender.org/D2823
2018-01-23Cycles: Fix optimal BVH selection.Ray Molenkamp
2018-01-22Cycles: Replace use_qbvh boolean flag with an enum-based propertySergey Sharybin
This was we can introduce other types of BVH, for example, wider ones, without causing too much mess around boolean flags. Thoughs: - Ideally device info should probably return bitflag of what BVH types it supports. It is possible to implement based on simple logic in device/ and mesh.cpp, rest of the changes will stay the same. - Not happy with workarounds in util_debug and duplicated enum in kernel. Maybe enbum should be stores in kernel, but then it's kind of weird to include kernel types from utils. Soudns some cyclkic dependency. Reviewers: brecht, maxim_d33 Reviewed By: brecht Differential Revision: https://developer.blender.org/D3011
2018-01-19Cycles: Remove unneeded include statementsSergey Sharybin
Also try to move them from headers to implementation files as much as possible.
2017-10-18Cycles: Fix wrong shading when some mesh triangle has non-finite coordinateSergey Sharybin
This is fully unpredictable for artists when one damaged object makes the whole scene to render incorrectly. This involves two main changes: - It is not enough to check triangle bounds to be valid when building BVH. This is because triangle might have some finite vertices and some non-finite. - We shouldn't add non-finite triangle area to the overall area for MIS.
2017-10-15Code cleanup: deduplicate primitive refit code.Brecht Van Lommel
2017-08-31Cycles: Fix typo in commentSergey Sharybin
2017-08-25Cycles: Fix stack overflow during traversal caused by floating overflowSergey Sharybin
Would be nice to be able to catch this with assert as well, will see what would be the best way to do this/.\ Need to verify with Mai that this solves crash for her and maybe consider porting this to 2.79.
2017-08-23Cycles: Add maximum depth stat to bvh builderMai Lavelle
2017-08-14Cycles: Guard memcpy to potentially re-allocating memory with lockSergey Sharybin
Basically, make re-alloc and memcpy from the same lock, otherwise one thread might be re-allocating thread while another one is trying to copy data there. Reported by Mohamed Sakr in IRC, thanks!
2017-08-10Cycles: Fix instanced shadow catcher objects influencing each otherSergey Sharybin
2017-08-10Cycles: De-duplicate trace-time object visibility calculationSergey Sharybin
We already have enough files to worry about in BVH builders. no need to add yet another copy-paste code which is tempting to be running out of sync.
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-04-13Cycles: Header cleanup in BVH: move self header to be the first oneSergey Sharybin
This makes us more sure that header files are more self-sufficient.
2017-04-13Cycles: Split BVH implementations into separate filesSergey Sharybin
2017-04-13Cycles: Use more explicit and commonly used names for BVH structuresSergey Sharybin
This renames BinaryBVH to BVH2 and QBVH to BVH8. There is no user measurable difference, but allows us to add more types of BVH trees such as BVH8.
2017-03-30Cycles: Cleanup, rename RegularBVH to BinaryBVHSergey Sharybin
Makes it more explicit what the structure is from it's name.
2017-03-29Cycles: Cleanup, don't use m_ prefix for public propertiesSergey Sharybin
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-02-25Fix build error with macOS / clang / c++11.Brecht Van Lommel
2017-02-15Cycles: Don't calculate primitive time if BVH motion steps are not usedSergey Sharybin
Solves memory regression by the default configuration.
2017-02-15Cycles: Fix wrong hair render results when using BVH motion stepsSergey Sharybin
The issue here was mainly coming from minimal pixel width feature which is quite commonly enabled in production shots. This feature will use some probabilistic heuristic in the curve intersection function to check whether we need to return intersection or not. This probability is calculated for every intersection check. Now, when we use multiple BVH nodes for curve primitives we increase probability of that primitive to be considered a good intersection for us. This is similar to increasing minimal width of curve. What is worst here is that change in the intersection probability fully depends on exact layout of BVH, meaning probability might change differently depending on a view angle, the way how builder binned the primitives and such. This makes it impossible to do simple check like dividing probability by number of BVH steps. Other solution might have been to split BVH into fully independent trees, but that will increase memory usage of all the static objects in the scenes, which is also not something desirable. For now used most simple but robust approach: store BVH primitives time and test it in curve intersection functions. This solves the regression, but has two downsides: - Uses more memory. which isn't surprising, and ANY solution to this problem will use more memory. What we still have to do is to avoid this memory increase for cases when we don't use BVH motion steps. - Reduces number of maximum available textures on pre-kepler cards. There is not much we can do here, hardware gets old but we need to move forward on more modern hardware..
2017-02-15Cycles: Fix missing initialization of triangle BVH stepsSergey Sharybin
Likely was harmless for Blender, but better be safe here.
2017-01-24Cycles: Don't rely on indirectly included algorithmSergey Sharybin
2017-01-20Cycles: Use more const qualifiers to avoid possible issuesSergey Sharybin
2017-01-20Cycles: Cleanup, split one gigantic function into two smaller onesSergey Sharybin
2017-01-20Cycles: Store time in BVH nodesSergey Sharybin
This way we can stop traversing BVH node early on. Gives about 2-2.5x times render time improvement with 3 BVH steps. Hopefully this gives no measurable performance loss for scenes with single BVH step. Traversal is currently only implemented for QBVH, meaning old CPUs and GPU do not benefit from this change.
2017-01-20Cycles: Add option to split triangle motion primitives by time stepsSergey Sharybin
Similar to the previous commit, the statistics goes as: BVH Steps Render time (sec) Memory usage (MB) 0 46 260 1 27 373 2 18 598 3 15 826 Scene used for the tests is the agent's body from one of the barber shop scenes (no textures or anything, just a diffuse material). Once again this is limited to regular (non-spatial split) BVH, Support of spatial split to this feature will come later.
2017-01-20Cycles: Add option to split curve motion primitives by time stepsSergey Sharybin
The idea is to create several smaller BVH nodes for each of the motion curve primitives. This acts as a forced spatial split for the single primitive. This gives up render time speedup of motion blurred hair in the cost of extra memory usage. The numbers goes as: BVH Steps Render time (sec) Memory usage (MB) 0 258 191 1 123 278 2 69 453 3 43 627 Scene used for the tests is the agent's hair from one of the barber shop scenes. Currently it's only limited to scenes without spatial split enabled, since the spatial split builder requires some changes to work properly with motion steps coordinates.
2017-01-20Cycles: Cleanup, trailing whitespaceSergey Sharybin
2017-01-20Cycles: Cleanup, better variable nameSergey Sharybin
2017-01-16Cycles: Cleanup, spellingSergey Sharybin