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-09-11Geometry Nodes: Support "Evaluated" mode in Resample Curve nodeHans Goudey
Just like the curve to points node, this mode outputs point locations based on the input curve's evaluated points (the points you see in the viewport). This is expected to be faster, since it doesn't have to sample equal positions on the result, and it's also consistent with the existing choices in the curve to points node.
2021-09-09Geometry Nodes: fields and anonymous attributesJacques Lucke
This implements the initial core framework for fields and anonymous attributes (also see T91274). The new functionality is hidden behind the "Geometry Nodes Fields" feature flag. When enabled in the user preferences, the following new nodes become available: `Position`, `Index`, `Normal`, `Set Position` and `Attribute Capture`. Socket inspection has not been updated to work with fields yet. Besides these changes at the user level, this patch contains the ground work for: * building and evaluating fields at run-time (`FN_fields.hh`) and * creating and accessing anonymous attributes on geometry (`BKE_anonymous_attribute.h`). For evaluating fields we use a new so called multi-function procedure (`FN_multi_function_procedure.hh`). It allows composing multi-functions in arbitrary ways and supports efficient evaluation as is required by fields. See `FN_multi_function_procedure.hh` for more details on how this evaluation mechanism can be used. A new `AttributeIDRef` has been added which allows handling named and anonymous attributes in the same way in many places. Hans and I worked on this patch together. Differential Revision: https://developer.blender.org/D12414
2021-09-06Geometry Nodes: support for geometry instancingJacques Lucke
Previously, the Point Instance node in geometry nodes could only instance existing objects or collections. The reason was that large parts of Blender worked under the assumption that objects are the main unit of instancing. Now we also want to instance geometry within an object, so a slightly larger refactor was necessary. This should not affect files that do not use the new kind of instances. The main change is a redefinition of what "instanced data" is. Now, an instances is a cow-object + object-data (the geometry). This can be nicely seen in `struct DupliObject`. This allows the same object to generate multiple geometries of different types which can be instanced individually. A nice side effect of this refactor is that having multiple geometry components is not a special case in the depsgraph object iterator anymore, because those components are integrated with the `DupliObject` system. Unfortunately, different systems that work with instances in Blender (e.g. render engines and exporters) often work under the assumption that objects are the main unit of instancing. So those have to be updated as well to be able to handle the new instances. This patch updates Cycles, EEVEE and other viewport engines. Exporters have not been updated yet. Some minimal (not master-ready) changes to update the obj and alembic exporters can be found in P2336 and P2335. Different file formats may want to handle these new instances in different ways. For users, the only thing that changed is that the Point Instance node now has a geometry mode. This also fixes T88454. Differential Revision: https://developer.blender.org/D11841
2021-08-30Geometry Nodes: Curve Fill NodeErik Abrahamsson
This node takes a curve geometry input and creates a filled mesh at Z=0 using a constrained Delaunay triangulation algorithm. Because of the choice of algorithm, the results should be higher quality than the filling for 2D curve objects. This commit adds an initial fairly simple version of the node, but more features may be added in the future, like transferring attributes when necessary, or an index attribute input to break up the calculations into smaller chunks to improve performance. Differential Revision: https://developer.blender.org/D11846
2021-08-25Cleanup: Use shorter enum item namesHans Goudey
2021-08-18LibOverride: Add several missing 'OVERRIDABLE' flags to NodeTrees RNA.Bastien Montagne
This should be a no-change commit for now, but is required to enable initial basic support of nodetrees in library override. NOTE: Proper full support of liboverrides in nodes is yet to be designed (has UX unresolved issues, since we likely do not want to expose/make overridable ALL settings of ALL nodes).
2021-08-16Geometry Nodes: Add UV Smooth, Boundary Smooth options to subdivision nodeEitan
Replaces the boolean option with enum menus for consistency with the subdivision modifier (rB66151b5de3ff,rB3d3b6d94e6e). Adds all UV interpolation options. Original patch by Eitan. Updated by Himanshi Kalra <calra>. {F9883204} Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D10417
2021-08-12Cleanup: use C++ style comments for disabled codeCampbell Barton
2021-08-06Geometry Nodes: Select by Handle Type NodeHans Goudey
Just like the "Select by Material" node, this node outputs a boolean attribute for control points that have a matching handle type. By default left and right handles are considered, but it's possible to only check one side with the toggle in the node. Differential Revision: https://developer.blender.org/D12135
2021-08-04Geometry Nodes: Curve Set Spline TypeJohnny Matthews
This node sets the selected (or all) splines in curve to a chosen target spline type. Poly, Bezier, and NURB splines can be converted to any of the other types. This is meant to be a building block node, useful in many procedural situations. In the future the node could be optimized with multi-threading, or by avoiding copying in many cases, either by retrieving the curve for write access or by passing the raw vectors to the new splines where possible. With edits from Hans Goudey (@HooglyBoogly) Differential Revision: https://developer.blender.org/D12013
2021-07-22Geometry Nodes: Set Bezier Handle Type NodeJohnny Matthews
This node takes a curve and a point selection and allows you to set the specified (or all) points left/right or both handles to a given type. Differential Revision: https://developer.blender.org/D11992
2021-07-21Cleanup: replace NB with NOTE in commentsCampbell Barton
2021-07-18Geometry Nodes: Curve Trim NodeAngus Stanton
This node implements shortening each spline in the curve based on either a length from the start of each spline, or a factor of the total length of each spline, similar to the "Start & End Mapping" panel of curve properties. For Bezier curves, the first and last control points are adjusted to maintain the shape of the curve, but NURB splines are currently implicitly converted to poly splines. The node is implemented to avoid copying where possible, so it outputs a changed version of the input curve rather than a new one. Differential Revision: https://developer.blender.org/D11901
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-14Python API: Add functions to ensure and clear IDPropertiesHans Goudey
This adds id_properties_clear() and id_properties_ensure() functions to RNA structs. This is meant as an initial change based on discussion in review of D9697. However, they may be useful in other situations. The change requires refactoring the internal idproperties callback to return a pointer to the IDProperty pointer, which actually turns out to be quite a nice cleanup. An id_properties attribute could be added in the future potentially. Differential Revision: https://developer.blender.org/D11908
2021-07-12Geometry Nodes: Curve Primitive QuadrilateralJohnny Matthews
This commit adds a curve primitive node for creating squares, rectangles, trapezoids, kites, and parallelograms. It also includes a mode where the four points are just vector inputs. Differential Revision: https://developer.blender.org/D11665
2021-07-09Nodes: Moved group interface panel code to python.Lukas Tönne
The node group interface panels were still implemented in C. Now they ported over to python for easier maintenance. Differential Revision: https://developer.blender.org/D11834
2021-07-06Nodes: Adds button to groups to change type of sockets.Lukas Tönne
The menu lists all socket types that are valid for the node tree. Changing a socket type updates all instances of the group and keeps existing links to the socket. If changing the socket type leads to incorrect node connections the links are flagged as invalid (red) and ignored but not removed. This is so users don't lose information and can then fix resulting issues. For example: Changing a Color socket to a Shader socket can cause an invalid Shader-to-Color connection. Implementation details: The new `NODE_OT_tree_socket_change_type` operator uses the generic `rna_node_socket_type_itemf` function to list all eligible socket types. It uses the tree type's `valid_socket_type` callback to test for valid types. In addition it also checks the subtype, because multiple RNA types are registered for the same base type. The `valid_socket_type` callback has been modified slightly to accept full socket types instead of just the base type enum, so that custom (python) socket types can be used by this operator. The `nodeModifySocketType` function is now called when group nodes encounter a socket type mismatch, instead of replacing the socket entirely. This ensures that links are kept to/from group nodes as well as group input/output nodes. The `nodeModifySocketType` function now also takes a full `bNodeSocketType` instead of just the base and subtype enum (a shortcut `nodeModifySocketTypeStatic` exists for when only static types are used). Differential Revision: https://developer.blender.org/D10912
2021-07-05Geometry Nodes: Curve Primitive LineJohnny Matthews
This node creates a poly spline line in one of 2 modes: - Line between two points - Start Point, Direction, and Length Both modes create splines with only start and endpoints. A resample node can be used afterward to increase the point count. Differential Revision: https://developer.blender.org/D11769
2021-07-05Geometry Nodes: Add explicit Float to Int conversion nodeNikhil Shringarpurey
This patch adds a very simple node that explicitly converts a float to an int. While this may seem redundant, it would offer 2 benefits to the current requirement to use implicit float conversions: 1. It makes the node tree's intent more clear and self-documenting (especially if changes in the future require integer inputs). 2. It eliminates undefined behavior in current/future nodes from float inputs by guaranteeing that the input is an integer. The node offers a variety of rounding techniques to make it more flexible. Differential Revision: https://developer.blender.org/D11700
2021-07-05Geometry Nodes: new Viewer nodeJacques Lucke
This adds a viewer node similar to the one in the compositor. The icon in the headers of nodes is removed because it served the same purpose and is not necessary anymore. Node outputs can be connected to the active viewer using ctrl+shift+LMB, just like in the compositor. Right now this collides with the shortcut used in the node wrangler addon, which will be changed separately. As of now, the viewed geometry is only visible in the spreadsheet. Viewport visualization will be added separately. There are a couple of benefits of using a viewer node compared to the old approach with the icon in the node header: * Better support for nodes that have more than one geometry output. * It's more consistent with the compositor. * If attributes become decoupled from geometry in the future, the viewer can have a separate input for the attribute to visualize. * The viewer node could potentially have visualization settings. * Allows to keep "visualization points" around by having multiple viewer nodes. * Less visual clutter in node headers. Differential Revision: https://developer.blender.org/D11470
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-07-01Geometry Nodes: Curve Primitive CircleJohnny Matthews
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
2021-06-30Geometry Nodes: Curve Primitive Bezier SegmentJohnny Matthews
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
2021-06-28Cleanup: typos in RNA enumsCampbell Barton
2021-06-17Raycast geometry node.Lukas Tönne
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
2021-06-17Geometry Nodes: Add Curve Subdivision NodeHans Goudey
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
2021-06-16Cleanup: unused warningCampbell Barton
2021-06-16Geometry Nodes: Allow int attribute input fields with single valueHans Goudey
Just like the way we often have a choice between an attribute input and a single float, this adds the ability to choose between attribute and integer input sockets, useful for D11421.
2021-06-14Geometry Nodes: Curve to Points Node for Evaluated DataHans Goudey
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
2021-06-14Cleanup: clang-formatCampbell Barton
2021-06-14Fix T88807: crash when there are multiple links between the same socketsJacques Lucke
This commit does two things: * Disallows creating more than one link from one socket to a multi socket input. * Properly count links if there happen to be more than one link between the same sockets. The new link counting should also be more efficient asymptotically. Differential Revision: https://developer.blender.org/D11570
2021-06-10Geometry Nodes: Add Texture and Material options to switch nodeEitan
These new socket types can be supported in the switch node along with the others. Differential Revision: https://developer.blender.org/D11560
2021-06-10Add unit for time stored in secondsSergey Sharybin
Allows to define properties which will have proper units displayed in the interface. The internal storage is expected to be seconds (which matches how other times are stored in Blender). Is not immediately used in Blender, but is required for the upcoming feature in Cycles X (D11526) The naming does not sound very exciting, but can't think of anything better either. For test it probably easiest to define FloatProperty with subdtype of TIME_ABSOLUTE. Differential Revision: https://developer.blender.org/D11532
2021-06-04Nodes: Add Multiply Add to Vector Math nodesCharlie Jolly
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
2021-06-01Compositor: Full-frame base systemManuel Castilla
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
2021-05-31Fix T88666: Cryptomatte: EXR sequence does not update when scrubbing the ↵Jeroen Bakker
timeline. Cause is that initializing the cryptomatte session would reset the current frame of an image sequence. The solution is to always use the scene current frame so it resets to the correct frame. This was a todo that wasn't solved after it landed in master. Needs to be backported to 2.93.
2021-05-28Merge branch 'blender-v2.93-release'Hans Goudey
2021-05-28Fix T88601: Attribute Compare boolean doesn't expose socketHans Goudey
While we could make this node work for boolean inputs in the future, currently it's really just designed to compare "float-like" inputs. Many comparison modes don't even make sense for boolean inputs. Therefore, the simplest fix for this bug is just to disable the boolean attribute input modes for this node. Differential Revision: https://developer.blender.org/D11427
2021-05-21Merge branch 'blender-v2.93-release'Hans Goudey
2021-05-21Fix T87357: Missing update after removing socketJacques Lucke
The CoW copy of the node group was not updated correctly after it changed. Arguably, tagging the node tree could also be part of `ntreeUpdateTree` (which needs to be called after changes to the node tree anyway). However, there are many instances where the depsgraph is tagged explicitly after `ntreeUpdateTree` is called, so it should be fine here as well. This is similar to what is done in `snode_dag_update`. Differential Revision: https://developer.blender.org/D11342
2021-05-21Cleanup: quiet -Warray-parameter warnings from GCC11Campbell Barton
Some warnings remain that require larger changes.
2021-05-20Geometry Nodes: new Material input nodeJacques Lucke
This node is similar to the Value and Vector node. It just provides a way to use the same material in multiple nodes without exposing it outside of a node group. Differential Revision: https://developer.blender.org/D11305
2021-05-19Geometry Nodes: don't show grease pencil materials for nowJacques Lucke
Those materials cannot be on geometry handled by geometry nodes yet. So it makes sense not to show those materials in the material socket.
2021-05-14Geometry Nodes: use texture socket in Attribute Sample Texture nodeJacques Lucke
There is a new Texture data-block socket that we can use in Geometry Nodes now. This commit replaces the texture property of a node and gives it a texture input socket instead. That increases flexibility. The texture socket still has some limitations that will be lifted in the next couple of days (e.g. it's not supported by the switch node and cannot be exposed the a modifier yet). Differential Revision: https://developer.blender.org/D11222
2021-05-12Nodes: add boilerplate for texture and material socketsJacques Lucke
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.
2021-05-11Geometry Nodes: Add Attribute Vector Rotate nodeCharlie Jolly
Port vector rotate node to geo attributes. Request by @simonthommes Reviewed By: simonthommes, HooglyBoogly
2021-05-07Geometry Noes: Curve Resample NodeHans Goudey
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
2021-05-07Geometry Nodes: Add Attribute Curve Map NodeCharlie Jolly
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
2021-04-30Geometry Nodes: Add an "Auto" option for Attribute Convert data typeCharlie Jolly
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