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-03-29Compositor: Add Anti-Aliasing nodeHabib Gahbiche
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
2021-03-27Cleanup: clang-formatCampbell Barton
2021-03-26Cleanup: Use enum for "in" vs. "out" node socketsHans Goudey
2021-03-26Geometry Nodes: Rename "Plane" primitive to "Grid"Hans Goudey
Although "Grid" may not be techincally correct since a grid could be 3D, it was decided to rename the "Plane" primtive to "Grid". The primitive node allows subdivisions, so the name is more consistent with the operator in the 3D view. Ref T86819 This commit includes a file subversion bump for the versioning.
2021-03-26Geometry Nodes: Implicit conversion change for float/int/color to boolCharlie Jolly
Change `float to boolean` and `int32 to boolean` to return false for zero and negative values. This aligns with how artists would expect these values to work. This is in contrast to what a coder would expect. It was determined on blender.chat that this was a better default. This means that a negative float value would give a boolean false. Change `Color4f to boolean` to return false for zero and negative grayscale values. Likewise, for color to boolean, to account for negative value colors, the grayscale value would be used for determining if a colour was false or not. See {T86454} Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D10685
2021-03-26Geometry Nodes: Add remaining operations to the Vector Math nodeLeon Leno
This patch adds support for the remaining operations of the Vector Math node within Geometry Nodes. While the operations are already available in the UI, they hadn't been implemented, yet. With this patch the node uses the implementation that was added for the Attribute Vector Math node - similar to how it's handled with the Math node and Attribute Math node. Differential Revision: https://developer.blender.org/D10650
2021-03-26Geometry Nodes: Add Attribute Clamp NodeCharlie Jolly
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
2021-03-26Geometry Nodes: Add Attribute Map Range NodeVictor-Louis De Gusseme
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
2021-03-26Cleanup: clang-formatCampbell Barton
2021-03-26CMake: add headers to source lists, sort file-listsCampbell Barton
2021-03-26Fix: Geometry Nodes: Incorrect offsets for plane primitiveLeon Leno
The recent commit that changed the size (rB83df3545246aada) left out a few changed. This patch also adjusts the positioning and UV scale of the generated plane accordingly. Differential Revision: https://developer.blender.org/D10822
2021-03-25Cleanup: Pass instance group result vector as an argumentHans Goudey
This will allow retrieving the instance groups from multiple geometry sets and avoiding needing vectors of vectors to store the results. This is useful when retrieving instances from a multi-input socket of geometries.
2021-03-25BLI: simplify using DefaultHashJacques Lucke
2021-03-25Geometry Nodes: rename attribute domainsJacques Lucke
This patch renames two domains: * `Polygon` -> `Face` * `Corner` -> `Face Corner` For the change from `polygon` to `face` I did a "deep rename" where I updated all (most?) cases where we refere to the attribute domain in code as well. The change from `corner` to `face corner` is only a ui change. I did not see a real need to update all code the code for that. It does not seem to improve the code, more on the contrary. Ref T86818. Differential Revision: https://developer.blender.org/D10803
2021-03-24Fix T86875: "Show on Cage" crash for geometry nodes primitivesHans Goudey
Without `calc_object_remap` turned off in the conversion to and from BMesh for the primitive nodes, the `CD_ORIGINDEX` custom data layer has incorrect values. By using a different function to do the conversions, we can avoid this problem. Thanks to Jacques for finding the fix here. Differential Revision: https://developer.blender.org/D10805
2021-03-23Cleanup: use BLI_assert_unreachable in some placesJacques Lucke
2021-03-23Geometry Nodes: Make plane primitive size consistentHans Goudey
This means the "Size" input is treated as a "diameter" instead of a "radius", just like the 3D view primitives.
2021-03-23Nodes: Add Refract and Faceforward functions to Vector Maths nodesCharlie Jolly
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
2021-03-23Cryptomatte: Node Size.Jeroen Bakker
Made it just a bit smaller (same size as renderlayers node).
2021-03-23Cryptomatte: Default Node Size.Jeroen Bakker
Set the min/max and default node size of the cryptomatte node.
2021-03-23Geometry Nodes: show domain in attribute fill nodeJacques Lucke
Differential Revision: https://developer.blender.org/D10789
2021-03-22Geometry Nodes: Remove location and rotation from mesh primitivesHans Goudey
Following some discussion among the geometry nodes team, it was decided that keeping the primitive nodes simpler and requiring a separate transform node to move the generated geometry from the origin would be better. - It's more consistent with the current general idea of "building block nodes" - It makes more sense for the future when it will be possible to use instancing to control the transforms. - It reduces UI clutter when the controls are not necessary.
2021-03-22Cleanup: remove unexposed nodesJacques Lucke
Those nodes are leftovers from my work on particle nodes and are not needed currently. They can be added back easily if they become necessary.
2021-03-22Geometry Nodes: make random float node more consistent with other nodesJacques Lucke
Previously, different Random Float nodes would generate different values depending on where they are in the node group hierarchy. This can be useful, but should definitely not be the default behavior, because it is very inconsistent with other nodes.
2021-03-22Functions: make multi functions smaller and cheaper to construct in many casesJacques Lucke
Previously, the signature of a `MultiFunction` was always embedded into the function. There are two issues with that. First, `MFSignature` is relatively large, because it contains multiple strings and vectors. Secondly, constructing it can add overhead that should not be necessary, because often the same signature can be reused. The solution is to only keep a pointer to a signature in `MultiFunction` that is set during construction. Child classes are responsible for making sure that the signature lives long enough. In most cases, the signature is either embedded into the child class or it is allocated statically (and is only created once).
2021-03-21Functions: refactor virtual array data structuresJacques Lucke
When a function is executed for many elements (e.g. per point) it is often the case that some parameters are different for every element and other parameters are the same (there are some more less common cases). To simplify writing such functions one can use a "virtual array". This is a data structure that has a value for every index, but might not be stored as an actual array internally. Instead, it might be just a single value or is computed on the fly. There are various tradeoffs involved when using this data structure which are mentioned in `BLI_virtual_array.hh`. It is called "virtual", because it uses inheritance and virtual methods. Furthermore, there is a new virtual vector array data structure, which is an array of vectors. Both these types have corresponding generic variants, which can be used when the data type is not known at compile time. This is typically the case when building a somewhat generic execution system. The function system used these virtual data structures before, but now they are more versatile. I've done this refactor in preparation for the attribute processor and other features of geometry nodes. I moved the typed virtual arrays to blenlib, so that they can be used independent of the function system. One open question for me is whether all the generic data structures (and `CPPType`) should be moved to blenlib as well. They are well isolated and don't really contain any business logic. That can be done later if necessary.
2021-03-21Functions: move CPPType creation related code to separate headerJacques Lucke
This does not need to be included everywhere, because it is only needed in very few translation units that actually define CPPType's.
2021-03-21Cleanup: spelling, doxygen comment formattingCampbell Barton
2021-03-20Cleanup: quiet warningJacques Lucke
2021-03-20Nodes: implement dot graph exporter for derived node treeJacques Lucke
This visualization of nested node groups makes it easier to debug some issues. Muted nodes, muted links, reroute nodes and unavailable sockets are removed from the visualization to keep it clean. Nested node groups are visualized using colored clusters.
2021-03-20Nodes: expose tree name and whether a node is a frame in node tree refJacques Lucke
2021-03-19Nodes: make distinction between directly and logically linked sockets more clearJacques Lucke
This also moves the handling of muted nodes from derived node tree to node tree ref.
2021-03-19Nodes: provide access to type specific data through node tree refJacques Lucke
2021-03-19Geometry Nodes: Refactor / fix point separate nodeHans Goudey
The point separate node was failing in situations where one of the outputs was empty. In addition, the code was not structured very well. This new implementation stores less temporary information, is more geometry component type agnostic, and is more self-descriptive. It also solves the problems mentioned above. Fixes T86573 Differential Revision: https://developer.blender.org/D10764
2021-03-19Geometry Nodes: Make cone primitive 2m tall by defaultHans Goudey
This gives the cone mesh primitive more pleasing proportions by default.
2021-03-19Geometry Nodes: Move cone primtive to rest on its base by defaultHans Goudey
This is generally what people expect when generating a cone. Note that this translation currently happens after the rotation, but since the rotation will likely be removed in the future, that won't be a problem for long.
2021-03-19Fix T86701: Geometry nodes Cube and UV Sphere mesh sizePratik Borhade
The size in the transform matrices was extra, since it is also passed as an argument to the BMesh operators. Differential Revision: https://developer.blender.org/D10763
2021-03-17Geometry Nodes: Rename "Subdivide Smooth" back to "Subdivision Surface"Hans Goudey
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.
2021-03-17Geometry Nodes: Use consistent default for cylinder nodeHans Goudey
- Use 2m height instead of 1m - Default to N-Gon fill for the top and bottom
2021-03-17Nodes: make derived link data more obvious in NodeTreeRefJacques Lucke
`NodeTreeRef` is a thin wrapper on top of `bNodeTree`. By default it should not hide anything from the underlying `bNodeTree` (before this it was hiding muted links). For convenience some "derived" data is cached on sockets. For example all the connected sockets when reroutes and muted links are ignored. A nice side benefit of this refactor is that `NodeTreeRef` requires less memory than before.
2021-03-17Nodes: Add support to mute node wiresCharlie Jolly
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
2021-03-17Fix T86655: remove doubled transformsWannes Malfait
Differential Revision: https://developer.blender.org/D10744
2021-03-17Cryptomatte: Show Name of Object/Material Under The Cursor.Jeroen Bakker
This change shows the object or material name with the cursor when picking for a cryptomatte node. Reviewed By: Julian Eisel Differential Revision: https://developer.blender.org/D10705
2021-03-17Geometry Nodes: Add initial version of mesh primitivesHans Goudey
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
2021-03-16Geometry Nodes: Implicit conversion add int to colorCharlie Jolly
Add implicit `int32 to Color4f` conversion. Matches `int32 to float3` conversion logic. This may not be the most useful conversion but prevents an error in the Attribute Convert node. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D10686
2021-03-16Geometry Nodes: Implicit conversion change from distance to averageCharlie Jolly
Use average instead of distance when converting from float3/float2 to float. This matches behaviour of shader nodes. See: https://developer.blender.org/T86454 Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D10684
2021-03-16Fix: read cryptomatte manifests when images aren't loaded yet.Jeroen Bakker
A check was preventing the actual image to load and was therefore not parsed.
2021-03-16Compositor: Redesign Cryptomatte node for better usabilityJeroen Bakker
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
2021-03-15Geometry Nodes: expose builtin crease attributeJacques Lucke
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
2021-03-15Nodes: multi-input support for Attribute Remove nodeFabian Schempp
This patch adds multi-input support to the Attribute Remove node. Reviewed By: Hans Goudey Differential Revision: https://developer.blender.org/D10698