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
2022-05-04Nodes: Add general Combine/Separate Color nodesHallam Roberts
Inspired by D12936 and D12929, this patch adds general purpose "Combine Color" and "Separate Color" nodes to Geometry, Compositor, Shader and Texture nodes. - Within Geometry Nodes, it replaces the existing "Combine RGB" and "Separate RGB" nodes. - Within Compositor Nodes, it replaces the existing "Combine RGBA/HSVA/YCbCrA/YUVA" and "Separate RGBA/HSVA/YCbCrA/YUVA" nodes. - Within Texture Nodes, it replaces the existing "Combine RGBA" and "Separate RGBA" nodes. - Within Shader Nodes, it replaces the existing "Combine RGB/HSV" and "Separate RGB/HSV" nodes. Python addons have not been updated to the new nodes yet. **New shader code** In node_color.h, color.h and gpu_shader_material_color_util.glsl, missing methods hsl_to_rgb and rgb_to_hsl are added by directly converting existing C code. They always produce the same result. **Old code** As requested by T96219, old nodes still exist but are not displayed in the add menu. This means Python scripts can still create them as usual. Otherwise, versioning replaces the old nodes with the new nodes when opening .blend files. Differential Revision: https://developer.blender.org/D14034
2022-04-26Geometry Nodes: Move named attribute nodes out of experimentalHans Goudey
Remove the experimental option for named attributes nodes show they are always available. Ref T91742
2022-04-21Fix: Use alphabetical order in geometry nodes add menuHans Goudey
2022-04-19Cleanup: run autopep8 on release/scripts/startup/Campbell Barton
2022-03-16Cleanup: Further removal for legacy geometry nodesHans Goudey
943b919fe807b535586 missed removing the experimental option and the nodes from the add menu.
2022-03-14Geometry Nodes: Add named attribute nodes behind experimental flagHans Goudey
This commit adds three nodes: - `Remove Attribute`: Removes an attribute with the given name - `Named Attribute`: A field input node - `Store Named Attribute`: Puts results of a field in a named attribute They are added behind a new experimental feature flag, because further development of attribute search and name dependency visualization will happen as separate steps. Ref T91742 Differential Revision: https://developer.blender.org/D12685
2022-02-23Geometry Nodes: Face is Planar NodeJohnny Matthews
This adds a node with a boolean field output which returns true if all of the points of the evaluated face are on the same plane. A float field input allows for the threshold of the face/point comparison to be adjusted on a per face basis. One clear use case is to only triangulate faces that are not planar. Differential Revision: https://developer.blender.org/D13906
2022-02-23Geometry Nodes: Duplicate Elements NodeJohnny Matthews
This adds a node which copies part of a geometry a dynamic number of times. Different parts of the geometry can be copied differing amounts of times, controlled by the amount input field. Geometry can also be ignored by use of the selection input. The output geometry contains only the copies created by the node. if the amount input is set to zero, the output geometry will be empty. The duplicate index output is an integer index with the copy number of each duplicate. Differential Revision: https://developer.blender.org/D13701
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-02Compositor: Combine and Separate XYZ NodeAaron Carlisle
We have this node for shader and geometry nodes. Compositor can also work with vectors, and this can help with that. Reviewed By: manzanilla Maniphest Tasks: T95385 Differential Revision: https://developer.blender.org/D12919
2022-01-25Geometry Nodes: Initial merge by distance nodeHans Goudey
This implements a merge by distance operation for point clouds. Besides the geometry input, there are two others-- a selection input to limit the operation to certain points, and the merge distance. While it would be a reasonable feature, the distance does not support a field currently, since that would make the algorithm significantly more complex. All attributes are merged to the merged points, with the values mixed together. This same generic method is used for all attributes, including `position`. The `id` attribute uses the value from the first merged index for each point. For the implementation, most of the effort goes into creating a merge map to speed up attribute mixing. Some parts are inherently single-threaded, like finding the final indices accounting for the merged points. By far most of the time is spend balancing the KD tree. Mesh support will be added in the next commit. Differential Revision: https://developer.blender.org/D13649
2022-01-25Cycles: add Point Info nodeBrecht Van Lommel
With (center) position, radius and random value outputs. Eevee does not yet support rendering point clouds, but an untested implementation of this node was added for when it does. Ref T92573
2022-01-24Geometry Nodes: Extrude Mesh NodeHans Goudey
This patch introduces an extrude node with three modes. The vertex mode is quite simple, and just attaches new edges to the selected vertices. The edge mode attaches new faces to the selected edges. The faces mode extrudes patches of selected faces, or each selected face individually, depending on the "Individual" boolean input. The default value of the "Offset" input is the mesh's normals, which can be scaled with the "Offset Scale" input. **Attribute Propagation** Attributes are transferred to the new elements with specific rules. Attributes will never change domains for interpolations. Generally boolean attributes are propagated with "or", meaning any connected "true" value that is mixed in for other types will cause the new value to be "true" as well. The `"id"` attribute does not have any special handling currently. Vertex Mode - Vertex: Copied values of selected vertices. - Edge: Averaged values of selected edges. For booleans, edges are selected if any connected edges are selected. Edge Mode - Vertex: Copied values of extruded vertices. - Connecting edges (vertical): Average values of connected extruded edges. For booleans, the edges are selected if any connected extruded edges are selected. - Duplicate edges: Copied values of selected edges. - Face: Averaged values of all faces connected to the selected edge. For booleans, faces are selected if any connected original faces are selected. - Corner: Averaged values of corresponding corners in all faces connected to selected edges. For booleans, corners are selected if one of those corners are selected. Face Mode - Vertex: Copied values of extruded vertices. - Connecting edges (vertical): Average values of connected selected edges, not including the edges "on top" of extruded regions. For booleans, edges are selected when any connected extruded edges were selected. - Duplicate edges: Copied values of extruded edges. - Face: Copied values of the corresponding selected faces. - Corner: Copied values of corresponding corners in selected faces. Individual Face Mode - Vertex: Copied values of extruded vertices. - Connecting edges (vertical): Average values of the two neighboring edges on each extruded face. For booleans, edges are selected when at least one neighbor on the extruded face was selected. - Duplicate edges: Copied values of extruded edges. - Face: Copied values of the corresponding selected faces. - Corner: Copied values of corresponding corners in selected faces. **Differences from edit mode** In face mode (non-individual), the behavior can be different than the extrude tools in edit mode-- this node doesn't handle keeping the back- faces around in the cases that the edit mode tools do. The planned "Solidify" node will handle that use case instead. Keeping this node simpler and faster is preferable at this point, especially because that sort of "smart" behavior is not that predictable and makes less sense in a procedural context. In the future, an "Even Offset" option could be added to this node hopefully fairly simply. For now it is left out in order to keep the patch simpler. **Implementation** For the implementation, the `Mesh` data structure is used directly rather than converting to `BMesh` and back like D12224. This optimizes for large extrusion operations rather than many sequential extrusions. While this is potentially more verbose, it has some important benefits: First, there is no conversion to and from `BMesh`. The code only has to fill arrays and it can do that all at once, making each component of the algorithm much easier to optimize. It also makes the attribute interpolation more explicit, and likely faster. Only limited topology maps must be created in most cases. While there are some necessary loops and allocations with the size of the entire mesh, I tried to keep everything I could on the order of the size of the selection rather than the size of the mesh. In that respect, the individual faces mode is the best, since there is no topology information necessary, and the amount of work just depends on the size of the selection. Modifying an existing mesh instead of generating a new one was a bit of a toss-up, but has a few potential benefits: - Avoids manually copying over attribute data for original elements. - Avoids some overhead of creating a new mesh. - Can potentially take advantage of future ammortized mesh growth. This could be changed easily if it turns out to be the wrong choice. Differential Revision: https://developer.blender.org/D13709
2022-01-21Geometry Nodes: new Scale Elements nodesJacques Lucke
This node can scale individual edges and faces. When multiple selected faces/edges share the same vertices, they are scaled together. The center and scaling factor is averaged in this case. For some examples see D13757. Differential Revision: https://developer.blender.org/D13757
2022-01-21Geometry Nodes: Flip Faces NodeAlan Babu
Currently there is no way to flip normals in geometry nodes. This node makes that possible by flipping the winding order of selected faces. The node is purposely not called "Flip Normals", because normals are derived data, changing them is only a side effect. The real change is that the vertex and edge indices in the face corners of every selected polygon are reversed, and face corner attribute data is reversed. While there are existing utilities to flip a polygon and its custom data, this node aims to process an attribute's data together instead of processing all attributes separately for each index. Differential Revision: https://developer.blender.org/D13809
2022-01-20Geometry Nodes: Curve Primitive ArcCharlie Jolly
This adds a new curve primitive to generate arcs. Radius mode (default): Generates a fixed radius arc on XY plane with controls for Angle, Sweep and Invert. Points mode: Generates a three point curve arc from Start to End via Middle with an Angle Offset and option to invert the arc. There are also outputs for arc center, radius and normal direction relative to the Z-axis. This patch is based on previous patches D11713 and D13100 from @guitargeek. Thank you. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D13640
2022-01-18Geometry Nodes: new Field at Index nodeJacques Lucke
This node allows accessing data of other elements in the context geometry. It is similar to the Transfer Attribute node in Index mode. The main difference is that this node does not require a geometry input, because the context is used. The node can e.g. be used to generalize what the Edge Vertices node is doing. Instead of only being able to get the position of the vertices of an edge, any field/attribute can be accessed on the vertices. Differential Revision: https://developer.blender.org/D13825
2022-01-12Compositor: Add Scene Time Node, Rename Time nodeNathan Rozendaal
Fixes issue T94603 It adds a new compositor node called Scene Time which is already present as a geo node, having the same basic nodes available in all node trees is a nice thing to have. Renames "Time" node to "Time Curve", this is done to avoid confusion between the Time node and the Scene Time node. Reviewed By: jbakker Maniphest Tasks: T94603 Differential Revision: https://developer.blender.org/D13762
2022-01-10Compositing Convert color space nodeJeroen Bakker
Compositor node to convert between color spaces. Conversion is skipped when converting between the same color spaces or to or from data spaces. Implementation done for tiled and full frame compositor. Reviewed By: Blendify, jbakker Differential Revision: https://developer.blender.org/D12481
2022-01-07Cleanup: use static sets for comparison, quiet unused arg warningsCampbell Barton
2022-01-03Geometry Nodes: Edge Angle NodeJohnny Matthews
Calculates the angle in radians between two faces that meet at an edge. 0 to PI in either direction with flat being 0 and folded over on itself PI. If there are not 2 faces on the edge, the angle will be 0. For valid edges, the angle is the same as the 'edge angle' overlay. For the Face and Point domain, the node uses simple interpolation to calculate a value. Differential Revision: https://developer.blender.org/D13366
2021-12-29Geometry Nodes: Accumulate Fields NodeJohnny Matthews
This function node creates a running total of a given Vector, Float, or Int field. Inputs: - Value: The field to be accumulated - Group Index: The values of this input are used to aggregate the input into separate 'bins', creating multiple accumulations. Outputs: - Leading and Trailing: Returns the running totals starting at either the first value of each accumulations or 0 respectively. - Total: Returns the total accumulation at all positions of the field. There's currently plenty of duplicate work happening when multiple outputs are used that could be optimized by a future refactor to field inputs. Differential Revision: https://developer.blender.org/D12743
2021-12-09Geometry Nodes: Scene Time NodeJohnny Matthews
This node outputs the current scene time in seconds or in frames. Use of this node eliminates the need to use drivers to control values in the node tree that are driven by the scene time. Frame is a float value to provide for subframe rendering for motion blur. Differential Revision: https://developer.blender.org/D13455
2021-12-08Geometry Nodes: Mesh Island NodeJohnny Matthews
This node is a field input that outputs a separate index for each mesh island. The indices are based on the order of the lowest-numbered vertex in each island. Authoring help from @hooglyboogly Differential Revision: https://developer.blender.org/D13504
2021-12-07Geometry Nodes: Edge Neighbors NodeJohnny Matthews
Creates a new Edge Neighbors node which outputs a field containing the number of faces connected to each edge. Differential Revision: https://developer.blender.org/D13493
2021-12-07Geometry Nodes: new Geometry to Instance nodeJacques Lucke
This adds a new Geometry to Instance node that turns every connected input geometry into an instance. Those instances can for example be used in the Instance on Points node. Differential Revision: https://developer.blender.org/D13500
2021-12-06Geometry Nodes: 4 Field Inputs for Mesh Topology DataJohnny Matthews
Creates 4 new nodes which provide topology information for the mesh. Values are interpolated from the primary domain in each case using basic attribute interpolation. Vertex Neighbors - Vertex Count - Face Count Face Neighbors - Vertex Count - Neighboring Face Count Edge Vertices - Vertex Index 1 - Vertex Index 2 - Position 1 - Position 2 Face Area - Face Area Differential Revision: https://developer.blender.org/D13343
2021-12-01Geometry Nodes: Dual Mesh NodeWannes Malfait
This node calculates the dual of the input mesh. This means that faces get replaced with vertices and vertices with faces. In principle this only makes sense when the mesh in manifold, but there is an option to keep the (non-manifold) boundaries of the mesh intact. Attributes are propagated: - Point domain goes to face domain and vice versa - Edge domain and Face corner domain gets mapped to itself Because of the duality, when the mesh is manifold, the attributes get mapped to themselves when applying the node twice. Thanks to Leul Mulugeta (@Leul) for help with the ascii diagrams in the code comments. Note that this does not work well with some non-manifold geometry, like an edge connected to more than 2 faces, or a vertex connected to only two faces, while not being in the boundary. This is because there is no good way to define the dual at some of those points. This type of non-manifold vertices are just removed for this reason. Differential Revision: https://developer.blender.org/D12949
2021-12-01Geometry Nodes: Generalized Compare NodeJohnny Matthews
Replace compare floats node with a generalized compare node. The node allows for the comparison of float, int, string, color, and vector. The datatypes support the following operators: Float, Int: <, >, <=, >=, ==, != String: ==, != Color: ==, !=, lighter, darker (using rgb_to_grayscale value as the brightness value) Vector Supports 5 comparison modes for: ==, !=, <, >, <=, >= Average: The average of the components of the vectors are compared. Dot Product: The dot product of the vectors are compared. Direction: The angle between the vectors is compared to an angle Element-wise: The individual components of the vectors are compared. Length: The lengths of the vectors are compared. Differential Revision: https://developer.blender.org/D13228
2021-11-30Geometry Nodes: Curve Menu OrganizeJohnny Matthews
Put Spline Parameter in the correct position in the Curve menu.
2021-11-30Geometry Nodes: Rename Curve Parameter, Add Index on SplineJohnny Matthews
- Rename the Curve Parameter node to Spline Parameter. - Add "Index on Spline" to the node. This output is the index of the current point on it's parent spline rather than the entrire curve. Differential Revision: https://developer.blender.org/D13275
2021-11-29Geometry Nodes: Domain Size NodeJohnny Matthews
The Domain Size node has a single geometry input and a selection for the component type. Based on the component chosen, outputs containing single values for the related domains are shown. Mesh: - Point Count - Edge Count - Face Count - Face Corner Count Curve: - Point Count - Spline Count Point Cloud: - Point Count Instances: - Instance Count Differential Revision: https://developer.blender.org/D13365
2021-10-27Nodes: fix menu when there is no node treeJacques Lucke
Previously, some submenus were empty.
2021-10-26Geometry Nodes: Get and set nodes for ID attributeHans Goudey
These nodes allow accessing and changing the stable/random ID used for motion blur with instances and stable randomness. Since rB40c3b8836b7a, the stable ID is a built-in attribute, so to be consistent and allow changing it in the node tree like other built-in attributes, it has get and set nodes.
2021-10-26Geometry Nodes: Handle multiple grids in the volume to mesh nodeHans Goudey
In future use cases, a volume can contain many grids that represent the density information. In this case, it's better if the volume to mesh node creates a mesh based on all of the grids in the volume. This is also a benefit to share-ability, since one doesn't have to specify the grid name in the node. Instead, in the future we can have a way to split particular grids into separate volumes, if only one grid should be considered. The code changes are relatively simple: - Move the old volume to mesh node to the legacy folder. - Run the volume to mesh node on all instance geometry, like elsewhere. - Make the blenkernel's volume to mesh API a bit more specific. Differential Revision: https://developer.blender.org/D12997
2021-10-26Geometry Nodes: Add Brick Texture nodeCharlie Jolly
Port brick shader node to GN Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D12783
2021-10-25Geometry Nodes: Keep Add menu sorted alphabeticallyDalai Felinto
2021-10-25Geometry Nodes: new Image Texture nodeJacques Lucke
This adds a new image texture node for geometry nodes. It does not reuse the same node that is used in shading, because we want to be able to expose the image and frame as sockets. There is a known update issue when a movie or image sequence is used. That will be fixed separately (also see D12957). Currently, the image socket is just a pointer to an Image ID data block. This can contain single images but also movies and image sequences. In the future, the definition of an image socket can be expanded to include images that are generated from scratch in the node tree. For more details read the discussion in D12827. Some of the code is a direct port from cycles and should be cleaned up a bit in the future. For example `image_cubic_texture_lookup`. For still images, the frame input is ignored. Otherwise, the frame has to be in a valid range for the node to work. In the future we may add e.g. automatic looping functionality. Differential Revision: https://developer.blender.org/D12827
2021-10-24Geometry Nodes: Rename node "String Substring"Erik Abrahamsson
This patch renames the node "String Substring" to "Slice String" to conform to the "verb first" naming convention. Default length is also changed to 10 to make it easier for users to understand what the node does. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D12931
2021-10-23Geometry Nodes: Add Instances to Points NodeJarrett Johnson
This node takes a geometry set with instances as input and outputs points located on the origins of the top level of instances in the geometry set (not nested instances). It also has position and radius inputs to allow overriding the default, and a selection input to only generate points for some instances. The use case for this node is a method to use geometry proximity on instance origins, but in a more generic way that is flexible and useful in other situations. Differential Revision: https://developer.blender.org/D12893
2021-10-23Fix: Empty geometry nodes input menu with legacy nodes enabledHans Goudey
Caused by a misplaced comma at the end of a line in Python.
2021-10-22Geometry Nodes: add Boolean and Integer Input nodesDorian
These nodes just output a single value of their respective types, making it possible to control multiple inputs with the same value. Differential Revision: https://developer.blender.org/D12932
2021-10-20Geometry Nodes: Add Checker TextureCharlie Jolly
Port checker shader to GN Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D12762
2021-10-20Geometry Nodes: Fields version of Curve to Points nodeHans Goudey
This commit adds an updated version of the curve to points that supports fields. Only the position and radius are transferred by default now, which should improve performance. The other outputs like tangent and rotation are outputted with anonymous attributes. I took the opportunity to change a few other small things: - Name geometry sockets "Curve" and "Points" like other nodes. - Remove the radius multiple of 0.1, which was confusing. Thanks to @Johnny Matthews (guitargeek) for an initial patch. Differential Revision: https://developer.blender.org/D12887
2021-10-19Geometry Nodes: Replace String nodeErik Abrahamsson
This commit adds a node that can be used to find and replace strings inside of the input string. One initial use case is to have an easier way to add line breaks to strings to the string to curves node. Differential Revision: https://developer.blender.org/D12721
2021-10-19Geometry Nodes: Add Wave texture nodeCharlie Jolly
Port shader wave texture node Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D12733
2021-10-19Geometry Nodes: Add Magic texture nodeCharlie Jolly
Port shader node magic texture Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D12732
2021-10-19Geometry Nodes: Fields version of the raycast nodeHans Goudey
This patch includes an updated version of the raycast node that uses fields instead of attributes for inputs instead of outputs. This makes the node's UI much clearer. It should be faster too, since the evaluation system for fields provides multi-threading. The source position replaces the input geometry (since this node is evaluated in the context of a geometry like the other field nodes). Thanks to @guitargeek for an initial version of this patch. Differential Revision: https://developer.blender.org/D12638
2021-10-19Cleanup: trailing whitespaceJacques Lucke
2021-10-18Geometry Nodes: Add shader Musgrave texture nodeCharlie Jolly
Port shader node musgrave texture Differential Revision: https://developer.blender.org/D12701