Age | Commit message (Collapse) | Author |
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
This node has two modes: the first mode computes a circle from three
locations and a resolution. The second takes radius and resolution.
The first mode also outputs the center of the computed circle as
a vector.
Differential Revision: https://developer.blender.org/D11650
|
|
Creates a Curve with 1 Bezier Spline from four positions (start,
start handle, end handle, end) and a resolution. The handles are
aligned and mirrored automatically. An "Offset" mode is also included
to allow specifying the handles relative to the control points.
The default settings recreate the existing default Bezier Curve in the
3D viewport add menu.
Differential Revision: https://developer.blender.org/D11648
|
|
The //Raycast// node intersects rays from one geometry onto another.
It computes hit points on the target mesh and returns normals, distances
and any surface attribute specified by the user.
A ray starts on each point of the input //Geometry//. Rays continue
in the //Ray Direction// until they either hit the //Target Geometry//
or reach the //Ray Length// limit. If the target is hit, the value of the
//Is Hit// attribute in the output mesh will be true. //Hit Position//,
//Hit Normal//, //Hit Distance// and //Hit Index// are the properties of the
target mesh at the intersection point. In addition, a //Target Attribute//
can be specified that is interpolated at the hit point and the result
stored in //Hit Attribute//.
Docs: D11620
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D11619
|
|
This node creates splines with more control points in between the
existing control points. The point is to give the splines more
definition for further tweaking like randomization with white noise,
instead of deforming a resampled poly spline with a noise texture.
For poly splines and NURBS, the node simply interpolates new values
between the existing control points. However, for Bezier splines,
the result follows the existing evaluated shape of the curve, changing
the handle positions and handle types to make that possible.
The number of "cuts" can be controlled by an integer input, or an
attribute can be used. Both spline and point domain attributes are
supported, so the number of cuts can vary using the value from the
point at the start of each segment.
Dynamic curve attributes are interpolated to the result with linear
interpolation.
Differential Revision: https://developer.blender.org/D11421
|
|
This node implements the second option of T87429, creating points
along the input splines with the necessary evaluated information
for instancing: `tangent`, `normal`, and `rotation` attributes.
All generic curve point and spline attributes are copied to the
result points as well.
The "Count" and "Length" methods are just like the current options
in the resample node, but the output is points instead of a curve.
The "Evaluated" method uses the points you see on the curve directly,
and therefore should be the fastest.
The rotation data is retrieved from a transform matrix built with the
same method that the curve to mesh node uses. The radius attribute is
divided by 10 so the points don't look absurdly huge in the viewport.
In the future that could be an option.
For the implementation, one thing that could use an improvement
is the amount of temporary allocations while resampling to evaluated
points before the final points. I expect that reusing a buffer for
each thread would give a nice improvement.
Differential Revision: https://developer.blender.org/D11539
|
|
|
|
This commit adds a flag to disable displaying some socket labels which
just redundant eye sores. We still want to have a label, because that
information can potentially be accessed elsewhere in the UI.
The flag is used in a few geometry nodes.
Differential Revision: https://developer.blender.org/D11540
|
|
Cycles, Eevee, OSL, Geo, Attribute
This operator provides consistency with the standard math node. Allows users to use a single node instead of two nodes for this common operation.
Reviewed By: HooglyBoogly, brecht
Differential Revision: https://developer.blender.org/D10808
|
|
This patch adds the base code needed to make the full-frame system work for both current tiled/per-pixel implementation of operations and full-frame.
Two execution models:
- Tiled: Current implementation. Renders execution groups in tiles from outputs to input. Not all operations are buffered. Runs the tiled/per-pixel implementation.
- FullFrame: All operations are buffered. Fully renders operations from inputs to outputs. Runs full-frame implementation of operations if available otherwise the current tiled/per-pixel. Creates output buffers on first read and free them as soon as all its readers have finished, reducing peak memory usage of complex/long trees. Operations are multi-threaded but do not run in parallel as Tiled (will be done in another patch).
This should allow us to convert operations to full-frame in small steps with the system already working and solve the problem of high memory usage.
FullFrame breaking changes respect Tiled system, mainly:
- Translate, Rotate, Scale, and Transform take effect immediately instead of next buffered operation.
- Any sampling is always done over inputs instead of last buffered operation.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D11113
|
|
|
|
The sockets are not exposed in any nodes yet.
They work similar to the Object/Collection sockets, which also
just reference a data block.
This is part of D11222.
|
|
Port vector rotate node to geo attributes.
Request by @simonthommes
Reviewed By: simonthommes, HooglyBoogly
|
|
This node generates a naturally parametarized (even length edge) poly
spline version of every spline in the input. There are two modes,
"Count", and "Length". These are similar to the same options for the
line primitive node in end points mode.
I implemented this instead of a "Sample Points" node, because for this
operation it's trivial to keep the result as a curve, which is nice
since it increases flexibility, and because it can make instancing
simpler, i.e. using the transforms of each evaluated point rather than
requiring the construction of a "rotation" attribute.
Differential Revision: https://developer.blender.org/D11173
|
|
This node has the same functionality as the color and vector curve
mapping nodes in the shader editor. Here is works on every value for
the selected attribute, and it can also output a float value. Other
than that, the implementation is quite straightforward-- almost
completely boilerplate code.
Differential Revision: https://developer.blender.org/D10921
|
|
Currently there is an "Auto" option for the domain, this commit adds a
similar option for "Auto" data type, that uses the data type from the
target attribute or the source attribute (in that order).
Ref T87347
Differential Revision: https://developer.blender.org/D10932
|
|
This is a first version of an Attribute Transfer node. It only supports two
modes for mapping attributes from one geometry to another for now.
More options are planned for the future.
Ref T87421.
Differential Revision: https://developer.blender.org/D11037
|
|
This is a first iteration of a switch node. It can only switch between
two inputs values based on a boolean. A more sophisticated switch
node that has an integer selector will probably come later.
Currently, the geometry nodes evaluator does not support lazy evaluation
of individual inputs. Therefore, all inputs will be computed currently.
An improvement to the evaluator will be worked on separately.
Ref: T85374
Differential Revision: https://developer.blender.org/D10460
|
|
With this patch, users can define custom tooltips for the exposed
properties of their Geometry Nodes Groups.
Currently this custom tooltips are only used in the modifier panel,
but its a long term goal to use it in the node editor.
Reviewer: Hans Goudey
Differential Revision: https://developer.blender.org/D10884
|
|
Previously, the spreadsheet editor could only show data of the original
and of the final evaluated object. Now it is possible to show the data
at some intermediate stages too.
For that the mode has to be set to "Node" in the spreadsheet editor.
Furthermore, the preview of a specific node has to be activated by
clicking the new icon in the header of geometry nodes.
The exact ui of this feature might be refined in upcoming commits.
It is already very useful for debugging node groups in it's current
state though.
Differential Revision: https://developer.blender.org/D10875
|
|
This is an implementation of Enhanced Subpixel Morphological Antialiasing (SMAA)
The algorithm was proposed by:
Jorge Jimenez, Jose I. Echevarria, Tiago Sousa, Diego Gutierrez
This node provides only SMAA 1x mode, so the operation will be done with no spatial
multisampling nor temporal supersampling. See Patch for comparisons.
The existing AA operation seems to be used only for binary images by some other nodes.
Using SMAA for binary images needs no important parameter such as "threshold", so we
perhaps can switch the operation to SMAA, though that changes existing behavior.
Notes:
1. The program code assumes the screen coordinates are DirectX style that the
vertical direction is upside-down, so "top" and "bottom" actually represent bottom
and top, respectively.
Thanks for Habib Gahbiche (zazizizou) to polish and finalize this patch.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D2411
|
|
This adds a Clamp node for Geometry Nodes Attributes.
Supports both Min-Max and Range clamp modes.
Float, Vector, Color and Int data types supported.
Reviewed By: HooglyBoogly, simonthommes
Differential Revision: https://developer.blender.org/D10526
|
|
This commit adds a node with a "Map Range" operation for attributes
just like the non-attribute version of the node. However, unlike the
regular version of the node, it also supports operations on vectors.
Differential Revision: https://developer.blender.org/D10344
|
|
Cycles, Eevee, OSL, Geo, Attribute
Based on outdated refract patch D6619 by @cubic_sloth
`refract` and `faceforward` are standard functions in GLSL, OSL and Godot shader languages.
Adding these functions provides Blender shader artists access to these standard functions.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D10622
|
|
|
|
|
|
This patch adds the ability to mute individual wires in the node editor.
This is invoked like the cut links operator but with a new shortcut.
Mute = Ctrl + Alt
Cut = Ctrl
Dragging over wires will toggle the mute state for that wire.
The muted wires are drawn in red with a bar across the center.
Red is used in the nodes context to indicate invalid links, muted links and internal links.
When a wire is muted it exposes the original node buttons which are normally hidden when a wire is connected.
Downstream and upstream links connected using reroute nodes are also muted.
Outside scope of patch:
- Add support for pynodes e.g. Animation Nodes
- Requires minor change to check for muted links using the `is_muted` link property or the `is_linked` socket property.
Maniphest Tasks: T52659
Differential Revision: https://developer.blender.org/D2807
|
|
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
|
|
In the current implementation, cryptomatte passes are connected to the node
and elements are picked by using the eyedropper tool on a special pick channel.
This design has two disadvantages - both connecting all passes individually
and always having to switch to the picker channel are tedious.
With the new design, the user selects the RenderLayer or Image from which the
Cryptomatte layers are directly loaded (the type of pass is determined by an
enum). This allows the node to automatically detect all relevant passes.
Then, when using the eyedropper tool, the operator looks up the selected
coordinates from the picked Image, Node backdrop or Clip and reads the picked
object directly from the Renderlayer/Image, therefore allowing to pick in any
context (e.g. by clicking on the Combined pass in the Image Viewer). The
sampled color is looked up in the metadata and the actual name is stored
in the cryptomatte node. This also allows to remove a hash by just removing
the name from the matte id.
Technically there is some loss of flexibility because the Cryptomatte pass
inputs can no longer be connected to other nodes, but since any compositing
done on them is likely to break the Cryptomatte system anyways, this isn't
really a concern in practise.
In the future, this would also allow to automatically translate values to names
by looking up the value in the associated metadata of the input, or to get a
better visualization of overlapping areas in the Pick output since we could
blend colors now that the output doesn't have to contain the exact value.
Idea + Original patch: Lucas Stockner
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D3959
|
|
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
|
|
This Patch removes the auto sorting from Multi-Input Sockets and allows
the links to be sorted by drag and drop instead.
As a minor related change, it fixes the drawing of the mute line to
connect to the first input instead of the socket's center.
|
|
But this time the root cause. Writing undo files is done in a separate
thread. This patch moved the updating of the matte_id when the user
actually changes the matte.
|
|
With the full node name at the beginning, these names can get quite long.
Slightly different words shorten them just a bit.
|
|
This commit adds a simple string input node, intended for use in the
attribute workflow to make using the same attribute name in multiple
places easier. The node is function node similar to the existing vector
input node.
Ref T84971
Differential Revision: https://developer.blender.org/D10316
|
|
|
|
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
|
|
|
|
This commit adds a drop-down to the attribute randomize node to support
a few operations on the values of existing attributes: "Replace/Create"
(the existing behavior), "Add", "Subtract", and "Multiply".
At this point, the operations are limited by what is simple to implement.
More could be added in the future, but there isn't a strong use case
for more complex operations anyway, and a second math node can be used.
Differential Revision: https://developer.blender.org/D10269
|
|
This commit makes links connected to multi-input sockets spread verticaly
along the socket. Sockets grow if more links are connected and the node
layout updates accordingly. Links are sorted by their incoming angle
to avoid crossing links. Also, link picking is updated to work with
spread links and bezier links.
Currently the multi-input sockets are used in the join geometry node.
The mutli-input sockets look like a vertical rounded rectangle.
Currently they do not support the other custom socket shapes.
Reviewed By Hans Goudey, with cleanup and additional edits
Differential Revision: https://developer.blender.org/D10181
|
|
After {rBa0867f05a48e2017a}, it is no longer necessary to pad
structs with 1 and 2 byte sizes. Most of these are geometry node
structs, where we've been avoiding using `node.custom1`.
I only found two others, the freestyle flags in custom data DNA.
Differential Revision: https://developer.blender.org/D10335
|
|
These are similar to the regular "Combine XYZ" and "Separate XYZ" nodes,
but they work on attributes. They will make it easier to switch between
vector attributes and float attributes.
Differential Revision: https://developer.blender.org/D10308
|
|
This node takes a volume and generates a mesh on it's "surface".
The surface is defined by a threshold value.
Currently, the node only works on volumes generated by the
Points to Volume node. This limitation will be resolved soonish.
Ref T84605.
Differential Revision: https://developer.blender.org/D10243
|
|
When the pivot axis is not set to auto, the node will try to align the rotation
to vector as best as possible, given the selected rotation axis.
Ref T85211.
Differential Revision: https://developer.blender.org/D10292
|
|
This node calculates a distance from each point to the closest position
on a target geometry, similar to the vertex weight proximity modifier.
Mapping the output distance to a different range can be done with an
attribute math node after this node.
A drop-down changes whether to calculate distances from points,
edges, or faces. In points mode, the node also calculates distances
from point cloud points.
Design task and use cases: T84842
Differential Revision: https://developer.blender.org/D10154
|
|
Normally sockets only have one input link. This commit adds the back-end
changes needed to use multiple input links per socket.
Multi-input sockets can be defined with a new flag in `bNodeSocketType`.
The changes necessary to make the sockets work in the geometry nodes
evaluator are generalizing input socket values as a vector of values,
and supporting this in the derived node tree structure.
This patch should contain no functional changes. Two upcoming patches
will use this system for the "Join Geometry" node and expose link picking
and updated display in the UI: D10069 and D10181.
Reviewed By: Jacques Lucke, Hans Goudey
Differential Revision: https://developer.blender.org/D10067
|
|
Implements a node to get collection objects.
These objects are then passed along as instances in the node tree.
Follow up tasks:
Multiple nodes does not support instancing yet: T85159
Changing collection offset does not trigger a refresh: T85274
Reviewed By: Jacques, Dalai, Hans
Differential Revision: http://developer.blender.org/D10151
|
|
This adds the ability to use all the math operations in the regular
utility "Math" node. The code is quite similar to the attribute vector
math node, with the simplification that the result is always a float.
Differential Revision: https://developer.blender.org/D10199
|
|
This implements a new geometry node based on T84606.
It is the first node that generates a `VolumeComponent`.
Differential Revision: https://developer.blender.org/D10169
|
|
We will need to expand this node soon to add weight/count for different
elements inside the collection. For that it is better to have the node
to use its own DNA.
|
|
By design the modified object transformations should still work and
affect the geometry nodes results. The current behaviour, however, would
make the geometry from the object info to not be affected by the
modified object transformations. This patch changes that by default.
In a similar fashion the Location, Rotation and Scale sockets outputs
should be aware of whether the output should be in the global space or in the
space of the nodetree.
To solve this, the patch introduces a new transformation space "enum"
where users can pick "Original" or "Relative" space.
Original
--------
Output the geometry relative to the input object transform, and the
location, rotation and scale relative to the world origin.
Relative
--------
Bring the input object geometry, location, rotation and scale into the
modified object maintaining the relative position between the two objects in
the scene.
Relative space violates a bit the design of the nodetree. The geometry in this
case is transformed so that moving the modified object doesn't interfere with
the geometry. This is particularly useful for the boolean node for instance.
"Original" is the default space, but old files are set to "Relative" for
backwards compatibility.
Differential Revision: https://developer.blender.org/D10124
|