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
2021-10-26Cycles: changes to source code folders structureBrecht Van Lommel
* Split render/ into scene/ and session/. The scene/ folder now contains the scene and its nodes. The session/ folder contains the render session and associated data structures like drivers and render buffers. * Move top level kernel headers into new folders kernel/camera/, kernel/film/, kernel/light/, kernel/sample/, kernel/util/ * Move integrator related kernel headers into kernel/integrator/ * Move OSL shaders from kernel/shaders/ to kernel/osl/shaders/ For patches and branches, git merge and rebase should be able to detect the renames and move over code to the right file.
2021-10-11Cycles: restore Christensen-Burley SSSBrecht Van Lommel
There is not enough time before the release to improve Random Walk to handle all cases this was used for, so restore it for now. Since there is no more path splitting in cycles-x, this can increase noise in non-flat areas for the sample number of samples, though fewer rays will be traced also. This is fundamentally a trade-off we made in the new design and why Random Walk is a better fit. However the importance resampling we do now does help to reduce noise. Differential Revision: https://developer.blender.org/D12800
2021-09-30Nodes: Add Float Curve for GN and Shader nodes.Charlie Jolly
Replacement for float curve in legacy Attribute Curve Map node. Float Curve defaults to [0.0-1.0] range. Reviewed By: JacquesLucke, brecht Differential Revision: https://developer.blender.org/D12683
2021-09-24Cleanup: clang formatPhilipp Oeser
2021-09-24Hair Info Length AttributeJeroen Bakker
Goal is to add the length attribute to the Hair Info node, for better control over color gradients or similar along the hair. Reviewed By: #eevee_viewport, brecht Differential Revision: https://developer.blender.org/D10481
2021-09-22Fix T91576: Cycles attribute node with name N for smooth normal no longer ↵Brecht Van Lommel
working There was an optimization to remove duplicate storage of normals as attributes when using normal maps. However for named attributes like this we still need to store the attribute. Don't request normal attribute from the normal map node now, instead of skipping it in the geometry code.
2021-09-21Cycles: merge of cycles-x branch, a major update to the rendererBrecht Van Lommel
This includes much improved GPU rendering performance, viewport interactivity, new shadow catcher, revamped sampling settings, subsurface scattering anisotropy, new GPU volume sampling, improved PMJ sampling pattern, and more. Some features have also been removed or changed, breaking backwards compatibility. Including the removal of the OpenCL backend, for which alternatives are under development. Release notes and code docs: https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles https://wiki.blender.org/wiki/Source/Render/Cycles Credits: * Sergey Sharybin * Brecht Van Lommel * Patrick Mours (OptiX backend) * Christophe Hery (subsurface scattering anisotropy) * William Leeson (PMJ sampling pattern) * Alaska (various fixes and tweaks) * Thomas Dinges (various fixes) For the full commit history, see the cycles-x branch. This squashes together all the changes since intermediate changes would often fail building or tests. Ref T87839, T87837, T87836 Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-08-17Fix T82336: Cycles standard attributes missing in displacement shadersKévin Dietrich
Standard attributes are not added to the attributes requests when shaders only have displacement. This is because nodes are only considering the case when the surface socket is connected. To support this, added `Shader.has_surface_link()` which checks for both cases (`has_surface` and `has_displacement`) and replaces all checks on `Shader.has_surface`. Reviewed By: brecht Differential Revision: https://developer.blender.org/D12240
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: use '#if 0' for commented code-blockCampbell Barton
2021-06-04Nodes: Add Multiply Add to Vector Math nodesCharlie Jolly
Cycles, Eevee, OSL, Geo, Attribute This operator provides consistency with the standard math node. Allows users to use a single node instead of two nodes for this common operation. Reviewed By: HooglyBoogly, brecht Differential Revision: https://developer.blender.org/D10808
2021-03-23Nodes: Add Refract and Faceforward functions to Vector Maths nodesCharlie Jolly
Cycles, Eevee, OSL, Geo, Attribute Based on outdated refract patch D6619 by @cubic_sloth `refract` and `faceforward` are standard functions in GLSL, OSL and Godot shader languages. Adding these functions provides Blender shader artists access to these standard functions. Reviewed By: brecht Differential Revision: https://developer.blender.org/D10622
2021-03-15Fix Cycles rendering crash on OpenBSDBrecht Van Lommel
Static initialization order was not guaranteed to be correct for node base types. Now wrap all initialization in accessor functions to ensure the order is correct. Did not cause any known bug on Linux/macOS/Windows, but showed up on this platform.
2021-02-17Cycles: add support for Arm Neon instructions using sse2neonBrecht Van Lommel
Based on patch contributed by Apple and Stefan Werner. Ref D8237, T78710
2021-02-17Cycles: add utility functions for zero float2/float3/float4/transformBrecht Van Lommel
Ref D8237, T78710
2020-11-16Merge branch 'blender-v2.91-release'Brecht Van Lommel
2020-11-16Fix T82673: Cycles crash with zero emission strength and linked emission colorBrecht Van Lommel
2020-11-10Fix T82561: shader compilation crashes in OSLKévin Dietrich
The "type" sockets on shader nodes were renamed in rB31a620b9420cab to avoid clashes with the `NodeType type` member from the Node base class, but the OSL shader compilation was missing those changes.
2020-11-04Cycles API: encapsulate Node socket membersKévin Dietrich
This encapsulates Node socket members behind a set of specific methods; as such it is no longer possible to directly access Node class members from exporters and parts of Cycles. The methods are defined via the NODE_SOCKET_API macros in `graph/ node.h`, and are for getting or setting a specific socket's value, as well as querying or modifying the state of its update flag. The setters will check whether the value has changed and tag the socket as modified appropriately. This will let us know how a Node has changed and what to update, which is the first concrete step toward a more granular scene update system. Since the setters will tag the Node sockets as modified when passed different data, this patch also removes the various modified methods on Nodes in favor of Node::is_modified which checks the sockets' update flags status. Reviewed By: brecht Maniphest Tasks: T79174 Differential Revision: https://developer.blender.org/D8544
2020-10-30Merge branch 'blender-v2.91-release'Brecht Van Lommel
2020-10-30Fix Cycles map range node missing clamp socketBrecht Van Lommel
No effect on the Blender integration yet, but needs to be solved for the upcoming change to encapsulate sockets.
2020-10-28Cycles: internal support for alpha output for attribute nodeAlexander Gavrilov
Not exposed in Blender yet. Ref D2057
2020-10-27Revert "Cycles API: encapsulate Node socket members"Brecht Van Lommel
This reverts commit 527f8b32b32187f754e5b176db6377736f9cb8ff. It is causing motion blur test failures and crashes in some renders, reverting until this is fixed.
2020-10-27Cycles API: encapsulate Node socket membersKévin Dietrich
This encapsulates Node socket members behind a set of specific methods; as such it is no longer possible to directly access Node class members from exporters and parts of Cycles. The methods are defined via the NODE_SOCKET_API macros in `graph/ node.h`, and are for getting or setting a specific socket's value, as well as querying or modifying the state of its update flag. The setters will check whether the value has changed and tag the socket as modified appropriately. This will let us know how a Node has changed and what to update, which is the first concrete step toward a more granular scene update system. Since the setters will tag the Node sockets as modified when passed different data, this patch also removes the various `modified` methods on Nodes in favor of `Node::is_modified` which checks the sockets' update flags status. Reviewed By: brecht Maniphest Tasks: T79174 Differential Revision: https://developer.blender.org/D8544
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
2020-08-31Cycles: introduce an ownership system to protect nodes from unwanted deletions.Kévin Dietrich
Problem: the Blender synchronization process creates and tags nodes for usage. It does this by directly adding and removing nodes from the scene data. If some node is not tagged as used at the end of a synchronization, it then deletes the node from the scene. This poses a problem when it comes to supporting procedural nodes who can create other nodes not known by the Blender synchonization system, which will remove them. Nodes now have a NodeOwner, which is set after creation. Those owners for now are the Scene for scene level nodes and ShaderGraph for shader nodes. Instead of creating and deleting nodes using `new` and `delete` explicitely, we now use `create_node` and `delete_node` methods found on the owners. `delete_node` will assert that the owner is the right one. Whenever a scene level node is created or deleted, the appropriate node manager is tagged for an update, freeing this responsability from BlenderSync or other software exporters. Concerning BlenderSync, the `id_maps` do not explicitely manipulate scene data anymore, they only keep track of which nodes are used, employing the scene to create and delete them. To achieve this, the ParticleSystem is now a Node, although it does not have any sockets. This is part of T79131. Reviewed By: #cycles, brecht Maniphest Tasks: T79131 Differential Revision: https://developer.blender.org/D8540
2020-08-18Cycles: add a Pass NodeKévin Dietrich
The Pass struct is now a Node and the passes are moved from the Film class to the Scene class. The Pass Node only has `type` and `name` as sockets as those seem to be the only properties settable by exporters (other properties are implicit and depend on the pass type). This is part of T79131. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8591
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: Clamp Sky Texture altitude to avoid numerical issuesLukas 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-13Cycles: Remove limits on the Sky texture's sun rotationLukas Stockner
For animation/driver purposes, being able to go outside of the 0-360 range makes things easier. Differential Revision: https://developer.blender.org/D8091
2020-07-09EEVEE: Implement the missing Sky textureSzymon Ulatowski
I'm not sure if the Sky was deliberately left out or was just waiting for a better moment, but so many I was disappointed that Sky in EEVEE is completely white. There are already 2 implementations (osl and gpu) so this is the third one. Looking at other cases it seems that we are not supposed to share sources between cycles and the rest? So the new util_sky_model files are just copies of what is already in cycles, except that the data file uses the RGB variant of the Hosek/Wilkie model, because we output RGB anyway (but can be easily changed to XYZ if desired - the results are nearly identical). I am not sure if it is okay to pass 3*9 float values as 3 mat4 uniforms (I wanted to use mat3 but it does not work). Also, should I cache the sky model data between renders if the parameters do not change? Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D7108
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-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-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-11Cleanup: refactor image loading to use abstract ImageLoader base classBrecht Van Lommel
Rather than passing around void pointers, various Blender image sources now subclass this. OIIO is also just another type of image loader. Also fixes T67718: Cycles viewport render crash editing point density settings
2020-03-11Cleanup: add ImageHandle to centralize image ownership logicBrecht Van Lommel
2020-03-11Cycles: add internal default volume shader, to be used for new volume objectBrecht Van Lommel
This is mostly straightforward, but required some refactoring to ensure that the default volume material does not always turn on the volume feature for GPU rendering.
2020-03-06Cleanup: tweak Cycles #includes in preparation for clang-format sortingBrecht Van Lommel
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-26Cleanup: add ImageKey to avoid longer argument lists and duplicated codeBrecht Van Lommel
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-19Fix T73938: Cycles Vertex Color wrong if no layer is specifiedPhilipp Oeser
The node would render black in this case (but should use the 'active_render' layer choosen in the object data properties -- this is now in line to how this is handled for e.g. UVs) This introduces ATTR_STD_VERTEX_COLOR and uses this thoughout, if no particular layer is specified in the node. Maniphest Tasks: T73938 Differential Revision: https://developer.blender.org/D6887
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-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-02-07Cleanup: split Cycles Hair and Mesh classes, with Geometry base classBrecht Van Lommel
2020-02-04Merge branch 'blender-v2.82-release'Pablo Dobarro