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-03-18Progress on read only point separate node, doesn't work right nowtemp-geometry-nodes-instances-api-v2Hans Goudey
2021-03-18Further cleanupHans Goudey
2021-03-18Merge branch 'master' into geometry-nodes-read-only-instancesHans Goudey
2021-03-17Geometry Nodes: Rename "Subdivide Smooth" back to "Subdivision Surface"Hans Goudey
Following concerns raised in the commit that changed the name initially, rB2e19509e60b39837, it makes more sense to keep the "Surface" name for this node because it has a specific meaning that should not be confused with other types of subdivision.
2021-03-17Geometry Nodes: Use consistent default for cylinder nodeHans Goudey
- Use 2m height instead of 1m - Default to N-Gon fill for the top and bottom
2021-03-17Fix T86655: remove doubled transformsWannes Malfait
Differential Revision: https://developer.blender.org/D10744
2021-03-17Geometry Nodes: Add initial version of mesh primitivesHans Goudey
This commit includes nodes to build the following primitives: - Cone - Cylinder - Circle - Cube - UV Sphere - Ico Sphere - Line - Plane/Grid In general the inputs are the same as the corresponding operators in the 3D view. **Line Primitive** The line primitive has two modes-- adding vertices between two end points, or adding vertices each at an offset from the start point. For the former mode, there is a choice between a vertex count and a distance between each point. **Plane Primitive** This commit includes the "Plane" and "Grid" primitives as one node. Generally primitives are named after the simpler form of the shape they create (i.e. "Cone" can make some more complex shapes). Also, generally you want to tweak the number of subdivisions anyway, so defaulting to plane is not an inconvenience. And generally having fewer redundant base primitives is better. **Future Improvements** A following patch proposes to improve the speed of the cylinder, cone, and sphere primitives: D10730. Additional possible future improvements would be adding subdivisions to the cube node and rings to the cone and cylinder nodes. Differential Revision: https://developer.blender.org/D10715
2021-03-15Geometry Nodes: expose builtin crease attributeJacques Lucke
This exposes the `crease` attribute, that is used by the Subdivide Smooth node. It is also the first attribute on the edge domain. Domain interpolations for the edge domain have not been implemented yet. Ref T86397. Differential Revision: https://developer.blender.org/D10660
2021-03-15Nodes: multi-input support for Attribute Remove nodeFabian Schempp
This patch adds multi-input support to the Attribute Remove node. Reviewed By: Hans Goudey Differential Revision: https://developer.blender.org/D10698
2021-03-13Geometry Nodes: Add "normal" attribute for face normalsHans Goudey
This commit adds a `normal` attribute on the polygon domain. Since normal data is derived data purely based off of the location of each face's vertices, it is exposed as a read-only attribute. After rB80f7f1070f17, this attribute can be interpolated to the other domains. Since this attribute is a special case compared to the others, the implementation subclasses `BuiltinAttributeProvider`. It's possible there is a better way to abstract this. Something else might also become apparent if we add similar read-only attributes. See rB2966871a7a891bf36 for why this is preferred over the previous implementation. Differential Revision: https://developer.blender.org/D10677
2021-03-13Geometry Nodes: Add Attribute Convert nodeCharlie Jolly
The Attribute Convert node provides functionality to change attributes between different domains and data types. Before it was impossible to write to a UV Map attribute with the attribute math nodes since they did not output a 2D vector type. This makes it possible to "convert into" a UV map attribute. The data type conversion uses the implicit conversions provided by `\nodes\intern\node_tree_multi_function.cc`. The `Auto` domain mode chooses the domain based on the following rules: 1. If the result attribute already exists, use that domain. 2. If the result attribute doesn't exist, use the source attribute domain. 3. Otherwise use the default domain (points). See {T85700} Differential Revision: https://developer.blender.org/D10624
2021-03-12Added missing file to last commit:Fabian Schempp
Nodes: Add Attribute Remove Node D10697
2021-03-11Fix T86458: Simple Subdivision node does not preserve vertex groupsRahul Chaudhary
Differential Revision: https://developer.blender.org/D10683
2021-03-10Add 'foreach_nodeclass' for geometry nodetreesPhilipp Oeser
This way we get a choice when we click on node links in the Properties Editor. This also changes some of the more permissive poll functions on some nodes back to being "shading-only" (these were made permissive in rBb78f2675d7e5 for simulation nodes, but have not found their way into geometry nodes yet). ref b279fef85d1a / T86416 / D10671 Maniphest Tasks: T86416 Differential Revision: https://developer.blender.org/D10673
2021-03-10Geometry Nodes: transfer polygon attributes to points in Point Distribute nodeJacques Lucke
2021-03-10Geometry Nodes: move geometry component type enum to CJacques Lucke
This allows us to use it in rna for the spreadsheet editor.
2021-03-10Cleanup: spellingCampbell Barton
2021-03-09Fix T86432: missing check if attribute is availableJacques Lucke
This failed when the component did exist, but did not contain any data.
2021-03-09Geometry Nodes: Expose "shade smooth" as an attributeHans Goudey
This patch exposes the "Shade Smooth" value as a boolean attribute. This setting is exposed as a check-box in the mesh data properties, but the value is actually stored for every face, allowing some faces to be shaded smooth with a simple per-face control. One bonus, this allows at least a workaround to the lack of control of whether meshes created by nodes are shaded smooth or not: just use an attribute fill node. Differential Revision: https://developer.blender.org/D10538
2021-03-09Cleanup: fix warningsJacques Lucke
2021-03-08Geometry Nodes: Rename subdivision nodesHans Goudey
This makes the following changes to the name of the two geometry nodes subvision nodes: - `Subdivision Surface` -> `Subdivide Smooth` - `Subdivision Surface Simple` -> `Subdivide` Most of the benefit is that the names are shorter, but it also better mirrors the naming of operations in edit mode, and phrases the names more like actions. This was discussed with the geometry nodes team.
2021-03-08Geometry Nodes: Improve performance of point distribute nodeHans Goudey
This commit refactors the point distribute node to skip realizing the instances created by the point instance node or the collection and object info nodes. Realizing instances is not necessary here because it copies all the mesh data and and interpolates all attributes from the instances when this operation does not need to modify the input geometry at all. In the tree leaves test file this patch improves the performance of the node by about 14%. That's not very much, the gain is likely larger for more complicated input instances with more attributes (especially attributes on different domains, where interpolation would be necessary to join all of the instances). Another possible performance improvement would be to parallelize the code in this node where possible. The point distribution code unfortunately gets quite a bit more complicated because it has to handle the complexity of having many inputs instead of just one. Note that this commit changes the randomness of the distribution in some cases, as if the seed input had changed. Differential Revision: https://developer.blender.org/D10596
2021-03-08Speedup for usual non-manifold exact boolean case.Howard Trickey
The commit rB6f63417b500d that made exact boolean work on meshes with holes (like Suzanne) unfortunately dramatically slowed things down on other non-manifold meshes that don't have holes and didn't need the per-triangle insideness test. This adds a hole_tolerant parameter, false by default, that the user can enable to get good results on non-manifold meshes with holes. Using false for this parameter speeds up the time from 90 seconds to 10 seconds on an example with 1.2M triangles.
2021-03-06Geometry Nodes: Expose vertex normals as an attributeHans Goudey
This attribute exposes mesh vertex normals as a `vertex_normal` attribute for use with nodes. Since the normal vector stored in vertices is only a cache of data computable from the surrounding faces, the attribute is read-only. A proper error message for attempting to write this attribute is part of T85749. A write-only normal attribute will likely come later, most likely called `corner_normal`. The normals are recomputed before reading if they are marked dirty. This involves const write-access to the mesh, protected by the mutex stored in `Mesh_Runtime`. This is essential for correct behavior after nodes like "Edge Split" or nodes that adjust the position attribute. Ref T84297, T85880, T86206 Differential Revision: https://developer.blender.org/D10541
2021-03-03UI: Allow translation for node error messagesHans Goudey
This commit exposes the strings used in the node error messages for localization. It also changes the message tooltip creation to automatically add the period at the end, to be more consistent with the (arguably bad) design of other tooltips in Blender. Calling `TIP_` directly in the node implementation files allows us to continue using `std::string` concatenation instead of passing variadic arguments. It's also more explicit about which part of the message is translated and which isn't. The files already include the translation header anyway.
2021-03-02Merge branch 'master' into geometry-nodes-read-only-instancesHans Goudey
2021-03-02Fix T86172: check if attribute is actually accessibleJacques Lucke
The crash happened when the density in the Point Distribute node was above zero but so small, that no point was generated. In this case, there was a point cloud component, but the point cloud was empty, making some attributes unavailable. One could also make more attributes available in this case, but that can be done separately if necessary.
2021-03-01UI: Correct output attribute name in proximity nodeHans Goudey
I made an incorrect comment in patch review that "Location" should be used instead of position. "Position" is more appropriate here since it refers to generic data rather than an object origin. "Position" is also the name we chose for the attribute for this reason.
2021-02-27Fix conflicts and build error from mergeHans Goudey
2021-02-27Merge branch 'master' into temp-geometry-nodes-instances-api-v2Hans Goudey
2021-02-27Geometry Nodes: Add "Location" output to Attribute Proximity nodeVictor-Louis De Gusseme
This patch adds an output field to the Attribute Proximity node and renames the existing string socket from "Result" to "Distance". - The "Distance" output contains distance to the closest position on the Target geometry. - The new "Location" output contains the coordinates of the closest position on the Target geometry. A basic use case for this data is a simple shrinkwrap operation. Differential Revision: https://developer.blender.org/D10415
2021-02-25Fix T85963: Combine and separate XYZ nodes don't work on instancesHans Goudey
They were missing the `geometry_set_realize_instances` function used to make any input instances real for writing.
2021-02-24Cleanup: quiet asan overflow warningJacques Lucke
2021-02-23Cleanup: Use shorter enum namesHans Goudey
With the full node name at the beginning, these names can get quite long. Slightly different words shorten them just a bit.
2021-02-19UI: Use property split in geometry node propertiesHans Goudey
This makes the nodes look more consistent with the rest of the UI by using the same split with right aligned labels as the property editor and elsewhere. Additionally, for consistency, the "Type" part of some dropdowns is removed. It already wasn't displayed everywhere, and it gets redundant quite quickly.
2021-02-19Cleanup: Fix clang tidy warningHans Goudey
0 cannot be used to initialize the whole settings struct.
2021-02-19Geometry Nodes: Add simple subdivision surface nodeEitan
Add the Simple subdivision option to Geometry nodes, as a new node instead of part of the existing subdivision node because of future backend changes to the Simple option. (See T85584) https://developer.blender.org/D10409
2021-02-19Cleanup: Use braces after if statementHans Goudey
2021-02-19Fix T85763: Align Rotation to Vector node fails for collinear vectorsWannes Malfait
If the axes are aligned in auto pivot mode then the rotation axis would be (0,0,0). We now fall back to the x axis in this case. If that fails, we fall back to the y axis. Differential Revision: https://developer.blender.org/D10466
2021-02-19Geometry Nodes: use corner domain for densities in Point Distribute nodeJacques Lucke
Previously, the density was set per point. That implies that when a point has a non-zero weight, points might be distributed in all connected polygons. By specifying the density per corner, this limitation is removed. Note, per-point density maps (such as vertex groups) can still be used. They will be adapted to the corner domain without loss of information. Differential Revision: https://developer.blender.org/D10461
2021-02-19UI: Expand enum in collection info nodeHans Goudey
2021-02-17Fix: Attribute randomize node broken for integer attributesHans Goudey
The integer mode still needs a random value in a 0 to 1 range, just like floats. So slightly refactor to let the integer randomization use the float implementation and then round to an int afterwards.
2021-02-17Geometry Nodes: Expose material index attributeHans Goudey
The `material_index` attribute can adjust which material in the list will be applied to each face of the mesh. There are two new things about this attribute that haven't been exposed by the attribute API yet. Each comes with limitations: 1. Integer data type: Most attribute nodes are currently written to use float data types. This means that they can't write to this attribute because they can't change the type of a built-in attribute. 2. Polygon domain: This is our first attribute using the polygon domain, meaning until some of the interpolations are implemented, some operations may not work as expected. Currently the two nodes that work with this attribute are Attribute Fill and Attribute Randomize. Differential Revision: https://developer.blender.org/D10444
2021-02-17Geometry Nodes: Support integer type in the Attribute Fill NodeHans Goudey
This will be used by the material index attribute when it is added.
2021-02-17Geometry Nodes: Node error messagesHans Goudey
This patch adds icons to the right side of nodes when they encounter a a problem. When hovered, a tooltip displays describing the encountered while evaluating the node. Some examples are: attribute doesn't exist, mesh has no faces, incorrect attribute type, etc. Exposing more messages to the system will be an ongoing process. Multiple warnings per node are supported. The system is implemented somewhat generically so that the basic structure can also be used to store more information from evaluation for the interface, like a list of available attributes. Currently the messages are just button tooltips. They could be styled differently in the future. Another limitation is that every instance of a node group in a parent node tree will have the same error messages, the "evaluation context" used to decide when to display the tooltips must be extended to support node tree paths. Differential Revision: https://developer.blender.org/D10290
2021-02-16Fix T85697: subdivision surface node output does not contain vertex group namesJacques Lucke
The vertex weights were actually interpolated correctly. The issue was that vertex group names were removed from the output geometry set. We have to keep track of these names separately from the mesh, for legacy reasons. Vertex group names are not stored on meshes but objects instead.
2021-02-16Geometry Nodes: move realize-instances code to blenkernelJacques Lucke
I need to access this functionality from modifier code. Therefore it should not be in the nodes module.
2021-02-16Geometry Nodes: move geometry set instance handling to separate fileJacques Lucke
In an upcoming commit I'll also move the make-instances-real functionality to this file. This code is not essential to working with geometry sets in general, so it makes sense to move it to a separate header.
2021-02-16Geometry Nodes: move some attribute utilities to blenkernelJacques Lucke
I need to access these utilities from modifier code as well. Therefore, they should not live in the nodes module.
2021-02-16Cleanup: spellingCampbell Barton