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
2020-10-28Cycles: internal support for alpha output for attribute nodeAlexander Gavrilov
Not exposed in Blender yet. Ref D2057
2020-10-28Cycles: internal support for float4 geometry attributesAlexander Gavrilov
Previously only float3 and byte4 was supported. Ref D2057
2020-10-28Cycles: refactor to split surface and volume attribute lookup moreBrecht Van Lommel
This avoids OpenCL inlining heavy volume interpolation code once for every data type, which could cause a performance regression when we add a float4 data type in the next commit. Ref D2057
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-09-03Fix T79803: Wrong Distance To Edge 1D VoronoiOmarSquircleArt
The current 1D Voronoi implementation for the Distance to Edge option computes the distance to the cells instead. This patch fixes that and compute the distance to the edge. Reviewed By: JacquesLucke, brecht Differential Revision: https://developer.blender.org/D8634
2020-08-17Fix T79052: Cycles new sky texture fails with sun size zeroBrecht Van Lommel
Clamp to a minimum angle to avoid precision issues.
2020-07-20Cycles: adjust Sky texture intensity to follow physical unitsBrecht Van Lommel
The sky will appear brighter than before by default. To compensate for this, lower exposure in the Film panel. The default altitude was also changed from 90 to 15 degrees. Patch contributed by Marco with the help of Ryan Jones. Differential Revision: https://developer.blender.org/D8285
2020-07-13Cycles: Change precomputed Sky Texture mapping to prioritize the horizonLukas Stockner
Differential Revision: https://developer.blender.org/D8091
2020-07-13Cycles: Add control for sun intensity in Sky Texture and change altitude to kmLukas Stockner
Differential Revision: https://developer.blender.org/D8091
2020-07-08Fix T78324: Different Sky Texture results between CPU and GPULukas Stockner
The problem here was numerical precision: The code calculates the angle between sun and view direction, and the usual acos(dot(a, b)) approach for that has poor numerical performance for almost parallel angles. As a result, the generally tiny difference between floating point computation between CPU and GPU was enough to make the sun vanish at different radii, causing different results. The new version fixes the difference by making the computation much more robust on both platforms.
2020-07-01Cleanup: spellingCampbell Barton
2020-06-22Cycles: remove __UV__ and __INSTANCING__ as kernel optionsBrecht Van Lommel
The kernel did not work correctly when these were disabled anyway. The optimized BVH traversal for the no instances case was also only used on the CPU, so no longer makes sense to keep. Ref T73778 Depends on D8010 Maniphest Tasks: T73778 Differential Revision: https://developer.blender.org/D8011
2020-06-22Cycles: always perform backface culling for curve, remove optionBrecht Van Lommel
The hair BSDFs are already designed to assume this, and disabling backface culling would break them in some cases. Ref T73778 Depends on D8009 Maniphest Tasks: T73778 Differential Revision: https://developer.blender.org/D8010
2020-06-17Cycles: Add new Sky Texture method including direct sunlightLukas Stockner
This commit adds a new model to the Sky Texture node, which is based on a method by Nishita et al. and works by basically simulating volumetric scattering in the atmosphere. By making some approximations (such as only considering single scattering), we get a fairly simple and fast simulation code that takes into account Rayleigh and Mie scattering as well as Ozone absorption. This code is used to precompute a 512x128 texture which is then looked up during render time, and is fast enough to allow real-time tweaking in the viewport. Due to the nature of the simulation, it exposes several parameters that allow for lots of flexibility in choosing the look and matching real-world conditions (such as Air/Dust/Ozone density and altitude). Additionally, the same volumetric approach can be used to compute absorption of the direct sunlight, so the model also supports adding direct sunlight. This makes it significantly easier to set up Sun+Sky illumination where the direction, intensity and color of the sun actually matches the sky. In order to support properly sampling the direct sun component, the commit also adds logic for sampling a specific area to the kernel light sampling code. This is combined with portal and background map sampling using MIS. This sampling logic works for the common case of having one Sky texture going into the Background shader, but if a custom input to the Vector node is used or if there are multiple Sky textures, it falls back to using only background map sampling (while automatically setting the resolution to 4096x2048 if auto resolution is used). More infos and preview can be found here: https://docs.google.com/document/d/1gQta0ygFWXTrl5Pmvl_nZRgUw0mWg0FJeRuNKS36m08/view Underlying model, implementation and documentation by Marco (@nacioss). Improvements, cleanup and sun sampling by @lukasstockner. Differential Revision: https://developer.blender.org/D7896
2020-05-15Cycles: Refactor microfacet BSDFs to remove separate anisotropy codeLukas Stockner
Since the sampling and evaluation functions handle both cases anyways, there's not really a point for keeping the distinction in the kernel, so we might as well cut down the number of CLOSURE_BSDF_MICROFACETs a bit. Differential Revision: https://developer.blender.org/D7736
2020-04-30Fix T75895: Unable to Compile Cycles on NAVI/LinuxJeroen Bakker
This patch will add some compiler hints to break unrolling in the nestled for loops of the voronoi node. Reviewed by: Brecht van Lommel Differential Revision: https://developer.blender.org/D7574
2020-04-09Shading: add Roughness input to Noise and Wave texture nodesBartosz Moniewski
Currently in fractal_noise functions, each subsequent octave doubles the frequency and reduces the amplitude by half. This patch introduces Roughness input to Noise and Wave nodes. This multiplier determines how quickly the amplitudes of the subsequent octaves decrease. Value of 0.5 will be the default, generating identical noise we had before. Values above 0.5 will increase influence of each octave resulting in more "rough" noise, most interesting pattern changes happen there. Values below 0.5 will result in more "smooth" noise. Differential Revision: https://developer.blender.org/D7065
2020-04-01Cycles: AVX implantation of Perlin noise.OmarSquircleArt
This patch adds an AVX implementation of Perlin noise in Cycles. An avxi type was also added as a utility based on the respective type in Intel Embree. Only 3D and 4D noise were implemented, there is no benefit for utilizing AVX in 1D and 2D noise. The SSE trilinear interpolation function was used in the AVX implementation because there is no benefit from using AVX in interpolating the last three dimensions. Differential Revision: https://developer.blender.org/D6680
2020-03-27Fix Optix build error after recent changesDaniel Santana
Differential Revision: https://developer.blender.org/D7253
2020-03-27Cleanup: Silence uninitialized variable warningCharlie Jolly
2020-03-24Cycles: slightly improve OpenCL performance by reordering SVM enum valuesBrecht Van Lommel
Ref T71479
2020-03-24Cycles: work around OpenCL performance regression after AOVs and vector rotateBrecht Van Lommel
We appear to be hitting some limit where adding any amount of code causes a significant performance regression, no matter what it does. To work around that a new node level was added. Ref T71479
2020-03-24Cleanup: remove unused Cycles kernel feature flags, replace by node levelsBrecht Van Lommel
2020-03-20Fix T74345: missing albedo for Cycles principled hair BSDFBrecht Van Lommel
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Cycles: support for different 3D transform per volume gridBrecht Van Lommel
This is not yet fully supported by automatic volume bounds but works fine in most cases that will have mostly matching bounds. Ref T73201
2020-03-11Fix Cycles incorrect result when compressing some 8 bit log colorspace imagesBrecht Van Lommel
Don't clamp and do premultiply after color space conversion.
2020-03-02Shading: Add invert option to Vector Rotate NodeCharlie Jolly
Checkbox to invert rotation angle, suggested by @simonthommes Differential Revision: https://developer.blender.org/D6932
2020-02-27Fix T74262: Cycles OpenCL error on some devices after recent changesBrecht Van Lommel
2020-02-25Cycles: move sss and diffuse transmission into diffuse passBrecht Van Lommel
This simplifies compositors setups and will be consistent with Eevee render passes from D6331. There's a continuum between these passes and it's not clear there is much advantage to having them available separately. Differential Revision: https://developer.blender.org/D6848
2020-02-24Fix T74169: Vector Rotate Node - Euler modes not working as intendedCharlie Jolly
Remove additional Euler modes for the time being, not working as intended, will add back if there is a need.
2020-02-17Cycles: Vector Rotate Node using Axis and Angle methodCharlie Jolly
This node provides the ability to rotate a vector around a `center` point using either `Axis Angle` , `Single Axis` or `Euler` methods. Reviewed By: #cycles, brecht Differential Revision: https://developer.blender.org/D3789
2020-02-17Shading: add direction modes and phase offset to wave texture nodeBartosz Moniewski
* Direction mode X, Y and Z to align with axes rather than diagonal or spherical as previously. X is the new default, existing files will use diagonal or spherical for compatibility. * Phase offset to offset the wave along its direction, for purposes like animation and distortion. https://developer.blender.org/D6382
2020-02-15Cleanup: clang-formatCampbell Barton
2020-02-15Shading: Extend Vector Math Node with Sin, Cos, Tan and Wrap functionsCharlie Jolly
This adds some extra functions recently added to the float Maths Node. Not all functions have been ported over in this patch. Also: + Tidy up menu + Change node color to match other vector nodes, this helps distinguish vector and float nodes in the tree + Move shared OSL functions to new header node_math.h Reviewed By: brecht Differential Revision: https://developer.blender.org/D6713
2020-01-27Shading: Add color output to White Noise nodeCharlie Jolly
Hash input values to a color. Differential Revision: https://developer.blender.org/D6672
2020-01-21Partial Fix T73043: Denoising Albedo not working well for SheenLukas Stockner
Similar to the Microfacet Closures, the Principled BSDF Sheen closure is added at a high weight but typically results in fairly low values. Therefore, the default weight is a bad indicator of importance. The fix here is the same as it was back then for Microfacets: Compute an average weight using the normal as the half-vector and use it to scale down the sample weight and the albedo channel. In addition to drastically improving denoising of materials with sheen when using the new Denoising node, this also can reduce noise on such materials considerably.
2019-12-12Add support for tiled images and the UDIM naming schemeLukas Stockner
This patch contains the work that I did during my week at the Code Quest - adding support for tiled images to Blender. With this patch, images now contain a list of tiles. By default, this just contains one tile, but if the source type is set to Tiled, the user can add additional tiles. When acquiring an ImBuf, the tile to be loaded is specified in the ImageUser. Therefore, code that is not yet aware of tiles will just access the default tile as usual. The filenames of the additional tiles are derived from the original filename according to the UDIM naming scheme - the filename contains an index that is calculated as (1001 + 10*<y coordinate of the tile> + <x coordinate of the tile>), where the x coordinate never goes above 9. Internally, the various tiles are stored in a cache just like sequences. When acquired for the first time, the code will try to load the corresponding file from disk. Alternatively, a new operator can be used to initialize the tile similar to the New Image operator. The following features are supported so far: - Automatic detection and loading of all tiles when opening the first tile (1001) - Saving all tiles - Adding and removing tiles - Filling tiles with generated images - Drawing all tiles in the Image Editor - Viewing a tiled grid even if no image is selected - Rendering tiled images in Eevee - Rendering tiled images in Cycles (in SVM mode) - Automatically skipping loading of unused tiles in Cycles - 2D texture painting (also across tiles) - 3D texture painting (also across tiles, only limitation: individual faces can not cross tile borders) - Assigning custom labels to individual tiles (drawn in the Image Editor instead of the ID) - Different resolutions between tiles There still are some missing features that will be added later (see T72390): - Workbench engine support - Packing/Unpacking support - Baking support - Cycles OSL support - many other Blender features that rely on images Thanks to Brecht for the review and to all who tested the intermediate versions! Differential Revision: https://developer.blender.org/D3509
2019-12-10Cycles: support for custom shader AOVsLukas Stockner
Custom render passes are added in the Shader AOVs panel in the view layer settings, with a name and data type. In shader nodes, an AOV Output node is then used to output either a value or color to the pass. Arbitrary names can be used for these passes, as long as they don't conflict with built-in passes that are enabled. The AOV Output node can be used in both material and world shader nodes. Implemented by Lukas, with tweaks by Brecht. Differential Revision: https://developer.blender.org/D4837
2019-12-09Cycles: Add OptiX acceleration structure compactionPatrick Mours
This adds compaction support for OptiX acceleration structures, which reduces the device memory footprint in a post step after building. Depending on the scene this can reduce the amount of used device memory quite a bit and even improve performance (smaller acceleration structure improves cache usage). It's only enabled for background renders to make acceleration structure builds fast in viewport. Also fixes a bug in the memory management for OptiX acceleration structures: These were held in a dynamic vector of 'device_memory' instances and used the mem_alloc/mem_free functions. However, those keep track of memory instances in the 'cuda_mem_map' via pointers to 'device_memory' (which works fine everywhere else since those are never copied/moved). But in the case of the vector, it may decide to reallocate at some point, which invalidates those pointers and would result in some nasty accesses to invalid memory. So it is not actually safe to move a 'device_memory' object and therefore this removes the move operator overloads again. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6369
2019-12-07Shaders: noise and wave distortion now work uniformly instead of diagonallyBartosz Moniewski
Previously Noise and Wave texture nodes would use noise functions within a [0,1] range for distortion effects. We either add or subtract noise from coordinates, never do both at same time. This led to the texture drastically shifting on the diagonal axis of a plane / cube. This behavior makes the Distortion input hard to control or animate. Capabilities of driving it with other texture are also limited, diagonal shifting is very apparent. This was fixed by offsetting the noise function to a signed range and making it zero-centered. This way noise is uniformly added and subtracted from coordinates. Texture pattern sticks to main coordinates which makes it way easier to control. This change is not strictly backwards compatible, there is versioning to ensure the scale of the distortion remains similar, but the particular pattern can be a little different. Differential Revision: https://developer.blender.org/D6177
2019-12-07Shader Nodes: Add Interpolation modes to Map Range nodeCharlie Jolly
Modes: Linear interpolation (default), stepped linear, smoothstep and smootherstep. This also includes an additional option for the **Clamp node** to switch between **Min Max** (default) and **Range** mode. This was needed to allow clamping when **To Max** is less than **To Min**. Reviewed By: JacquesLucke, brecht Differential Revision: https://developer.blender.org/D5827
2019-12-07Maths Node: Additional functionsCharlie Jolly
When creating shaders and using maths functions it is expected that Blender should match functions in other DCC applications, game engines and shading languages such as GLSL and OSL. This patch adds missing functions to the Blender maths node. Ideally, it would be nice to have these functions available to vectors too but that is not part of this patch. This patch adds the following functions trunc, snap, wrap, compare, pingpong, sign, radians, degrees, cosh, sinh, tanh, exp, smoothmin and inversesqrt. Sign function is based on GLSL and OSL functions and returns zero when x == 0. Differential Revision: https://developer.blender.org/D5957
2019-11-27Cycles: Scale denoising albedo contribution of Principled BSDFs according to ↵Lukas Stockner
average fresnel The Principled BSDF uses Microfacet closures that include a fresnel term, which are a special case since their weight tends to be near white even if their average contribution is fairly low. The sample weight is scaled by the average fresnel weight to account for this, but the denoising albedo still used the unscaled weight. This was fine for the original denoiser, but apparently OIDN can't handle the resulting albedo pass well. Therefore, this commit adds the described scaling to the albedo pass contribution as well. This problem was described in T69770. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6289
2019-11-13Cycles: OpenCL PerformanceJeroen Bakker
When using OpenCL with Cycles the rendering time increased substantial. After doing some tests the bottleneck was found in 4d voronoi and 2d and 3d smooth voronoi. This change will hide these behind a specific compile directive so the speed will improve. AMD RX480 + BMW scene 2.80 (3:10) 2.81 (5:48) 2.81 excluding 4d voronoi+2d/3d smooth (3:50) Reviewed By: sergey Differential Revision: https://developer.blender.org/D6231
2019-10-15Fix T70605: incorrect darken and lighten rgb mix modeJacques Lucke
Differential Revision: https://developer.blender.org/D6058 Reviewers: brecht, fclem
2019-09-23Revert part of "GPencil: Invert Paste operator and make Paste to Active default"Brecht Van Lommel
This commit accidentally undid a bunch of previous commits. Only the intended changes are left now.
2019-09-19Cleanup: spellingCampbell Barton
2019-09-13Cleanup: compiler warningsBrecht Van Lommel
2019-09-12Shading: Add Vertex Color node.OmarSquircleArt
This patch adds a new Vertex Color node. The node also returns the alpha of the vertex color layer as an output. Reviewers: brecht Differential Revision: https://developer.blender.org/D5767