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
2022-11-05Cleanup: Remove unnecessary node type registraction functionsHans Goudey
These functions provided little benefit compared to simply setting the function pointers directly.
2022-11-04Cleanup: Mesh: Remove redundant edge render flagHans Goudey
Currently there are both "EDGERENDER" and "EDGEDRAW" flags, which are almost always used together. Both are runtime data and not exposed to RNA, used to skip drawing some edges after the subdivision surface modifier. The render flag is a relic of the Blender internal renderer. This commit removes the render flag and replaces its uses with the draw flag.
2022-11-04Realtime Compositor: Implement static cache managerOmar Emara
This patch introduces the concept of a Cached Resource that can be cached across compositor evaluations as well as used by multiple operations in the same evaluation. Additionally, this patch implements a new structure for the realtime compositor, the Static Cache Manager, that manages all the cached resources and deletes them when they are no longer needed. This improves responsiveness while adjusting compositor node trees and also conserves memory usage. Differential Revision: https://developer.blender.org/D16357 Reviewed By: Clement Foucault
2022-11-02Refactor: Rename Object->imat to Object->world_to_objectSergey Sharybin
The goal is to improve clarity and readability, without introducing big design changes. Follows the recent obmat to object_to_world refactor: the similar naming is used, and it is a run-time only rename, meaning, there is no affect on .blend files. This patch does not touch the redundant inversions. Those can be removed in almost (if not all) cases, but it would be the best to do it as a separate change. Differential Revision: https://developer.blender.org/D16367
2022-11-02Geometry Nodes: Add index and value inputs to sample curve nodeHans Goudey
As described in T92474 and T91650, this patch adds two features to the sample curve node. First is an index input, to allow choosing the curve to sample for each point. Second is a custom field input, which is evaluated on the control points of the curve and then sampled like the other outputs. There is an "All Curves" option for the old behavior which takes the length of all curves into account. For invalid curve indices, the node outputs zeros (default values). Invalid lengths and factors are clamped. There have been various discussions about splitting the node up more, but this is an intuitive combination of options and will work well enough for current use cases. The node could still be generalized more in the future. Keep in mind that the source field is evaluated on curve control points, not the evaluated points used for sampling. This is necessary so that fields like "Index" work as expected. Differential Revision: https://developer.blender.org/D16147
2022-11-01Refactor: Rename Object->obmat to Object->object_to_worldSergey Sharybin
Motivation is to disambiguate on the naming level what the matrix actually means. It is very easy to understand the meaning backwards, especially since in Python the name goes the opposite way (it is called `world_matrix` in the Python API). It is important to disambiguate the naming without making developers to look into the comment in the header file (which is also not super clear either). Additionally, more clear naming facilitates the unit verification (or, in this case, space validation) when reading an expression. This patch calls the matrix `object_to_world` which makes it clear from the local code what is it exactly going on. This is only done on DNA level, and a lot of local variables still follow the old naming. A DNA rename is setup in a way that there is no change on the file level, so there should be no regressions at all. The possibility is to add `_matrix` or `_mat` suffix to the name to make it explicit that it is a matrix. Although, not sure if it really helps the readability, or is it something redundant. Differential Revision: https://developer.blender.org/D16328
2022-11-01Cleanup: spelling in commentsCampbell Barton
2022-10-31Geometry Nodes: Use attribute API in deform curves on surface nodeHans Goudey
Retrieve the surface UV coordinates with the attribute API instead of the helper function. This allows more flexibility of data types (and domains), which is helpful especially because geometry nodes can't write 2D vectors yet.
2022-10-20Buildfix for 078e034 missing includeJens Verwiebe
2022-10-20Fix T101215: Distribute Points in Volume node does not refresh on frame changeJacques Lucke
2022-10-20Realtime Compositor: Implement normalize nodeOmar Emara
This patch implements the normalize node for the realtime compositor. Differential Revision: https://developer.blender.org/D16279 Reviewed By: Clement Foucault
2022-10-20Realtime Compositor: Implement Tone Map nodeOmar Emara
This patch implements the tone map node for the realtime compositor based on the two papers: Reinhard, Erik, et al. "Photographic tone reproduction for digital images." Proceedings of the 29th annual conference on Computer graphics and interactive techniques. 2002. Reinhard, Erik, and Kate Devlin. "Dynamic range reduction inspired by photoreceptor physiology." IEEE transactions on visualization and computer graphics 11.1 (2005): 13-24. The original implementation should be revisited later due to apparent incompatibilities with the reference papers, which makes the operation less useful. Differential Revision: https://developer.blender.org/D16306 Reviewed By: Clement Foucault
2022-10-19Geometry Nodes: Use common utility for copying attribute dataHans Goudey
Attribute copying often uses identical logic for copying selected elements or copying with an index map. Instead of reimplementing this in each file, use the common implementation in the array_utils namespace. This makes the commonality more obvious, gives improved performance (this implementation is multithreaded), reduces binary size (I observed a 173KB reduction), and probably reduces compile time.
2022-10-19Cleanup: CMake include pathsCampbell Barton
Remove redundant separators & redundant references to parent paths.
2022-10-18Fix T101660: crash when trying to propagate string attributes in some nodesJacques Lucke
String attributes are intentionally not fully supported in geometry nodes yet because more design work is necessary to decide how they should behave. For now just disable handling string attributes to avoid crashes.
2022-10-18Fix: Sample nearest surface node crash with empty meshHans Goudey
2022-10-18Fix T101642: crash when deleting group output inside node groupJacques Lucke
2022-10-18Fix T101872: Curves sculpt deform node crash with changed curve countHans Goudey
There might be more or fewer curves in the input to the deform curves on surface node than the original, so the curve's surface UV coordinates need to be retrieved from the original curves.
2022-10-18Fix T101882: Division by zero in mesh topology nodesHans Goudey
A vertex might be connected to no edges or no faces. Most of these nodes worked fine in that case, but we might as well make that explicit and skip the sorting anyway.
2022-10-17Fix T101705: crash when connecting reroute to multi-input socketIliya Katueshenock
Differential Revision: https://developer.blender.org/D16203
2022-10-17Geometry Nodes: separate Instances from InstancesComponentJacques Lucke
This makes instance handling more consistent with all the other geometry component types. For example, `MeshComponent` contains a `Mesh *` and now `InstancesComponent` has a `Instances *`. Differential Revision: https://developer.blender.org/D16137
2022-10-14Fix: Muted curves connect to the Fac socketCharlie Jolly
Resolve by setting no_muted_links() on Factor sockets. Same issue as T101613 Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D16153
2022-10-13Realtime Compositor: Keep interpolation in Scale nodeOmar Emara
Currently, the scale node always changes the interpolation of its result to bilinear. This was done because the scale node does not have an interpolation option, unlike the Transform node, so a default of bilinear was assumed. This turned out to be problematic, because in the pixelation use cases, a nearest interpolation is typically preferred by the user. This patch changes the default interpolation of input nodes to bilinear, makes the scale node keep the interpolation of the input it receives, and makes the pixelate node changes the interpolation to nearest. In effect, for non-pixelation use cases, the default bilinear interpolation will be used, and for pixelation use cases, the nearest interpolation will be used unless explicitly specified using a node that sets the interpolation.
2022-10-13Cleanup: Use correct blenkernel namespace for mesh functionsHans Goudey
2022-10-12Nodes: Add "Legacy" to legacy node UI names, skip in searchHans Goudey
Currently there is no way to tell that these node types are deprecated in the UI. This commit adds "(Legacy)" to the end of the names. It also makes it simple to skip these in the various node searches more automatically than before. Fixes T101700 Differential Revision: https://developer.blender.org/D16223
2022-10-12Cleanup: use commented arguments for unused args in C++Campbell Barton
2022-10-12Cleanup: Convert two nodes files to C++Hans Goudey
2022-10-12Cleanup: Remove link drag search operations for socket templatesHans Goudey
Besides texture nodes, which aren't supported anyway, we don't have any builtin nodes that still use the socket template system, so this can be removed.
2022-10-12Nodes: Change Mix node link drag weightingCharlie Jolly
This lowers the search weight for color-specific mix functions on non-color sockets. Reported in blender.chat by simonthommes Differential Revision: https://developer.blender.org/D16228
2022-10-11Realtime Compositor: Implement variable size bokeh blurOmar Emara
This patch implements the variable size blur option in the Bokeh Blur node. The implementation is different from the CPU one in that it also takes the Bounding Box input into account, which is ignored for some reason for the CPU. Additionally, this implementation does not do the optimization where the search radius is limited relative to the maximum value in the size texture. That's because the cost of computing the maximum is not worth it for most use cases. The reference implementation does three unexpected things that are replicated here nonetheless. First, the center bokeh weight is always ignored and assumed to be 1. Second the size of the center pixel is taken into account. Third, a unidimensional distance is used instead of a 2D euclidean one. Those need to be considered independently. Differential Revision: https://developer.blender.org/D16185 Reviewed By: Clement Foucault
2022-10-11Realtime Compositor: Implement parallel reductionOmar Emara
This patch implements generic parallel reduction for the realtime compositor and implements the Levels operation as an example. This patch also introduces the notion of a "Compositor Algorithm", which is a reusable operation that can be used to construct other operations. Differential Revision: https://developer.blender.org/D16184 Reviewed By: Clement Foucault
2022-10-10Node: Add blend modes to Mix node link drag searchCharlie Jolly
Allows searching for Mix blend modes e.g. Overlay when using link drag search Requested by @simonthommes in GN chat Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D16209
2022-10-10Fix typos & co in UI messages.Bastien Montagne
2022-10-08Attribute Node: support accessing attributes of View Layer and Scene.Alexander Gavrilov
The attribute node already allows accessing attributes associated with objects and meshes, which allows changing the behavior of the same material between different objects or instances. The same idea can be extended to an even more global level of layers and scenes. Currently view layers provide an option to replace all materials with a different one. However, since the same material will be applied to all objects in the layer, varying the behavior between layers while preserving distinct materials requires duplicating objects. Providing access to properties of layers and scenes via the attribute node enables making materials with built-in switches or settings that can be controlled globally at the view layer level. This is probably most useful for complex NPR shading and compositing. Like with objects, the node can also access built-in scene properties, like render resolution or FOV of the active camera. Lookup is also attempted in World, similar to how the Object mode checks the Mesh datablock. In Cycles this mode is implemented by replacing the attribute node with the attribute value during sync, allowing constant folding to take the values into account. This means however that materials that use this feature have to be re-synced upon any changes to scene, world or camera. The Eevee version uses a new uniform buffer containing a sorted array mapping name hashes to values, with binary search lookup. The array is limited to 512 entries, which is effectively limitless even considering it is shared by all materials in the scene; it is also just 16KB of memory so no point trying to optimize further. The buffer has to be rebuilt when new attributes are detected in a material, so the draw engine keeps a table of recently seen attribute names to minimize the chance of extra rebuilds mid-draw. Differential Revision: https://developer.blender.org/D15941
2022-10-07Cleanup: redundant parenthesisCampbell Barton
2022-10-07Cleanup: Avoid inconsistent naming in mesh topology APIHans Goudey
Mesh corners are called "loops" in the code currently. Avoid diverging naming and just use that convention in some newly added code.
2022-10-06Fix: Use after free in geometry node group loggerHans Goudey
The name of the node group in the geometry nodes logger is created in `GeoModifierLog::get_local_tree_logger`, where it references the compute context. However, the compute context is a local variable that doesn't live as long as the log. Therefore the log needs to own the node group name. Removing the ownership from `NodeGroupComputeContext` may be possible as well, but seems less obviously correct. This can be a temporary solution until we can completely avoid storing strings in the logger (see D15775). Fixes T101599
2022-10-05Revert "Geometry Nodes: Add index input to Edge Vertices node"Hans Goudey
Unfortunately this commit changed behavior in a fundamental way that can't be addressed without larger changes. Previously the position outputs were evaluated on the edge domain and then interpolated to the context domain, which could be useful for some rudimentary mesh smoothing. After the commit they were just evaluated at the specified index, which looks practically random when evaluated on a different domain. We may need a new node that doesn't have the implicit behavior in the future. This reverts commit 4ddc5a936e07129aaf94ed7d188b8f5f5ea14085.
2022-10-05Fix T101613: Muted Mix node wrongly connects to Factor socketCharlie Jolly
T101613: Muting/ctrl+x deleting the new mix node in Float mode passes through the wrong input. Fix by setting no_muted_links() on Factor sockets.
2022-10-05Cleanup: Remove unused includesHans Goudey
2022-10-05Geometry Nodes: Add soft min for points node radius inputHans Goudey
Also remove an unnecessary cast.
2022-10-04UI: Avoid unnecessary label in set curve normal nodeHans Goudey
"Mode" is obvious and isn't worth cutting off the text.
2022-10-04Cleanup: formatCampbell Barton
2022-10-04Cleanup: replace UNUSED macro with commented args in C++ codeHans Goudey
This is the conventional way of dealing with unused arguments in C++, since it works on all compilers. Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
2022-10-04Geometry Nodes: Add index input to Edge Vertices nodeHans Goudey
Previously the edge index was always determined by the field context, and the node didn't work when the context was in any other domain. Adding an index input makes it work much more nicely with the other topology nodes. It's now in the topology submenu too. I also reimplemented the edge positions input to use the field at index node internally. That will probably make it slower for now, but we need to optimize that to do nothing in some special cases anyway. Differential Revision: https://developer.blender.org/D16105
2022-10-04Fix: Incorrect field status in offset point in curve nodeHans Goudey
The input supports fields, the outputs are fields only if either of the inputs are fields. Also, .hide_value() is redundant for implicit fields.
2022-10-04Geometry Nodes: Rename Control Point Neighbors NodeHans Goudey
Rename the node to "Offset Point in Curve" Since this was committed, more mesh and curve topology nodes have been committed with a different naming scheme (482d431bb6735e82069). Change the name of this node to match "Offset Corner in Face". Because the node was only added recently, it's a full rename, including the ID, so forward compatibility is broken.
2022-10-04Geometry Nodes: Change order of outputs in topology nodesHans Goudey
It's a bit more natural if the "Total" output come second, and it's also consistent with the Accumulate Field node.
2022-10-03Geometry Nodes: Set Curve NormalJohnny Matthews
This node allows for curves to have their evaluated normal mode changed between MINIMUM_TWIST and Z_UP. A selection input allows for choosing which spline in the curves object will be affected. Differential Revision: D16118
2022-10-03Fix: crash when linked geometry node group is missingJacques Lucke