Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
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.
|
|
- Use 2m height instead of 1m
- Default to N-Gon fill for the top and bottom
|
|
Differential Revision: https://developer.blender.org/D10744
|
|
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
|
|
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
|
|
This patch adds multi-input support to the Attribute Remove node.
Reviewed By: Hans Goudey
Differential Revision: https://developer.blender.org/D10698
|
|
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
|
|
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
|
|
Nodes: Add Attribute Remove Node D10697
|
|
Differential Revision: https://developer.blender.org/D10683
|
|
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
|
|
|
|
This allows us to use it in rna for the spreadsheet editor.
|
|
|
|
This failed when the component did exist, but did not contain any data.
|
|
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
|
|
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
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
|
|
They were missing the `geometry_set_realize_instances` function used to
make any input instances real for writing.
|
|
|
|
With the full node name at the beginning, these names can get quite long.
Slightly different words shorten them just a bit.
|
|
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.
|
|
0 cannot be used to initialize the whole settings struct.
|
|
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
|
|
|
|
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
|
|
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
|
|
|
|
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.
|
|
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
|
|
This will be used by the material index attribute when it is added.
|
|
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
|
|
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.
|
|
I need to access this functionality from modifier code. Therefore it should
not be in the nodes module.
|
|
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.
|
|
I need to access these utilities from modifier code as well.
Therefore, they should not live in the nodes module.
|
|
|