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-12Cleanup: Fix incorrect function nameHans Goudey
The function used "domain" incorrectly where it meant "data type".
2021-01-12Geometry Nodes: new Align Rotation to Vector nodeJacques Lucke
This adds a new Align Rotation to Vector node based on the mockup in T83669. Reviewers: HooglyBoogly, simonthommes Differential Revision: https://developer.blender.org/D10081
2021-01-12Geometry Nodes: support reading from spans of WriteAttributeJacques Lucke
Previously, the span returned by `WriteAttribute`s might not contain the current value of the attribute for performance reasons. To avoid some bugs, the span now always contains the old values (they might have to be copied over from the internal storage, dependending on how the attribute is stored). The old behavior is still available with the `get_span_for_write_only` method. The span that it returns might not contain the current attribute values. Therefore, it should only be used when you want to overwrite an attribute without looking at the old values.
2021-01-11Geometry Nodes: Attribute Vector Math NodeHans Goudey
This patch implements the same operations and interface as the regular vector math node, but it runs for every element of the attribute. This should expand what's possible with geometry nodes quite a bit. Differential Revision: https://developer.blender.org/D9914
2021-01-11Geometry Nodes Point Distribution: Align points to face normalsHans Goudey
This patch makes the point distribute node write to the "rotation" attribute with the normal of each face at each distributed point. The "normal" attribute is also created with the triangle normal at each point. The conversion from the triangle normal to an Euler rotation is somewhat arbitrary, since we only have one direction vector. For a more flexible rotation for each point, the "Align Rotation to Vector" node can be used in the future. Differential Revision: https://developer.blender.org/D9965
2021-01-11Geometry Nodes: transform Object Info outputs to local spaceJacques Lucke
Ref T83670. Differential Revision: https://developer.blender.org/D10071
2021-01-07Fix T84326: No ID for geometry nodes instances after scatteringHans Goudey
Instances are created with an "index" parameter used for persistence over time through animation. Currently the geometry nodes instancer passes the index in the array for this value, but the arrays created by the "Point Distribution" node aren't necessarily stable in this way when the input mesh is deformed. In D9832 we already mostly solved this problem with an `id` attribute. The solution here is to create instances with this attribute as well. It's important to note that deforming the instanced points *after* distribution will usually be a better solution for this problem. This solution is likely still important though. Differential Revision: https://developer.blender.org/D10024
2021-01-05Cleanup: clang tidyJacques Lucke
2021-01-05Compositor: Alpha ModeJeroen Bakker
{D9211} introduced pre-multiplying the color for the keying node. This pre-multiplication should also be done by other keying nodes and should be the default operation for alpha node. This patch will change the logic of keying nodes (Cryptomatte Node, Channel Matte, Chroma Matte, Color Matte, Difference Matte, Distance Matte, Luminance Matte) and breaks old files. The Set alpha node has a mode parameter. This parameter changes the logic to `Apply Mask` the alpha on the RGBA channels of the input color or only replace the alpha channel (old behavior). The replace mode is automatically set for older files. When adding new files the the multiply mode is set. Reviewed By: Sergey Sharybin Differential Revision: https://developer.blender.org/D9630
2021-01-05Cleanup: remove UNUSED(..) from public function declarationsCampbell Barton
This doesn't serve any purpose and can become out of sync with the function it's self without reporting warnings.
2021-01-04Fix T84106: attribute mix node worked incorrectly on float attributesJacques Lucke
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