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-09EEVEE: 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-09Fix 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-14Fix T88234: Crash with Eevee when shader displacement socket connection is mutedPhilipp Oeser
In {rB266cd7bb82ce}, support for muting links was added. It might be debatable if we define a shader as "having" displacement even if the link is muted, but after said commit, shader_has_displacement() would return true but still leave the returned node as NULL. Now also return false if the link is muted (otherwise the caller would need to additionally check the returned node as well.) Maniphest Tasks: T88234 Differential Revision: https://developer.blender.org/D11256
2021-05-12Fix incorrect labels for math node wrap functionCharlie Jolly
Found in T88151, labels are swapped. Vector math node is not affected.
2021-04-28Fix T87165: Join geometry node doesn't copy instance IDsHans Goudey
This makes motion blur work incorrectly. With a similar fix to rBf2d70c02f88cc00, just copy over the instance IDs in this case.
2021-04-27Fix T87702: Cannot generate one point with line node in end points modeHans Goudey
Counts of less than one weren't allowed in end points mode mostly to avoid a division by zero when calculating the delta. It's trivial to allow a count of one, so this commit does that, with the point placed at the start location.
2021-04-21Fix T87659: crash when creating reroute loop in geometry nodesJacques Lucke
This was a regression introduced in rB0ff3f96a1b0193d69dae5ca69e7c93d6cdf34558.
2021-04-20Geometry Nodes: skip attribute conversion if src and dst are the sameJacques Lucke
2021-04-16Fix T87217: improve impact of seed in point distribute nodeJacques Lucke
Incrementing the seed just by one did not mix things up enough.
2021-04-16Fix T87359: set group output in geometry node tree update callbackWannes Malfait
This also fixes T85511. Differential Revision: https://developer.blender.org/D10970
2021-04-15Geometry Nodes: refactor implicit conversionsJacques Lucke
This refactor simplifies having standalone function pointer that does a single conversion. It also speeds up implicit type conversion of attributes.
2021-04-15Cleanup: move type conversions to separate fileJacques Lucke
2021-04-13Geometry Nodes: realize instances in subdivide nodeJacques Lucke
This makes it consistent with the Subdivision Surface node.
2021-04-13Fix compile error: Missing include pathsFalk David
rB8d9fd0427dd6 added the `WITH_GMP` definition but did not append the include paths.
2021-04-13Cleanup: Nodes: Use consistent errors for nodes built without featuresHans Goudey
2021-04-12UI/Nodes: Improve feedback when adding node fails (e.g. on drag & drop)Julian Eisel
This is especially useful when trying to add a node group instance, e.g. via drag & drop from the Outliner or Asset Browser. Previously this would just silently fail, with no information why. This is a source of confusion, e.g. earlier, it took me a moment to realize I was dragging a node group into itself, which failed of course. Blender should always try to help the user with useful error messages. Adds error messages like: "Nesting a node group inside of itself is not allowed", "Not a compositor node tree", etc. Adds a disabled hint return argument to node and node tree polling functions. On error the hint is reported, or could even be shown in advance (e.g. if checked via an operator poll option). Differential Revision: https://developer.blender.org/D10422 Reviewed by: Jacques Lucke
2021-04-11Cleanup: clang-formatCampbell Barton
2021-04-09Fix T87117: Geometry Nodes: Add missing Map Range modes to shader nodeCharlie Jolly
Add missing modes as reported in T87117 bug report. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D10885
2021-04-09Fix: Missing GeometryNodeCustomGroupRay Molenkamp
This is a minor change to add some plumbing code to support custom geo nodes. This is working the same way as the custom cycles and compositor nodes. An example add-in is attached to D10784 Reviewed By: JacquesLucke Differential Revision: http://developer.blender.org/D10784
2021-04-08Geometry Nodes: Support volumes in the bounding box nodeHans Goudey
Where possible, nodes in the "Geometry" category should support all geometry component types. This adds support for volumes in the recently added bounding box node, based on functions added in the previous two commits. Differential Revision: https://developer.blender.org/D10906
2021-04-08Cleanup: Remove unused includes, use consistent orderHans Goudey
2021-04-08Cleanup: Use const arguments for volume codeHans Goudey
The problem was that you could getting write access to a grid from a `const Volume *` without breaking const correctness. I encountered this when working on support for volumes in the bounding box node. For geometry nodes there is an important distinction between getting data "for read" and "for write", with the former returning a `const` version of the data. Also, for volumes it was necessary to cast away const, since all of the relevant functions in `volume.cc` didn't have const versions. This patch adds `const` in these places, distinguising between "for read" and "for write" versions of functions where necessary. The downside is that loading and unloading in the global volume cache needs const write-access to some member variables. I see that as an inherent problem that comes up with caching that never has a beautiful solution anyway. Some of the const-ness could probably be propogated futher in EEVEE code, but I'll leave that out, since there is another level of caching. Differential Revision: https://developer.blender.org/D10916
2021-04-08Cleanup: spellingCampbell Barton
2021-04-07Cleanup: Rename function, switch order of argumentsHans Goudey
The function name was not very specific, this makes it clearer that it works on instances rather than only real geometry. Also use `r_` prefix for the return argument.
2021-04-07Geometry Nodes: Rename grid output UV attributeHans Goudey
During review of D10730 it was discovered that the "uv" name causes issues for cycles, which uses it as a default internal data name. While that could be fixed in the future, there was no particular reason to use "uv" instead of "uv_map", so we use the latter instead here, which is consistent with the lowercase naming scheme chosen for attributes.
2021-04-07Geometry Nodes: Greatly improve speed of some mesh primitivesHans Goudey
Some of the BMesh primitive operators have a lot of overhead due to the fact that they use other operators like extrusion, removing doubles, and rotation, to build each shape rather than filling arrays directly. Implementing the primitives directly with the Mesh data structure is much more efficient, since it's simple to fill the result data based on the known inputs. It also allows also skip the conversion from BMesh to Mesh after the calculations. Speed matters more for procedural operations than for the existing operators accessible from the add menu, since they will be executed every evaluation rather than once before a destructive workflow. | Shape | Before (ms) | After (ms) | Speedup (x times faster) | | -------- | -------------| ------------| -------------------------| | Cylinder | 1.1676 | 0.31327 | 3.72 | | Cone | 4.5890 | 0.17762 | 25.8 | | Sphere | 64213.3 | 13.595 | 4720 | The downside of this change is that there will be two implementations for these three primitives, in these nodes and in `bmo_primitive.c`. One option would be re-implementing the BMesh primitives in terms of this code, but that would require `BMesh` to depend on `Mesh`, which is currently avoided. On the other hand, it will be easier to add new features to these nodes like different fill types for the top and the bottom of a cylinder, rings for a cylinder, and tagging the output with boolean attributes. Another factor to consider is that the add mesh object operator could be implemented with these nodes, just providing more benefit for a faster implementation. As a future cleanup, there is room to share code that generates the "rings" topology between different nodes that generate meshes. Differential Revision: https://developer.blender.org/D10730
2021-04-07Cleanup: Fix pessimizing move warning.Ankit Meel
2021-04-07Fix T87195: Boolean node multi-input socket only accepts one linkHans Goudey
The default insert link callback for nodes was trying to move the existing link away, since it didn't properly handle multi-input sockets (though the problem wasn't exposed for the join node). We can basically skip all of this "moving existing links" for multi-input sockets, unless we are at the link limit.
2021-04-07Cleanup: Various cleanup of node link handling functionsHans Goudey
Use LISTBASE_FOREACH macro, rename variables, comment formatting, simplification of logic, etc.
2021-04-07Geometry Nodes: Bounding Box NodeHans Goudey
This commit adds a simple node to output the min and max of an axis-aligned bounding box for the input geometry, as well a rectangular prism mesh created from these values for convenience. The initial use case for this node is a "bounding box boolean", where doing the boolean with just a bounding box could be signigicantly faster, for cases like cutting a hole in a wall for a window. But it's easy to imagine other cases where it could be useful. This node supports mesh and point cloud data right now, volume support will come as a separate patch. Also note that there is plenty of room to improve the performance of this node through parallelization. Differential Revision: https://developer.blender.org/D10420
2021-04-06Geometry Nodes: Use distance units for socket valuesWannes Malfait
This adds the property subtybe `PROP_DISTANCE` where appropriate. Differential Revision: https://developer.blender.org/D10900
2021-04-02Geometry Nodes: Separate grid primitive X and Y sizeHans Goudey
Since you can already specify a separate size for X and Y with the grid node, it makes sense to be able to specify the size separately for each axis also. This also avoids some awkward math with a Transform node afterwards when you want a specific size for each direction. Versioning (except for animation and drivers) is handled in this commit. Differential Revision: https://developer.blender.org/D10834
2021-04-02Geometry Nodes: Allow float input for point scale nodeHans Goudey
This allows easily changing the scale attribute with a uniform scale within a single simple node.
2021-04-02Geometry Nodes: Change point translate and scale node defaultsHans Goudey
Since these nodes are usually used for more basic operations and the attribute nodes are used when more complexity is necessary, it makes sense to give these nodes more accessible defaults-- hopefully this can make learning about the core concepts of geometry nodes a bit easier.
2021-04-02Fix T86874: Wireframe not drawing for geometry node mesh primitivesKris
The following primitives needed ME_EDGEDRAW, ME_EDGERENDER edge flags: * Grid * Circle Set flags on the inside edges for grid and circle triangle fan (mesh primitive nodes) so they are visible and selectable. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D10878
2021-04-02Cleanup: Remove unecessary C API for direct mesh booleanHans Goudey
The main goal here is to remove the need for a C API to the code in `mesh_boolean_convert.cc`. This is achieved by moving `MOD_boolean.c` to C++ and making the necessary changes for it to compile. On top of that there are some other slight simplifications possible to the direct mesh boolean code: it doesn't need to copy the material remaps, and the modifier code can use some other C++ types directly.
2021-04-01Geometry Nodes: Improve speed of boolean node, use multi-input socketHans Goudey
This commit improves the performance of the node by up to 40% in some cases when there are only two input meshes, mainly by skipping the conversion to and from BMesh. When there are more than two input meshes (note the distinction from "Geometries", a geometry set can have many mesh instances), the performance is actually worse, since boolean currently always does self intersection in that case. Theoretically this could be improved in the boolean code, or another option is automatically realizing instances for each input geometry set. Another improvement is using multi-input sockets for the inputs, which removes the need to have a separate boolean node for every operation, which can hopefully simplify some node trees. The changes necessary for transforms in `mesh_boolean_convert.cc` are somewhat subtle; they come from the fact that the collecting the geometry set instances already gives transforms in the local space of the modifier object. There is also a very small amount of cleanup to those lines, using `float4x4::identity()`. This commit also fixes T87078, where overlapping difference meshes makes the operation not work, though I haven't investigated why. Differential Revision: https://developer.blender.org/D10599
2021-04-01BLI: rename resource collector to resource scopeJacques Lucke
Differential Revision: https://developer.blender.org/D10857
2021-04-01Cleanup: use bool instead of intJacques Lucke
2021-04-01Cleanup: Remove unused codeHans Goudey
There was a note about reusing this for "texture nodes", but that will probably not be implemented in this way anyway.
2021-04-01Cleanup: move node_exec.c to c++Jacques Lucke
Doing this, because it might make it easier to replace the implementation of `bNodeInstanceHash`.
2021-04-01Cleanup: spellingCampbell Barton
2021-04-01Geometry Nodes: add socket value logging capabilityJacques Lucke
The node tree evaluator now calls a callback for every used socket with its corresponding value(s). Right now the callback does nothing. However, we can use it to collect attribute name hints, socket values for debugging or data that will be displayed in the spreadsheet. The main difficulty here was to also call the callback for sockets in nodes that are not directly executed (such as group nodes, muted nodes and reroutes). No functional changes are expected.
2021-03-31Fix T87094: Transforming geometry instances component is brokenHans Goudey
Caused by an incorrect transformation order in cleanup commit rBd037fef3bd1dc2e. The fix is to simply reverse the order.
2021-03-31Geometry Nodes: Rename "Grid" to "Density"Hans Goudey
For other "Attribute Name" fields we usually give a more specific name that relates to what the attribute is actually used for, like "Mask" in the point separate node. This is a similar situation, and would also be consistent with the naming planned in D10506.
2021-03-30Geometry Nodes: Set default grid vertices to 3 by 3Hans Goudey
This is a relatively arbitrary value, but a good starting point-- it's simple while also showing the possibility of the subdivisions. Ref T86819
2021-03-30Fix unused variable warning caused by recent cleanupHans Goudey
Caused by a cleanup, rBd037fef3bd1dc.
2021-03-30Cleanup: Fix incorrect socket list nameHans Goudey
2021-03-30Cleanup: Use float4x4 type and constructorHans Goudey
2021-03-29Fix T86972: transform node transforms shape keysJacques Lucke