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
path: root/intern
AgeCommit message (Collapse)Author
2020-10-12Fix T81551: Cycles crash updating volume with modifiersBrecht Van Lommel
The volume bounds mesh was being rebuilt too often, it should only be done when rebuilding the BVH as well, otherwise they can go out of sync.
2020-10-12Cleanup: CMake: Remove arguments from endif(..)Ankit Meel
No functional change. Added in {rB1f6b7387ad01}
2020-10-12Libmv: Remove array access from camera intrinsicsSergey Sharybin
That was a suboptimal decision from back in the days, which ended up being problematic. It is no longer used, so remove it from API making it so new code does not depend on this weak concept.
2020-10-12Libmv: Fix wrong packing order of intrinsics for BA stepSergey Sharybin
The order got broken when Brown distortion model has been added. Made it so the indexing of parameters is strictly defined in the parameter block, matching how parameters are used in the cost function. There is some duplication going on accessing parameters. This can be refactored in the future, by either moving common parts packing and cost function to an utility function in bundle.cc. Alternatively, can introduce a public PackedIntrinsics class which will contain a continuous block of parameters, and each of the camera models will have API to be initialized from packed form and to create this packed form. The benefit of this approach over alternative solutions previously made in the master branch or suggested in D9116 is that the specific implementation of BA does not dictate the way how public classes need to be organized. It is API which needs to define how implementation goes, not the other way around. Thanks Bastien and Ivan for the investigation!
2020-10-12Revert "Fix critical lens distortion bug in libmv after rB3a7d62cd1f5e."Sergey Sharybin
This reverts commit 7e836bde11ce6521953c9f246cacd442a3ef6c0e. Reverting the incomplete workaround, due to the following reasoning: - There should be no dependency between CameraIntrinsics and the bundler code. This violates intended abstraction of the intrinsics class. - The fix was not complete, or wrong. Even in the world where there is a requirement to the parameters storage size this should have applied to all distortion models, including Divisions, Nuke. Proper fix will be committed next.
2020-10-12Libmv: Fix memory leak in modal solverSergey Sharybin
The leak was happening when problem did not have any parameters blocks defined. This happens, for example, if there are no 3D points at all, or when all markers are set to 0 weight. Was noticeable in libmv_modal_solver_test when building with LSAN enabled.
2020-10-12Libmv: Cleanup, spelling in function nameSergey Sharybin
Is a local function, not affecting API.
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-09CMake/macOS: Remove _LIBPATH, avoid link_directories.Ankit Meel
After tests were bundled in a single executable and cycles and libmv created their own tests, the warnings on macOS have gone over 800. The reason is setting `*_LIBRARIES` to names of the libraries and later using `link_directories` to link them properly. https://cmake.org/cmake/help/latest/command/link_directories.html > Note This command is rarely necessary and should be avoided where > there are other choices. Prefer to pass full absolute paths to > libraries where possible, since this ensures the correct library > will always be linked. The find_library() command provides the > full path, which can generally be used directly in calls to > target_link_libraries(). Warnings like the following popup for every target/executable, for every library it links to. ``` ld: warning: directory not found for option '-L/Users/me/blender-build/blender/../lib/darwin/jpeg/lib/Debug' ``` The patch completes a step towards removing `link_directories` as mentioned in TODO at several places. The patch uses absolute paths to link libraries and removes all `*_LIBPATH`s except `PYTHON_LIBPATH` from `platform_apple.cmake` file. (The corner case where it's used seems like dead code. Python is no longer shipped with that file structure.) Also, unused code for LLVM-3.4 has been removed. Also, guards to avoid searching libraries in system directories have been added. `APPLE` platform now no longer needs `setup_libdirs`, `cycles_link_directories`, and `link_directories`. The number of warnings now is less than 100, most of them being deprecation ones in dependencies. This patch depended on {rBb746179d0add}, {rB2fdbe4d05011}, {rB402a4cadba49} and {rBd7f482f88ecb}. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8855
2020-10-09Cleanup: spellingCampbell Barton
2020-10-09Cycles: fix incorrect default value for node array socket typeKévin Dietrich
2020-10-09Cycles: fix incorrect asserts in node socket set functionsKévin Dietrich
2020-10-08Fluid: Fix particle helper grid exportSebastián Barschkis
Only export helper levelset and velocity (belonging to previous state) at the beginning of an (adaptive) frame.
2020-10-08Cycles: fix UpdateTimeStats::clear() not resetting total times to zeroKévin Dietrich
2020-10-06Fluid: Enable new flood-fill helper functionSebastián Barschkis
The flood-fill helper serves as a sanity check for scenes with complex obstacles. Similarly to the holes filler function it ensures that there are no holes in obstacles. In addition, it ensures that there will be no holes resulting from multiple intersecting obstacles. In general, this commit should improve stability.
2020-10-05Cycles: Add NanoVDB support for rendering volumesPatrick Mours
NanoVDB is a platform-independent sparse volume data structure that makes it possible to use OpenVDB volumes on the GPU. This patch uses it for volume rendering in Cycles, replacing the previous usage of dense 3D textures. Since it has a big impact on memory usage and performance and changes the OpenVDB branch used for the rest of Blender as well, this is not enabled by default yet, which will happen only after 2.82 was branched off. To enable it, build both dependencies and Blender itself with the "WITH_NANOVDB" CMake option. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8794
2020-10-05Fix Cycles OpenCL failing when extension string is longMatt McClellan
This can happen for Intel OpenCL, now support arbitrary string length. Differential Revision: https://developer.blender.org/D9020
2020-10-05Fix critical lens distortion bug in libmv after rB3a7d62cd1f5e.Bastien Montagne
Current libmv_modal_solver_test fails since rB3a7d62cd1f5e. It appears that the issue is caused by the insertion of the new OFFSET_K4 parameter, as, if camera intrinsics are not required to implement/use all of those deform parameters, they absolutely have to keep order (values) matching those defined in bundle.cc, otherwise `PackIntrinisicsIntoArray` and `UnpackIntrinsicsFromArray` will mangle them around.
2020-10-02Cycles: Add command line option for overriding the compute deviceLukas Stockner
The current way of setting the compute device makes sense for local use, but for headless rendering it it a massive pain to get Cycles to use the correct device, usually involving entire Python scripts. Therefore, this patch adds a simple command-line option to Blender for specifying the type of device that should be used. If the option is present, the settings in the user preferences and the scene are ignored, and instead all devices matching the specified type are used. Differential Revision: https://developer.blender.org/D9086
2020-10-02Cleanup: pep8 (indentation, spacing, long lines)Campbell Barton
2020-10-02Cleanup: pep8, blank linesCampbell Barton
2020-10-02Cycles: add time statistics to scene updateKévin Dietrich
Gathers information for time spent in the various managers or object (Film, Camera, etc.) being updated in Scene::device_update. The stats include the total time spent in the device_update methods as well as time spent in subroutines (e.g. bvh build, displacement, etc.). This does not qualify as a full blown profiler, but is useful to identify potential bottleneck areas. The stats can be enabled and printed by passing `--cycles-print-stats` on the command line to Cycles, or `-- --cycles-print-stats` to Blender. Reviewed By: brecht Maniphest Tasks: T79174 Differential Revision: https://developer.blender.org/D8596
2020-10-01Cycles: Fix broken 32 bit shift.Ray Molenkamp
1ul << n will still be a 32 bit integer regardless of the value of n, given the target here is 64 bits the upper 32 bits will always be zero. Using 1ull will yield the expected result.
2020-10-01Volumes: support lower resolution in viewportJacques Lucke
The adds a new option to simplify volumes in the viewport. The setting can be found in the Simplify panel in the render properties. Volume objects use OpenVDB grids, which are sparse. For rendering, we have to convert sparse grids to dense grids (for now). Those require significantly more memory. Therefore, it's often a good idea to reduce the resolution of volumes in the viewport. Reviewers: brecht Differential Revision: https://developer.blender.org/D9040 Ref T73201.
2020-10-01Fix T80395: Cycles baking crash when Surfaces are disabled in the view layerMartijn Versteegh
Always enable surfaces for baking, otherwise there is nothing to bake to. Differential Revision: https://developer.blender.org/D9015
2020-10-01Cleanup: clang-formatBrecht Van Lommel
2020-10-01Windows: workaround to make Windows Ink tablet API workNicholas Rishel
Now Wintab is not initialized when starting Blender with the tablet API preference set to native, since that disables Windows Ink. Note that changing the tablet API requires restarting Blender for changes to take effect. This serves as a stopgap to allow use of Windows Ink until runtime API switching is merged. Differential Revision: https://developer.blender.org/D9051
2020-10-01macOS: support for key repeat events in keymapsYevgeny Makarov
Differential Revision: https://developer.blender.org/D8882
2020-10-01Cleanup: avoid member access within null pointerAnkit Meel
While harmless, UBSan warns about this. Prefer offsetof where possible since it's more readable.
2020-09-30Fix Cycles CUDA kernels for Ampere not building with CUDA 11Brecht Van Lommel
Running Blender on Ampere cards was already possible with ptx, this fix is needed to support building CUDA binaries. Note the CUDA version used for official Blender builds is still 10, this is merely the change to make it possible for those using CUDA 11 and specifying the sm_8x kernels to be compiled. Found by Milan Jaros.
2020-09-30Subdivision Surfaces: add option disable using the limit surfacePiotr Ostrowski
This makes subdivision surfaces compatible with the old subdivision surface modifier and other applications that do not use the limit surface. This option is available on the Subdivision Surface modifier. Differential Revision: https://developer.blender.org/D8413
2020-09-30Cycles: Fix usage of memory barriers in split kernelSergey Sharybin
On user level this fixes dead-lock of OpenCL render on Intel Iris GPUs. Note that this patch does not include change in the logic which allows or disallows OpenCL platforms to be used, that will happen after the kernel fix is known to be fine for the currently officially supported platforms. The dead-lock was caused by wrong usage of memory barriers: as per the OpenCL specification the barrier is to be executed by the entire work group. This means, that the following code is invalid: void foo() { if (some_condition) { return; } barrier(CLK_LOCAL_MEM_FENCE); } void bar() { foo(); } The Cycles code was mentioning this as an invalid code on CPU, while in fact this is invalid as per specification. From the implementation side this change removes the ifdefs around the CPU-only barrier logic, and is implementing similar logic in the shader setup kernel. Tested on NUC8i7HVK NUC. The root cause of the dead-lock was identified by Max Dmitrichenko. There is no measurable difference in performance of currently supported OpenCL platforms. Differential Revision: https://developer.blender.org/D9039
2020-09-30Tracking: Implement Brown-Conrady distortion modelIvan Perevala
Implemented Brown-Conrady lens distortion model with 4 radial and 2 tangential coefficients to improve compatibility with other software, such as Agisoft Photoscan/Metashapes, 3DF Zephir, RealityCapture, Bentley ContextCapture, Alisevision Meshroom(opensource). Also older programs: Bundler, CPMVS. In general terms, most photogrammetric software. The new model is available under the distortion model menu in Lens settings. For tests and demos check the original patch. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9037
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-30Cleanup: spellingCampbell Barton
2020-09-30Cleanup: use angle-brackets for email addressesCampbell Barton
This is already the most widely used convention. Use this so `make check_spelling_c` will ignore all email addresses.
2020-09-29Fix T81100: ccl::Node: ASan SEGV due to bad pointerAnkit Meel
`SOCKET_OFFSETOF` was added in the initial commit {rBec51175f1fd6c91d5} when `offsetof` [1] was not supported well enough. GCC and LLVM support it since C++17. Other two changes: type and size check can be done without creating an invalid address too. [1] https://cppreference.com/w/cpp/types/offsetof Reviewed By: campbellbarton, brecht Maniphest Tasks: T81100 Differential Revision: https://developer.blender.org/D9042
2020-09-28Libmv: Fix NukeCameraIntrinsics copy constructorIvan
Copy the appropriate parameter Reviewed By: sergey Differential Revision: https://developer.blender.org/D9014
2020-09-24Cleanup: spellingCampbell Barton
2020-09-23Cleanup: remove dead code in point cache and openvdb wrapperJacques Lucke
Reviewers: brecht Differential Revision: https://developer.blender.org/D8988
2020-09-22Cleanup: use float3 instead of float4 for shadow, since w is never usedBrecht Van Lommel
Contributed by pembem22. Differential Revision: https://developer.blender.org/D8947
2020-09-22Fix Cycles SSS incorrect rendering of zero radius in green channelBrecht Van Lommel
Thanks to pembem22 for finding the problem. Ref D8949
2020-09-22Cycles: add update flags to Node and SocketTypeKévin Dietrich
Those flags are meant for detecting which socket has changed, so in the future we can have more granular updates. `Node` now stores an `update_flags` member which is modified every time a socket is changed though `Node::set`. The flags are or-able bits stored in `SocketType` instances. Each `SocketType` stores a unique bit out of 64, for the 64 bits of an uint64_t; the bit corresponds to the index of the socket in the `Node`'s sockets array + 1, so the socket at index 5 will have the 6th bit set as its flag. This limits us to 64 sockets per Node, which should be plenty for the current set of `Nodes` that we have. This does not change the behavior of other parts of Cycles. This is part of T79131. Reviewed By: brecht Maniphest Tasks: T79131 Differential Revision: https://developer.blender.org/D8644
2020-09-22Fluid: Fix for script export (standalone mode)Sebastián Barschkis
The OpenVDB update added a load() function. This function clashes with a helper IO function (only used when exporting and running the simulation externally) that was also named load().
2020-09-22Fluid: Refactor for initial velocitiesSebastián Barschkis
Removed invel MAC grid since it is sufficient to use the cell centered vec3 representation. When setting initial velocities these will be interpolated by the setter functions.
2020-09-19Cleanup: use parenthesis for if statements in macrosCampbell Barton
2020-09-19Cleanup: consistent TODO/FIXME formatting for namesCampbell Barton
Following the most widely used convention for including todo's in the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
2020-09-18CMake/OpenSubdiv: Rename INCLUDE_DIR -> INCLUDE_DIRS.Ankit Meel
Ref {D8855} Unix and Apple platform files use find_package(OpenSubdiv) which sets `OPENSUBDIV_INCLUDE_DIR` as an advanced variable, as well as `OPENSUBDIV_INCLUDE_DIRS` which should be used usually. Windows sets `OPENSUBDIV_INCLUDE_DIR` which is used by the rest of the code. This patch renames it to `_DIRS` everywhere, for it to be like other similar variables. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8917
2020-09-18Cycles: Add time report for Blender data synchronizationSergey Sharybin
Allows to more easily access time information about how long Cycles did spend synchronizing objects from evaluated depsgraph on Blender side to its own structures. This timer does not include time spent evaluating render depsgraph.
2020-09-17Shaders: add emission strength input to Principled BSDF nodeAlex Strand
This impacts I/O add-ons. OBJ, FBX and Collada have been updated, glTF not yet. Differential Revision: https://developer.blender.org/D4971