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
2022-04-28Fix T94467: Cycles baking of normal pass slower than before cycles-xBrecht Van Lommel
2022-04-28Ensure BSDF evals and pdfs are zero on invalid samplesSebastian Herholz
Currently, the `eval` and `pdf` are not explicitly set to zero when a BSDF sample is invalid (e.g., below the upper hemisphere), when calling `bsdf_sample` or `bsdf_eval`. It is assumed that `eval` and `pdf` are set to zero before these functions are called, which can cause problems if not. This patch fixes this potential problem by explicitly setting `eval` and `pdf` to zero when the sampled direction is invalid. I also added a sanity check if `eval` and `pdf` are valid (i.e., >= 0.f). The check is activated when build in debug mode and with the `WITH_CYCLES_DEBUG` set to `ON`. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D14776
2022-04-28Fix: Sky models can return negative valuesSebastian Herholz
When converting from XYZ to RGB it can happen, in some sky models, that the resulting RGB values are negative. Atm, this is not considered and the returned values for the sky model can be negative. This patch clamps the returned RGB values to be `= 0.f` Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D14777
2022-04-28Fix T97056: Cycles MNEE caustics treated as direct instead of indirect lightChristophe Hery
This fixes wrong render passs and bounce limits. Differential Revision: https://developer.blender.org/D14737
2022-04-28Revert "Cycles: Enable inlining on Apple Silicon for 1.1x speedup"Brecht Van Lommel
This reverts commit b82de02e7ce857e20b842a074c0068b146a9fd79. It is causing crashes in various regression tests. Ref D14763
2022-04-28Fix T97498, T97651: crash in Cycles with TBB 2021 after recent changesBrecht Van Lommel
2022-04-27Cycles: Enable inlining on Apple Silicon for 1.1x speedupMichael Jones
This is a stripped down version of D14645 without the scene specialisation optimisations. The two major changes in this patch are: - Enables more aggressive inlining on Apple Silicon resulting in a 1.1x speedup and 10% reduction in spill, at the cost of longer pipeline build times - Revival of shader binary archives through a new ShaderCache which is shared between MetalDevice instances using the same physical MTLDevice. This mitigates the extra compile times via explicit caching (rather than, as before, relying on the implicit system shader cache which can be purged without notice) Reviewed By: brecht Differential Revision: https://developer.blender.org/D14763
2022-04-24Cleanup: various minor changesCampbell Barton
- Add missing doxy-section for Apply Parent Inverse Operator - Use identity for None comparison in Python. - Remove newline from operator doc-strings. - Use '*' prefix multi-line C comment blocks. - Separate filenames from doc-strings. - Remove break after return.
2022-04-23Mikktspace: Reduce number of data queries to callerLukas Stockner
The current code for computing tangents is not exactly fast. This has been a long-standing issue, and recently came up again with T97378. The main bottleneck is fetching the mesh data, since it's handled through a callback system and each vertex might have its data queried dozens of times. I've tried a lot of things to optimize `mikktspace.c`, but unfortunately most weren't that useful: - Vectorizing SVec3 gives a ~5% speedup, but I'm not sure if the additional ~70 lines of code are worth it - Keeping an internal copy of the data instead of re-querying all the time helps a lot (~50-60% time reduction), but requires a lot of extra memory (~100 byte per face) - Going C++ and replacing the internal quicksort with std::sort shows no difference - Restructuring the entire file to be a header-only library so that the callbacks can be inlined gives ~10% reduction, but is a major change and deviation from the original library In the end, two simple fixes that actually help remain: - Don't re-query the number of faces in each loop iteration - Don't bother looking for identical vertices if there's only one vertex with that hash With this, time for the test case in T97378 goes from 6.64sec to 4.92sec. It's something I guess. I feel like completely refactoring this library would not be a bad idea at some point, but for now it does the job... Differential Revision: https://developer.blender.org/D14675
2022-04-23Fix deprecation warning when building with OpenVDB 9Brecht Van Lommel
Based on patch by Sebastian Parborg.
2022-04-22Cycles: removed UV requirement for MNEE, along with fixes and cleanupsOlivier Maury
Remove need for shadow caustic caster geometry to have a UV layout. UVs were useful to maintain a consistent tangent frame across the surface while performing the walk. A consistent tangent frame is necessary for rough surfaces where a normal offset encodes the sampled h, which should point towards the same direction across the mesh. In order to get a continuous surface parametrization without UVs, the technique described in this paper was implemented: "The Natural-Constraint Representation of the Path Space for Efficient Light Transport Simulation" (Supplementary Material), SIGGRAPH 2014. In addition to implementing this feature: * Shadow caustic casters without smooth normals are now ignored (triggered some refactoring and cleaning). * Hit point calculation was refactored using existing utils functions, simplifying the code. * The max number of solver iterations was reduced to 32, a solution is usually found by then. * Added generalized geometry term clamping (transfer matrix calculation can sometimes get unstable). * Add stop condition to Newton solver for more consistent CPU and GPU result. * Add support for multi scatter GGX refraction. Fixes T96990, T96991 Ref T94120 Differential Revision: https://developer.blender.org/D14623
2022-04-22Cleanup: spelling in commentsCampbell Barton
2022-04-22Cycles: enable AMD RDNA GPU support on LinuxBrecht Van Lommel
This enables building of HIP binaries for AMD RDNA and RDNA2 GPUs. This requires the 22.10 / ROCm 5.1 driver. Ref T91571 Differential Revision: https://developer.blender.org/D14360
2022-04-20Revert "Fix GPU subdivision: Crash on adding subdivision surface modifier"Clément Foucault
The fix does not fix the case of shaders comming from the OpenSubdiv API. This reverts commit f5191b87608f6607aa1dbd4b9409174db351984b.
2022-04-20Revert "Fix Cycles HIP assuming warp size 32"Brecht Van Lommel
This reverts commit 390b9f1305059f5d8c7f944d44fc3e5821a3eb82. It seems to break things on Linux for unknown reasons, so leave it out for now. A solution to this will be required for Vega cards though.
2022-04-20Fix compilation without OpenVDBKévin Dietrich
2022-04-20Fix GPU subdivision: Crash on adding subdivision surface modifierClément Foucault
This was caused by the use of a reserved keyword macro that is not directly used but causes an error on some compiler. Change the occurences to not match the macros.
2022-04-20Cleanup: run autopep8 on intern/cycles/Campbell Barton
Disable autopep8 for the block that yields passes in list_render_passes, for better readability.
2022-04-20Cleanup: spelling in commentsCampbell Barton
2022-04-20Cleanup: clang-formatCampbell Barton
2022-04-19Cycles: add support for volume motion blurKévin Dietrich
This adds support for rendering motion blur for volumes, using their velocity field. This works for fluid simulations and imported VDB volumes. For the latter, the name of the velocity field can be set per volume object, with automatic detection of velocity fields that are split into 3 scalar grids. A new parameter is also added to scale velocity for more artistic control. Like for Alembic and USD caches, a parameter to set the unit of time in which the velocity vectors are expressed is also added. For Blender gas simulations, the velocity unit should always be in seconds, so this is only exposed for volume objects which may come from external OpenVDB files. These parameters are available under the `Render` panels for the fluid domain and the volume object data properties respectively. Credits: kernel advection code from Tangent Animation's Blackbird based on earlier work by Geraldine Chua Differential Revision: https://developer.blender.org/D14629
2022-04-19Cleanup: Remove unused function in Cycles queueSergey Sharybin
Noticed while looking into oneAPI patch. Seems to be unused, without clear indication why/when it might be needed. Removing the function simplifies adding the new backend. Differential Revision: https://developer.blender.org/D14652
2022-04-18Cleanup: consistently use parallel_for without tbb namespace in CyclesBrecht Van Lommel
2022-04-18Fix Cycles blackbody shader not taking into account OpenColorIO configBrecht Van Lommel
Keep the existing Rec.709 fit and convert to other colorspace if needed, it seems accurate enough in practice, and keeps the same performance for the default case.
2022-04-18Fix Cycles build error with latest TBB after recent changesBrecht Van Lommel
From changes in 869a46df2980, ref D14454
2022-04-18Add debugging info for Wintab activated by argument `--debug-wintab`.Nicholas Rishel
Bonus: Added docs for `--debug-ghost`. Differential Revision: https://developer.blender.org/D14610
2022-04-13Cycles: Add support for "stageMetersPerUnit" Hydra render settingPatrick Mours
This can be useful to match transforms to what native Cycles would see in Blender, as USD typically uses centimeters, but Blender uses meters. This patch also fixes the hardcoded focal length multiplicator, which is now using the same units as everything else. Default of "stageMetersPerUnit" is 0.01 to match the USD default of centimeters. Differential Revision: https://developer.blender.org/D14630
2022-04-13Cleanup: use C++ comments for disabled codeCampbell Barton
Also ensure space around text in C-comment blocks.
2022-04-13Cleanup: clang-formatCampbell Barton
2022-04-12Cycles fp consistency for Apple Silicon CPUsMichael Jones
Propagate the fp settings from the main thread to all the worker threads (the fp settings includes the FZ settings among other things) - this guarantees consistency in execution of floating point math regardless if its executed in tbb thread arena or on main thread Add FZ mode to arm64/aarch64 in parallel to the way its been done on intel processors, currently compiling for arm target does not set this mode at all, hence potentially runs slower and with possible results mismatch with intel x86. Reviewed By: brecht Differential Revision: https://developer.blender.org/D14454
2022-04-12Revert "Cycles: enable HIP for Vega and Vega II (Radeon 7) GPUs on Windows"Brecht Van Lommel
This is not currently working, reverting until the driver/compiler has a fix. This reverts commit c46e58817cd72d1481967d32e3c6f47f42933d39.
2022-04-11Fix OpenColorIO error with configs using <USE_DISPLAY_NAME>Brecht Van Lommel
* Don't assume the display colorspace name fully defines the transform to display space, this is not true in OpenColorIO 2 where view transforms may be defined in more complexs ways than just specifying a colorspace. * In places where we need to store the display colorspace name, resolve <USE_DISPLAY_NAME> token manually. Ref T96590
2022-04-11Fix Cycles missing nullptr check in case mesh has no shaderCharles Flèche
Did not affect Blender, but could happen with other integrations. Differential Revision: https://developer.blender.org/D14538
2022-04-10Fix T97159: AOV Pass in Cycles always gets Alpha Value of 1 for whole imageLukas Stockner
As far as I can see, it makes a lot of sense to have the alpha channel here, it matches the 2.x behavior and also matches what Eevee is doing. Differential Revision: https://developer.blender.org/D14595
2022-04-10Fix T96942: disable Adjacent Faces margin for UVs and tangent space bakeMartijn Versteegh
Use the Extend method for these, as these do not work correctly. For UVs it's better to extend the UVs from the same face, and for tangent space the normals should be encoded in a matching tangent space. Later the Adjacent Faces method might be improved to support these cases. Ref T96977 Differential Revision: https://developer.blender.org/D14572
2022-04-08Fix prefix used for display OCIO shaderSergey Sharybin
Didn't notice this to have real harmful behavior, but is still best to do things properly.
2022-04-08Cycles: Support adding Lightgroups from the object/world propertiesLukas Stockner
Currently, only Lightgroups that exist in the current view layer can be selected from object or world properties. The internal UI code already has support for search fields that accept unknown input, so I just added that to the API and use it for lightgroups. When a lightgroup is entered that does not exist in the current view layer (e.g. because it's completely new, because the view layer was switched or because it was deleted earlier), a new button next to it becomes active and adds it to the view layer when pressed. Differential Revision: https://developer.blender.org/D14540
2022-04-07Fix Cycles build error after recent changesBrecht Van Lommel
2022-04-07Cycles: various Linux build fixes related to Hydra render delegateBrecht Van Lommel
* Add missing GLEW and hgiGL libraries for Hydra * Fix wrong case sensitive include * Fix link errors by adding external libs to static Hydra lib * Work around weird Hydra link error with MAX_SAMPLES * Use Embree by default for Hydra * Sync external libs code with standalone * Update version number to match Blender * Remove unneeded CLEW/GLEW from test executable None of this should affect Cycles in Blender. Ref T96731
2022-04-07Cleanup: clang-formatCampbell Barton
2022-04-07Curves: Hair to Curves rename in Cycles/EEVEE UIHans Goudey
Change uses of "Hair" in Render Settings UI in the property editor and the "Hair Info" node to use the "Curves" name to reflect the design described in T95355, where hair is just a use case of a more general curves data type. While these settings still affect the particle hair system, the idea is that if we have to choose one naming scheme to align with, we should choose the option that aligns with future plans and current development efforts, especially since the particle system is considered a legacy feature. A few notes: - "Principled Hair BSDF" is not affected since it's meant for hair. - Python API property identifiers are not affected. Differential Revision: https://developer.blender.org/D14573
2022-04-06Fix standalone image output not working when not running in background modehowetuft
Differential Revision: https://developer.blender.org/D14471
2022-04-06Add CMake option to control CUDA host compilerhowetuft
This revision allows to specify CUDA host compiler (nvcc's -ccbin command line option) when configuring the build. It addresses the case where the C/C++ compiler to be used in CUDA toolchain should be different from the default C/C++ compiler, for instance in case of compilers versions conflicts or multiple installed compilers. The new CMake option is named `CUDA_HOST_COMPILER` and can be used as follows: `cmake -DCUDA_HOST_COMPILER=<path-to-host-compiler>` If the option is not specified, the build configuration behaves as previously. Differential Revision: https://developer.blender.org/D14248
2022-04-05Refactor: Evaluate surface objects as mesh componentsHans Goudey
This commit furthers some of the changes that were started in rBb9febb54a492 and subsequent commits by changing the way surface objects are presented to render engines and other users of evaluated objects in the same way. Instead of presenting evaluated surface objects as an `OB_SURF` object with an evaluated mesh, `OB_SURF` objects can now have an evaluated geometry set, which uses the same system as other object types to deal with multi-type evaluated data. This clarification makes it more obvious that lots of code that dealt with the `DispList` type isn't used. It wasn't before either, now it's just *by design*. Over 1100 lines can be removed. The legacy curve draw cache code is much simpler now too. The idea behind the further removal of `DispList` is that it's better to focus optimization efforts on a single mesh data structure. One expected functional change is that the evaluated mesh from surface objects can now be used in geometry nodes with the object info node. Cycles and the OBJ IO tests had to be tweaked to avoid using evaluated surface objects instead of the newly exposed mesh objects. Differential Revision: https://developer.blender.org/D14550
2022-04-05Cycles: Fix a few type casting warningsPatrick Mours
Stumbled over the `integrate_surface_volume_only_bounce` kernel function not returning the right type. The others too showed up as warnings when building Cycles as a standalone which didn't have those warnings disabled. Differential Revision: https://developer.blender.org/D14558
2022-04-05Cycles: Use USD dependencies when building Hydra render delegatePatrick Mours
Adds support for linking with some of the dependencies of a USD build instead of the precompiled libraries from Blender, specifically OpenSubdiv, OpenVDB and TBB. Other dependencies keep using the precompiled libraries from Blender, since they are linked statically anyway so it does't matter as much. Plus they have interdependencies that are difficult to resolve when only using selected libraries from the USD build and can't simply assume that USD was built with all of them. This patch also makes building the Hydra render delegate via the standalone repository work and fixes various small issues I ran into in general on Windows (e.g. the use of both fixed paths and `find_package` did not seem to work correctly). Building both the standalone Cycles application and the Hydra render delegate at the same time is supported now as well (the paths in the USD plugin JSON file are updated accordingly). All that needs to be done now to build is to specify a `PXR_ROOT` or `USD_ROOT` CMake variable pointing to the USD installation, everything else is taken care of automatically (CMake targets are loaded from the `pxrTargets.cmake` of USD and linked into the render delegate and OpenSubdiv, OpenVDB and TBB are replaced with those from USD when they exist). Differential Revision: https://developer.blender.org/D14523
2022-04-05Cleanup: spelling in commentsCampbell Barton
2022-04-04Cleanup: spelling in commentsCampbell Barton
2022-04-04Cleanup: clang-formatCampbell Barton
Add ccl_gpu_kernel_postfix as a statement macro to prevent the following declarations from being indented.
2022-04-03Fix T96978: Objects that emit light do not appear in light groupsLukas Stockner
The initial commit only wrote direct and indirect lighting into the lightgroup passes, but not rays that directly hit the light source itself.