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-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Fix T89390: crash when join geometry node has only muted inputsJacques Lucke
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-22Fix T89327: Cube and ico sphere nodes do not create UVsHans Goudey
It turns out you have to add the UV custom data layer manually before calling the BMesh primitive operators, even if you pass `calc_uvs=true`.
2021-06-22Cleanup: Refactor spline copying functionsHans Goudey
Make the virtual functions protected and simpler, so that the logic is better contained in the base class's implementation. Also introduce a `copy_without_attributes` method to be used for realizing instances.
2021-06-22Cleanup: Rename variables, use shorter namesHans Goudey
`src` and `dst` are perfectly clear, and avoid repeating unecessary characters when writing the variables many times, allowing more space for everything else.
2021-06-22Geometry Nodes: Use multithreading for the curve to mesh nodeHans Goudey
This commit optimizes the node for the case where it works on many splines by allowing it to generate mesh data from their combinations in parallel. By itself, this made the node around twice as fast in my test file with a result of 20 million vertices, around 600ms instead of 1.2s before. That isn't actually a very good result; it reveals another bottleneck, a single threaded loop over all face corners in the mesh normal calculation code. As a simple change that might improve performance in some situations, this commit moves normal calculation out of this node, so at least the work isn't wasted if the mesh is changed later on in the node tree anyway.
2021-06-21Fix T89329: icosphere subdivisions can be set to 0Daniel Salazar
Differential Revision: https://developer.blender.org/D11658
2021-06-21Cleanup: Rename spline interpolation functionsHans Goudey
The names were slightly longer than they needed to be clear, and when they are shorter they tend to fit on one line better.
2021-06-21Geometry Nodes: Multithread curve resample nodeHans Goudey
Optimize the node for the case of many splines. In a test file with 14000 splines, the node is 3x faster (72ms to 24ms) on an 8 core CPU.
2021-06-18Cleanup: clang-tidyCampbell 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-17Cleanup: split BKE_mesh_copy_settings into two functionsCampbell Barton
- BKE_mesh_copy_parameters_for_eval to be used for evaluated meshes only as it doesn't handle ID user-counts. - BKE_mesh_copy_parameters is a general function for copying parameters between meshes.
2021-06-16BLI: add threading namespaceJacques Lucke
This namespace groups threading related functions/classes. This avoids adding more threading related stuff to the blender namespace. Also it makes naming a bit easier, e.g. the c++ version of BLI_task_isolate could become blender::threading::isolate_task or something similar. Differential Revision: https://developer.blender.org/D11624
2021-06-16Geometry Nodes: Separate Components NodeJohnny Matthews
Implementation of T86970. This node takes a geometry input with multiple components and outputs them by component type. Meshes, Curves, and Point Clouds support combining multiple input instances, while volumes will only output the first volume component input until suitable instance realization for multiple volumes is finished. When direct geometry instancing is implemented it will be possible to avoid realizing instances in this node. Differential Revision: https://developer.blender.org/D11577
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: Join dynamic curve attributes in the join geometry nodeHans Goudey
This commit lets the join geometry node transfer dynamic attributes to the result, the same way that point cloud and mesh attributes are joined. The implementation is different though, because of an optimization implemented for curves to avoid copying splines. The result attribute is added with the highest priority domain (points over splines), and the highest complexity data type. If one curve had the attribute on the spline domain but not others, the point domain values will be used. Generally this is a bit lower level than I would have liked this code to be, but should be efficient, and it's really not too complicated. Differential Revision: https://developer.blender.org/D11491
2021-06-14Geometry Nodes: Parallelize curve reverse nodeHans Goudey
Each spline can be handled separately here. This gives approximately a 2x speedup on my 8 core processor on an input of 80000 2 point splines.
2021-06-14Cleanup: Refactor join geometry node attribute gatheringHans Goudey
Instead of building a set and then determining the final domain and type for every attribute separately in the loop, construct a map with the necessary data in the first place. This is simpler and should be slightly more efficient. Split from D11491
2021-06-14Geometry Nodes: Curve Reverse NodeJohnny Matthews
This is an implementation of T88722. It accepts a curve object and for each spline, reverses the order of the points and all attributes. This is more of a foundational node to support other nodes in the future (like curve deform) Selection takes spline domain attributes to determine which splines are selected. If no selection is present all splines are reversed. Differential Revision: https://developer.blender.org/D11538
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-11Nodes: cache socket identifier to index mappingJacques Lucke
While this preprocessing does take some time upfront, it avoids longer lookup later on, especially as nodes get more sockets. It's probably possible to make this more efficient in some cases but this is good enough for now.
2021-06-11Nodes: add utilities to check if there are undefined nodes/socketsJacques Lucke
2021-06-11Nodes: move mix rgb node to C++Charlie Jolly
Prepare node for conversion to Geometry Nodes. There should be no functional changes. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D11506
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-10Fix: Point translate and point scale don't execute on curve dataHans Goudey
2021-06-09Geometry Nodes: Copy spline attributes in the curve resample nodeHans Goudey
Previously only point domain attributes were copied to the result curve.
2021-06-09Splines: Add API functions for interpolating dataHans Goudey
First, expand on the interpolation to evaluated points with a templated helper function, and a function that takes a GSPan. Next, add a set of functions to `Spline` for interpolating at arbitrary intervals between the evaluated points. The code for doing that isn't that complicated anyway, but it's nice to avoid repeating, and it might make it easier to unroll the special cases for the first and last points if we require the index factors to be sorted.
2021-06-09Geometry Nodes: Add Convex Hull NodeHenrik Dick
This commit adds a node to output the convex hull of any input geometry as a mesh, which is an enclosing geometry around a set of points. All geometry types are supported, besides volumes. The code supports operating on instances to avoid copying all input geometry before the operation. The implementation uses the same backend as the operation in edit mode, but uses Mesh directly instead of BMesh. Attribute transfer is not supported currently, but would be a point of improvement for the future if it can work in a predictable way on different geometry input types. Differential Revision: https://developer.blender.org/D10925
2021-06-09Cleanup: remove redundant checks which have already been testedCampbell Barton
Note that these changes are limited simple cases as these kinds of changes could allow for errors when refactoring code when the known state is not so obvious.
2021-06-09UI: Add the option to not display some socket labelsHans Goudey
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
2021-06-08Geometry Nodes: Rename bounding box mesh output to "Bounding Box"Hans Goudey
This was decided by the geometry nodes team, because the important part of this output is not that it's a mesh.
2021-06-08Geometry Nodes: Support curve instances in the bounding box nodeHans Goudey
Currently curve instances are misleading, since `CurveEval` is created from scratch from the original `Curve`, but this won't always be true.
2021-06-08Cleanup: Remove duplicate call to functionHans Goudey
Missed in rBa2ebbeb836ae765
2021-06-08Geometry Nodes: new Select by Material nodeJacques Lucke
This node creates a boolean face attribute that is "true" for every face that has the given material. Differential Revision: https://developer.blender.org/D11324
2021-06-08Fix T88934: Crash with line node count input < 0Hans Goudey
Some of the primitive nodes can return null in an error condition. This is confusing mixed with adding a maderial slot in calling functions. This is the second crash caused by that confusion. It's simpler to add the slot right when allocating the mesh, and it will lend itself better to copy & paste coding in the future. Differential Revision: https://developer.blender.org/D11530
2021-06-07Cleanup: Fix uninitialized variable warningHans Goudey
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-04Geometry Nodes: Curve Length NodeJohnny Matthews
This commit adds a node that outputs the total length of all evalauted curve splines in a geometry set as a float value. Differential Revision: https://developer.blender.org/D11459
2021-06-04Geometry Nodes: Support curve data in the geometry delete nodeHans Goudey
This commit implements support for deleting curve data in the geometry delete node. Spline domain and point domain attributes are supported. Differential Revision: https://developer.blender.org/D11464
2021-06-02Fix T88732: Curve to mesh node crash with empty input curveHans Goudey
The mesh to curve node generated an empty curve because no edges were selected. This commit changes that node to not add a curve in that case. This also changes the curve to mesh node to not add a material when no mesh was created. Even though we don't expect null curves or meshes in this case, the change is harmless.
2021-06-02EEVEE: AOVs not same as cycles.Jeroen Bakker
EEVEE uses hashing to sync aov names and types with the gpu. For the type a hashed value was overridden making `decalA` and `decalB` choose the same hash. This patches fixes this by removing the most significant bit.
2021-06-02Revert "EEVEE: AOVs not same as cycles."Jeroen Bakker
This reverts commit 730a46e87d261543c9550ddef406894e14d5bea6.
2021-06-02EEVEE: AOVs not same as cycles.Jeroen Bakker
EEVEE uses hashing to sync aov names and types with the gpu. For the type a hashed value was overridden making `decalA` and `decalB` choose the same hash. This patches fixes this by removing the most significant bit.
2021-06-02Fix assert with geometry node outputHans Goudey
The previous commit (my own) returned early without providing a value for the node's output geometry set, which is required.
2021-06-02Cleanup: Avoid duplicating node input retrievalHans Goudey
Pass the selection name and the invert argument to each component instead of retrieving them every time.
2021-06-02Geometry Nodes: Add Delete Geometry NodeWannes Malfait
This node is similar to the mask modifier, but it deletes the elements of the geometry corresponding to the selection, which is retrieved as a boolean attribute. The node currently supports both mesh and point cloud data. For meshes, which elements are deleted depends on the domain of the input selection attribute, just like how behavior depends on the selection mode in mesh edit mode. In the future this node will support curve data, and ideally volume data in some way. Differential Revision: https://developer.blender.org/D10748
2021-06-01Geometry Nodes: Skip calculating normals in transform nodeHans Goudey
This commit skips the eager recalculation of mesh normals in the transform node. Often another deformation or topology-altering operation will happen after the transform node, which means the recalculation was redundant anyway. In one of my test cases this made the node more than 14x faster. Though depending on the situation the cost of updating the normals may just be shifted elsewhere.