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-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.
2022-04-02Fix T96973: Re-add Cycles shading menu to lightsAlaska
This patch re-adds the shading menu to lights to allow people to use lights in light groups. This patch also hides all settings in the shading menu that are not useful for the light object. Reviewed By: lukasstockner97 Maniphest Tasks: T96973 Differential Revision: https://developer.blender.org/D14527
2022-04-02Cycles: Add support for light groupsLukas Stockner
Light groups are a type of pass that only contains lighting from a subset of light sources. They are created in the View layer, and light sources (lamps, objects with emissive materials and/or the environment) can be assigned to a group. Currently, each light group ends up generating its own version of the Combined pass. In the future, additional types of passes (e.g. shadowcatcher) might be getting their own per-lightgroup versions. The lightgroup creation and assignment is not Cycles-specific, so Eevee or external render engines could make use of it in the future. Note that Lightgroups are identified by their name - therefore, the name of the Lightgroup in the View Layer and the name that's set in an object's settings must match for it to be included. Currently, changing a Lightgroup's name does not update objects - this is planned for the future, along with other features such as denoising for light groups and viewing them in preview renders. Original patch by Alex Fuller (@mistaed), with some polishing by Lukas Stockner (@lukasstockner97). Differential Revision: https://developer.blender.org/D12871
2022-04-02Cleanup: Further use of const for object bounding boxesHans Goudey
Also solves two warnings from the previous similar commit, f688e3cc3130e70e77f0bb0. The change to the grease pencil modifier is quite suspicious, but doesn't change the behavior, which was already broken.
2022-04-01Cycles: Semantically separate 2D and 3D texture objectsStefan Werner
Currently there are no functional changes. Preparing for an upcoming oneAPI integration where such separation in types is needed.
2022-04-01Cycles: Introduce postfix for kernel body definitionStefan Werner
Increases flexibility of code-generation for kernel entry points. Currently no functional changes, preparing for integration with oneAPI.
2022-04-01Cycles: Use single floating point precision sine/cosine in skyStefan Werner
Should be no functional changes.
2022-04-01Cycles: Optimize Nishita skyStefan Werner
Reduce register pressure. Helps with kernel compile time and render time. Should be no functional changes.
2022-04-01Cycles: approximate shadow caustics using manifold next event estimationOlivier Maury
This adds support for selective rendering of caustics in shadows of refractive objects. Example uses are rendering of underwater caustics and eye caustics. This is based on "Manifold Next Event Estimation", a method developed for production rendering. The idea is to selectively enable shadow caustics on a few objects in the scene where they have a big visual impact, without impacting render performance for the rest of the scene. The Shadow Caustic option must be manually enabled on light, caustic receiver and caster objects. For such light paths, the Filter Glossy option will be ignored and replaced by sharp caustics. Currently this method has a various limitations: * Only caustics in shadows of refractive objects work, which means no caustics from reflection or caustics that outside shadows. Only up to 4 refractive caustic bounces are supported. * Caustic caster objects should have smooth normals. * Not currently support for Metal GPU rendering. In the future this method may be extended for more general caustics. TECHNICAL DETAILS This code adds manifold next event estimation through refractive surface(s) as a new sampling technique for direct lighting, i.e. finding the point on the refractive surface(s) along the path to a light sample, which satisfies Fermat's principle for a given microfacet normal and the path's end points. This technique involves walking on the "specular manifold" using a pseudo newton solver. Such a manifold is defined by the specular constraint matrix from the manifold exploration framework [2]. For each refractive interface, this constraint is defined by enforcing that the generalized half-vector projection onto the interface local tangent plane is null. The newton solver guides the walk by linearizing the manifold locally before reprojecting the linear solution onto the refractive surface. See paper [1] for more details about the technique itself and [3] for the half-vector light transport formulation, from which it is derived. [1] Manifold Next Event Estimation Johannes Hanika, Marc Droske, and Luca Fascione. 2015. Comput. Graph. Forum 34, 4 (July 2015), 87–97. https://jo.dreggn.org/home/2015_mnee.pdf [2] Manifold exploration: a Markov Chain Monte Carlo technique for rendering scenes with difficult specular transport Wenzel Jakob and Steve Marschner. 2012. ACM Trans. Graph. 31, 4, Article 58 (July 2012), 13 pages. https://www.cs.cornell.edu/projects/manifolds-sg12/ [3] The Natural-Constraint Representation of the Path Space for Efficient Light Transport Simulation. Anton S. Kaplanyan, Johannes Hanika, and Carsten Dachsbacher. 2014. ACM Trans. Graph. 33, 4, Article 102 (July 2014), 13 pages. https://cg.ivd.kit.edu/english/HSLT.php The code for this samping technique was inserted at the light sampling stage (direct lighting). If the walk is successful, it turns off path regularization using a specialized flag in the path state (PATH_MNEE_SUCCESS). This flag tells the integrator not to blur the brdf roughness further down the path (in a child ray created from BSDF sampling). In addition, using a cascading mechanism of flag values, we cull connections to caustic lights for this and children rays, which should be resolved through MNEE. This mechanism also cancels the MIS bsdf counter part at the casutic receiver depth, in essence leaving MNEE as the only sampling technique from receivers through refractive casters to caustic lights. This choice might not be optimal when the light gets large wrt to the receiver, though this is usually not when you want to use MNEE. This connection culling strategy removes a fair amount of fireflies, at the cost of introducing a slight bias. Because of the selective nature of the culling mechanism, reflective caustics still benefit from the native path regularization, which further removes fireflies on other surfaces (bouncing light off casters). Differential Revision: https://developer.blender.org/D13533
2022-04-01Cycles: enable Alembic procedural for final rendersKévin Dietrich
The Alembic procedural was only enabled during viewport renders originally because it did not have any caching strategy. Now that is does, we can allow its usage in final renders. This also removes the `dag_eval_mode` argument passing to `ModifierTypeInfo.dependsOnTime` which was originally added to detect if we are doing a viewport render for enabling the procedural. Differential Revision: https://developer.blender.org/D14520
2022-03-31Cleanup: spelling, trailing space for comment-blocksCampbell Barton
2022-03-30Cleanup: spelling in commentsCampbell Barton
2022-03-25Cleanup: remove argument to doxygen \fileCampbell Barton
Doxygen doesn't require this to be set.
2022-03-25Cleanup: use array syntax for sizeof, zero before float suffixCampbell Barton
2022-03-25ImBuf: Add support for WebP image formatAaron Carlisle
Currently only supports single image frames (no animation possible). If quality slider is set to 100 then lossless compression will be used, otherwise lossy compression is used. Gives about 35% reduction of filesize save when re-saving splash screens with lossless compression. Also saves much faster, up to 15x faster than PNG with a better compression ratio as a plus. Note, this is currently left disabled until we have WebP libs (see T95206) For testing precompiled libs can be downloaded from Google: https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html Differential Revision: https://developer.blender.org/D1598
2022-03-24Cycles: don't write light passes for shadow catcher objectsBrecht Van Lommel
Makes it easier to composite the Combined image from these passes. Fixes T96758
2022-03-24Fix T94001: OpenColorIO configuration with 1D textures not workingBrecht Van Lommel
2022-03-24Fix T90110: Dupli Window Not Immediately ActiveLictex Steaven
When creating a new window from a duplicated area - by shift-dragging on corner action zones - on the Windows platform the resulting window is initially unresponsive. This patch fixes this by releasing the parent window's mouse capture. See D14085 for more details. Differential Revision: https://developer.blender.org/D14085 Reviewed by Ray Molenkamp
2022-03-24Cleanup: clang-formatDalai Felinto
2022-03-24Cycles: enable HIP for Vega and Vega II (Radeon 7) GPUs on WindowsBrian Savery
Basic testing on windows only so far. Will need some testing on Linux as well when the Linux enablement patch is ready. Does not enable Vega APUs yet (which would be gfx902 or gfx90c). Differential Revision: https://developer.blender.org/D14432
2022-03-24Fix Cycles Metal build error and GCC warning after recent changesBrecht Van Lommel
Function overloading of make_float4() doesn't work since it's a macro, just don't do this minor cleanup then.
2022-03-24Fix compile error on GCCKévin Dietrich
Explicit template specialization has to happen outside of class definition (some compilers are more lenient). Since it is not possible to specialize the method without also specializing the enclosing class for all of its possible types, the method is moved outside of the class, and specialized there.
2022-03-23Cycles: add Alembic procedural to Cycles standalone xmlCharles Flèche
Example: <alembic filepath="/tmp/cube.abc" scale="1.45"> <object path="/Cube/Cube" /> </alembic> Differential Revision: https://developer.blender.org/D14391
2022-03-23Cleanup: use make_float4(f) zero_float4() to simplify codeEthan-Hall
Differential Revision: https://developer.blender.org/D14426
2022-03-23Cycles: optimize CPU texture sampler interpolationEthan-Hall
Use templates to optimize the CPU texture sampler to interpolate using float for single component datatypes instead of using float4 for all types. Differential Revision: https://developer.blender.org/D14424
2022-03-23CMake: Rename "USD_LIBRARY_PREFIX" to "PXR_LIB_PREFIX" for consistencyPatrick Mours
rBc1909770e7f192574ea62449dd14b4254637e604 introduced "PXR_LIB_PREFIX" for building the dependencies, so only makes sense to use the same name in the Hydra render delegate CMake too
2022-03-23Cycles: Add Hydra render delegatePatrick Mours
This patch adds a Hydra render delegate to Cycles, allowing Cycles to be used for rendering in applications that provide a Hydra viewport. The implementation was written from scratch against Cycles X, for integration into the Blender repository to make it possible to continue developing it in step with the rest of Cycles. For this purpose it follows the style of the rest of the Cycles code and can be built with a CMake option (`WITH_CYCLES_HYDRA_RENDER_DELEGATE=1`) similar to the existing standalone version of Cycles. Since Hydra render delegates need to be built against the exact USD version and other dependencies as the target application is using, this is intended to be built separate from Blender (`WITH_BLENDER=0` CMake option) and with support for library versions different from what Blender is using. As such the CMake build scripts for Windows had to be modified slightly, so that the Cycles Hydra render delegate can e.g. be built with MSVC 2017 again even though Blender requires MSVC 2019 now, and it's possible to specify custom paths to the USD SDK etc. The codebase supports building against the latest USD release 22.03 and all the way back to USD 20.08 (with some limitations). Reviewed By: brecht, LazyDodo Differential Revision: https://developer.blender.org/D14398
2022-03-23Color Management: add support for OpenColorIO color space aliasesBrecht Van Lommel
This enables the configuration to specify aliases for compatibility with other configurations. When a colorspace name is saved in a.blend, that is the alias of a colorspace in the current configuration, it will show the main colorspace from the configuration in the user interface and Python API instead. Loading & saving the .blend file does not make any changes to the stored name, so as to not make hidden modifications. Only when setting the property again will the alias name be overwritten by the main colorspace name. Fixes T96049 Differential Revision: https://developer.blender.org/D14419
2022-03-23Fix T96502: Compilation error OCIO when using GradingPrimaryTransform.Jeroen Bakker
When using GradingPrimaryTransform the generated GLSL code fails to compile. The actual issue is inside OCIO (https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/1603). The reason is that unset clamping values are rendered out as `inf`, which isn't recognizable by GLSL. The issue is worked around by defining a default for `inf`. Reviewed By: brecht Maniphest Tasks: T96502 Differential Revision: https://developer.blender.org/D14425
2022-03-23Cleanup: move documentation to headers, other minor correctionsCampbell Barton
2022-03-21Fix T96132: Cycles RGB/Vector/Float Curve shaders ignore extrapolation settingHallam Roberts
Differential Revision: https://developer.blender.org/D14393
2022-03-21Cycles: make 3D texture sampling at boundaries more similar to GPUEthan-Hall
CPU code for cubic interpolation with clip texture extension only performed texture interpolation inside the range of [0,1]. As a result, even though the volume's color is sampled using cubic interpolation, the boundary is not being interpolated. The GPU appears was interpolating samples that span the clip boundary softening the edge, which the CPU now does also. This commit also includes refactoring of 2D and 3D texture sampling in preparation of adding new extension modes. Differential Revision: https://developer.blender.org/D14295
2022-03-21Cycles: Un-pause render when switching to rendered viewportSergey Sharybin
Consider switching to rendered shading type as a request to start rendering, without requiring to un-pause. This minimizes amount of clicks needed to start rendering after viewport was paused once, and then shading mode got changed. Reviewed By: brecht Differential Revision: https://developer.blender.org/D14244
2022-03-19Fix D14173: Chinese IME Full Width NumbersHarley Acheson
Windows IME: Fix duplicated initial character when entering numbers while in Chinese full width character mode. See D14354 for more details. Differential Revision: https://developer.blender.org/D14354 Reviewed by Brecht Van Lommel
2022-03-18Cleanup: Compilation warningsSergey Sharybin
Mainly -Wset-but-unused-variable. Makes default compilation on macOS way less noisy. Differential Revision: https://developer.blender.org/D14357
2022-03-18License headers: use SPDX identifiers in intern/itascCampbell Barton
Added license headers based on the original LGPL files from: gitlab.kuleuven.be/rob-itasc
2022-03-16Fix Cycles HIP assuming warp size 32Brecht Van Lommel
In HIP these masks are 64 bit, while in CUDA only 32 bit.
2022-03-16Cleanup: remove some unused Cycles GPU codeBrecht Van Lommel
To make porting to other architectures easier, clarifying that this does not need to be supported. The unused parallel_reduce implementation assumed warp size 32, but is easy to update if we ever need it in the future.
2022-03-16Cleanup: Deprecated field access in outliner_duplicateSergey Sharybin
Solved by introducing introducing a variant of MEM_cnew which behaves as a copy-constructor for a trivial types. Alternative approach would be to surround DNA structs with clang/gcc diagnostics push/modify/pop so that implicitly defined constructors and copy operators are allowed to access deprecated fields. The downside of the DNA approach is that it will require some way to easily apply diagnostics modifications to many structs, which is not possible currently. The newly added MEM_cnew has other good usecases, so is easiest to use this route, at least for now. Differential Revision: https://developer.blender.org/D14356
2022-03-16Cleanup: rename cnt to countCampbell Barton
Follow naming from T85728.