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-01-04Cleanup: sort cmake file listsCampbell Barton
2021-01-04Cleanup: docy comments beginning with '/**' don't end with '**/'Campbell Barton
2021-01-04Cleanup: spelling (use 'gimbal' instead of 'gimble')Campbell Barton
2021-01-01Fix T84029: Point Distribution node crash on mesh with no facesHans Goudey
This bug exposes some ugliness in the implementation in poisson disk distribution implementation with likely incorrect resizing of vectors and some other assumptions. However, a simple quick fix is to return early when the input mesh has no faces. This makes sense anyway because there is no surface to scatter on.
2020-12-28Cleanup: Reduce indentationHans Goudey
Since the if statement is just a NULL check, returning early is simpler and makes reading the rest of the funtion easier.
2020-12-23Geometry Nodes: new Rotate Points nodeJacques Lucke
This node updates the "rotation" attribute on points. Multiple ways to specify the rotation are supported. Differential Revision: https://developer.blender.org/D9883 Ref T83668.
2020-12-21Fix T83989: Attribute Math node ignores its operation settingGarry R. Osgood
T83989 observes that the Attribute Math node always adds its operands regardless of its operator setting. This was caused by an oversight committed in rB23233fcf056e42, which overlooked adjusting the exec function to use the new storage location. Differential Revision: https://developer.blender.org/D9909
2020-12-19Compositor: New Exposure NodeAaron Carlisle
This new node increases the radiance of an image by a scalar value. Previously, the only way to adjust the the exposure of an image was with math node or using the scene's color management. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D9677
2020-12-19Cleanup: Remove unused variables from the bNode structHans Goudey
In some cases the variables were set but never used anywhere. Differential Revision: https://developer.blender.org/D9889
2020-12-18Geometry Nodes: support randomly picking instances from collectionJacques Lucke
This uses the "id" attribute to randomly pick instances from a collection for each point. There is one issue. When the collection is updated (e.g. when an object is added to it), the nodes modifier is not automatically updated. It seems like we don't have the infrastructure to support this dependency yet. The same issue exists in the Boolean modifier and with collision collections. This should be solved separately soonish. When "Whole Collection" is disabled, one direct child of the input collection is instanced at each point. A direct child can be an object or a collection. Currently, all objects are picked approximately equally often. In the future, we will provide more control over which point gets which instance. Differential Revision: https://developer.blender.org/D9884 Ref T82372.
2020-12-18Geometry Nodes: do not crash when there are undefined nodesJacques Lucke
Undefined geometry nodes will just output a default value now.
2020-12-18Function Nodes: Input VectorDalai Felinto
Ref: T82651 Normally people use "Combine XYZ" to input a vector, but it is more interesting to have an explicit vector input. So this is basically "Combine XYZ" without any input sockets, the values are stored in the node itself. Differential Revision: https://developer.blender.org/D9885
2020-12-18Fix T83494: Eevee clamp node incorrect when min > max.Jeroen Bakker
In glsl the clamp function has undefined behavior when min > max. For the clamp node this resulted in differences between cycles and eevee. This patch adds the expected implementation for minmax. The old clamp function is still used in cases where we know for certain that the input values are correct (math node clamp option). GPU uses optimized code and silicon in these cases.
2020-12-18Cleanup: Various clang tidy warningsHans Goudey
There are more in the new mesh fairing code and in the poisson distribution code, this commit doesn't fix those.
2020-12-17Cleanup: Use abstraction for attribute math node inputHans Goudey
Since creating the attribute node, a helper function has been added to automatically get the input attribute or a constant value, depending on the "input type" values for the node. This commit replaces the specific implementation of that behavior with the new helper function. The versioning is necessary since the node now has a "storage" struct.
2020-12-17Geometry Nodes: Point separate and attribute compare nodesHans Goudey
This patch adds two related nodes, a node for separating points and mesh vertices based on a boolean attribute input, and a node for creating boolean attributes with comparisons. See the differential for an example file and video. Point Separate (T83059) The output in both geometries is just point data, contained in the mesh and point cloud components, depending which components had data in the input geometry. Any points with the mask attribute set to true will be moved from the first geometry output to the second. This means that for meshes, all edge and face data will be removed. Any point domain attributes are moved to the correct output geometry as well. Attribute Compare (T83057) The attribute compare does the "Equal" and "Not Equal" operations by comparing vectors and colors based on their distance from each other. For other operations, the comparison is between the lengths of the vector inputs. In general, the highest complexity data type is used for the operation, and a new function to determine that is added. Differential Revision: https://developer.blender.org/D9876
2020-12-17Geometry Nodes: Make random attribute node stableHans Goudey
Currently, the random attribute node doesn't work well for most workflows because for any change in the input data it outputs completely different results. This patch adds an implicit seed attribute input to the node, referred to by "id". The attribute is hashed for each element using the CPPType system's hash method, meaning the attribute can have any data type. Supporting any data type is also important so any attribute can be copied into the "id" attribute and used as a seed. The "id" attribute is an example of a "reserved name" attribute, meaning attributes with this name can be used implicitly by nodes like the random attribute node. Although it makes it a bit more difficult to dig deeper, using the name implicitly rather than exposing it as an input should make the system more accessible and predictable. Differential Revision: https://developer.blender.org/D9832
2020-12-17Geometry-Nodes: Point Distribute - Sockets RenamingDalai Felinto
The size of the nodes is not enough to give enough context to users what the sockets are about. Minimum Distance -> Distance Min Maximum Density -> Distance Min Note this does not handle doversion. That means users will have to manually.
2020-12-17Geometry Nodes: add Attribute Color Ramp nodeJacques Lucke
Differential Revision: https://developer.blender.org/D9861 Ref T82585.
2020-12-16Geometry Nodes: Add boolean attribute in utility functionHans Goudey
This follows up rBc484b54453e607, adding the boolean custom property data type in one more place that was missed.
2020-12-16Geometry Nodes: Boolean attribute typeHans Goudey
This adds a boolean attribute and custom data type, to be used in the point separate node. It also adds it as supported data types in the random attribute and attribute fill nodes. There are more clever ways of storing a boolean attribute that make more sense in certain situations-- sets, bitfields, and others, this commit keeps it simple, saving those changes for when there is a proper use case for them. In any case, we will still probably always want the idea of a boolean attribute. Differential Revision: https://developer.blender.org/D9818
2020-12-16Cleanup: Replace mempcpy with memcpyDalai Felinto
There is no need of using mempcpy here, memcpy is enough. Note: This also fix building in Windows which was broken since a7628ec22a.
2020-12-16Geometry Nodes: Poisson disk point distribution node/methodDalai Felinto
This patch does two things: * Introduce a Seed to the random distribution method * Bring in a new distribution method for the point scattering node Patch Review: https://developer.blender.org/D9787 Note: This commit doesn't not handle doversion. Which means that users need to manually update their files that were using the Point Distribute node and reconnect inputs to the "Maximum Density" socket. Original patch by Sebastian Parborg, with changes to not rely on the cy libraries and overall cleanup. Patch review by Jacques Lucke, besides help with the new "heap" system that was required for this algorithm. Based on Cem Yuksel. 2015. Sample Elimination for Generating Poisson Disk Sample. Sets. Computer Graphics Forum 34, 2 (May 2015), 25-32 http://www.cemyuksel.com/research/sampleelimination/
2020-12-16Geometry Nodes: rename node to Attribute RandomizeJacques Lucke
Previously, the node was called Random Attribute. For consistency reasons, we move the "Attribute" part of the name to the front.
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-12-14Geometry Nodes: Input data type utility functionHans Goudey
This commit adds a simple utility function for getting the data type of an attribute or its "constant" socket counterparts. No functional changes. Differential Revision: https://developer.blender.org/D9819
2020-12-14Cryptomatte: Data structure in compositor nodeJeroen Bakker
This changes the way how the mattes are stored in the compositor node. This used to be a single string what was decoded/encoded when needed. The new data structure stores all entries in `CryptomatteEntry` and is converted to the old `matte_id` property on the fly. This is done for some future changes in the workflow where a more structured approach leads to less confusing and easier to read code.
2020-12-14Fix T83712: arctangent math node does not work in EeveeJacques Lucke
Caused by my refactoring of the math node. Somehow this operation slipped through my double checking procedure.
2020-12-11Geometry Nodes: support instancing collectionsJacques Lucke
The Point Instance node can instance entire collections now. Before, only individual collections were supported. Randomly selecting objects from the collection on a per point basis is not support, yet. Last part of D9739. Ref T82372.
2020-12-11Geometry Nodes: support collection socketsJacques Lucke
Part of D9739.
2020-12-11Nodes: add Collection socket typeJacques Lucke
The implementation is pretty much the same as for Object sockets. The socket color is the one that is used for collections in the outliner. Part of D9739.
2020-12-11Geometry Nodes: add Attribute Mix nodeJacques Lucke
This node can be used to mix two attributes in various ways. The blend modes are the same as in the MixRGB shader node. Differential Revision: https://developer.blender.org/D9737 Ref T82374.
2020-12-11Cleanup: sort cmake file listsCampbell Barton
2020-12-10Geometry Nodes: Attribute Fill NodeHans Goudey
This commit adds a node that fills every element of an attribute with the same value. Currently it supports float, vector, and color attributes. An immediate use case is for "billboard" scattering. Currently people are using the same input to a Random Attribute node's min and max input to fill every element of a vector with the same value, which is an unintuitive way to accomplish the same thing. Differential Revision: https://developer.blender.org/D9790
2020-12-09Geometry Nodes: simplify supporting different input socket types for attributesJacques Lucke
This is a non-functional change. The functionality introduced in this commit is not used in master yet. It is used by nodes that are being developed in other branches though.
2020-12-08Fix T83114: incorrect normals after joining subdivided meshesJacques Lucke
This just makes sure that the mesh coming out of the subdivision surface node has correct normals. Ideally, we would lazily compute derived data like normals in more cases, but that can be solved later. Correctness is more important right now. In order to solve this better, it would be nice if functions like `BKE_mesh_ensure_normals` would take a `const Mesh *`. The mesh could be considered to be logically const, because normals are derived data that is only cached for the current state of the mesh.
2020-12-08Fix T83337: boundary smooth input in subdivision surface node is invertedLéo Depoix
Differential Revision: https://developer.blender.org/D9753
2020-12-04Cleanup: Clang-Tidy, modernize-deprecated-headersSybren A. Stüvel
No functional changes.
2020-12-04EEVEE: Arbitrary Output VariablesJeroen Bakker
This patch adds support for AOVs in EEVEE. AOV Outputs can be defined in the render pass tab and used in shader materials. Both Object and World based shaders are supported. The AOV can be previewed in the viewport using the renderpass selector in the shading popover. AOV names that conflict with other AOVs are automatically corrected. AOV conflicts with render passes get a warning icon. The reason behind this is that changing render engines/passes can change the conflict, but you might not notice it. Changing this automatically would also make the materials incorrect, so best to leave this to the user. **Implementation** The patch adds a copies the AOV structures of Cycles into Blender. The goal is that the Cycles will use Blenders AOV defintions. In the Blender kernel (`layer.c`) the logic of these structures are implemented. The GLSL shader of any GPUMaterial can hold multiple outputs (the main output and the AOV outputs) based on the renderPassUBO the right output is selected. This selection uses an hash that encodes the AOV structure. The full AOV needed to be encoded when actually drawing the material pass as the AOV type changes the behavior of the AOV. This isn't known yet when the GLSL is compiled. **Future Developments** * The AOV definitions in the render layer panel isn't shared with Cycles. Cycles should be migrated to use the same viewlayer aovs. During a previous attempt this failed as the AOV validation in cycles and in Blender have implementation differences what made it crash when an aov name was invalid. This could be fixed by extending the external render engine API. * Add support to Cycles to render AOVs in the 3d viewport. * Use a drop down list for selecting AOVs in the AOV Output node. * Give user feedback when multiple AOV output nodes with the same AOV name exists in the same shader. * Fix viewing single channel images in the image editor [T83314] * Reduce viewport render time by only render needed draw passes. [T83316] Reviewed By: Brecht van Lommel, Clément Foucault Differential Revision: https://developer.blender.org/D7010
2020-12-03UI: Fix Node Groups color in Geometry NodesPablo Vazquez
Node Groups didn't have a category assigned so they looked like inputs (red) instead of the Node Group theme color (green by default).
2020-12-03Geometry Nodes: improve support for Color attributesJacques Lucke
* Add typed attribute accessors for color attributes. * Support implicit conversions between colors and floats.
2020-12-02UI: Add new node colors for geometry nodesHans Goudey
During the development of the new nodes in the `geometry-nodes` branch the color of the new nodes wasn't considered, so all of the nodes ended up red, the color for "input" nodes. This patch introduces two new colors, one for "Geometry" and one for "Attributes". There are only two attribute nodes currently, but the next sprint will add two more, attribute mix, and sample from texture. The attribute nodes are conceptually different enough from the nodes that modify the geometry that they deserve their own color. Differential Revision: https://developer.blender.org/D9682
2020-12-02Geometry Nodes: automatically reconnect when swapping inputsJacques Lucke
This makes it easier to swap the inputs to the Join Geometry node. The behavior is the same as in the Math node.
2020-12-02Geometry Nodes: active modifier + geometry nodes editorHans Goudey
This commit adds functions to set and get the object's active modifier, which is stored as a flag in the ModifierData struct, similar to constraints. This will be used to set the context in the node editor. There are no visible changes in this commit. Similar to how the node editor context works for materials, this commit makes the node group displayed in the node editor depend on the active object and its active modifier. To keep the node group from changing, just pin the node group in the header. * Shortcuts performed while there is an active modifier will affect only that modifier (the exception is the A to expand the modifiers). * Clicking anywhere on the empty space in a modifier's panel will make it active. These changes require some refactoring of object modifier code. First is splitting up the modifier property invoke callback, which now needs to be able to get the active modifier separately from the hovered modifier for the different operators. Second is a change to removing modifiers, where there is now a separate function to remove a modifier from an object's list, in order to handle changing the active. Finally, the panel handler needs a small tweak so that this "click in panel" event can be handled afterwards.
2020-12-02Geometry Nodes: support muted nodesJacques Lucke
The handling of muted nodes is handled at the derived node tree level now. This is also where expanding node groups is handled. Muted nodes are relinked and removed from the derived tree during construction. The geometry node evaluation code does not have to know about muted nodes this way.
2020-12-02Geometry Nodes: initial scattering and geometry nodesJacques Lucke
This is the initial merge from the geometry-nodes branch. Nodes: * Attribute Math * Boolean * Edge Split * Float Compare * Object Info * Point Distribute * Point Instance * Random Attribute * Random Float * Subdivision Surface * Transform * Triangulate It includes the initial evaluation of geometry node groups in the Geometry Nodes modifier. Notes on the Generic attribute access API The API adds an indirection for attribute access. That has the following benefits: * Most code does not have to care about how an attribute is stored internally. This is mainly necessary, because we have to deal with "legacy" attributes such as vertex weights and attributes that are embedded into other structs such as vertex positions. * When reading from an attribute, we generally don't care what domain the attribute is stored on. So we want to abstract away the interpolation that that adapts attributes from one domain to another domain (this is not actually implemented yet). Other possible improvements for later iterations include: * Actually implement interpolation between domains. * Don't use inheritance for the different attribute types. A single class for read access and one for write access might be enough, because we know all the ways in which attributes are stored internally. We don't want more different internal structures in the future. On the contrary, ideally we can consolidate the different storage formats in the future to reduce the need for this indirection. * Remove the need for heap allocations when creating attribute accessors. It includes commits from: * Dalai Felinto * Hans Goudey * Jacques Lucke * Léo Depoix
2020-12-02Nodes: add geometry socket typeJacques Lucke
We still have to pick a color for this socket. Ref T81848.
2020-11-25Nodes: deduplicate ping pong math operationJacques Lucke
The formula did not change. The only side effect of this change should be that the compositor node now does not divide by zero in some cases.
2020-11-20Cleanup: spellingCampbell Barton
2020-11-19Fix lost node links when linked node group datablock is temporarily missingBrecht Van Lommel
Don't refresh the list of sockets, so that when the .blend file is restored the links remain valid. Also display such nodes in red to indicate an error, same as when the node type info is missing.