Age | Commit message (Collapse) | Author |
|
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
|
|
Found in T88151, labels are swapped. Vector math node is not affected.
|
|
This makes motion blur work incorrectly. With a similar fix to
rBf2d70c02f88cc00, just copy over the instance IDs in this case.
|
|
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.
|
|
This was a regression introduced in rB0ff3f96a1b0193d69dae5ca69e7c93d6cdf34558.
|
|
|
|
Incrementing the seed just by one did not mix things up enough.
|
|
This also fixes T85511.
Differential Revision: https://developer.blender.org/D10970
|
|
This refactor simplifies having standalone function pointer that
does a single conversion. It also speeds up implicit type conversion
of attributes.
|
|
|
|
This makes it consistent with the Subdivision Surface node.
|
|
rB8d9fd0427dd6 added the `WITH_GMP` definition but did not append the
include paths.
|
|
|
|
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
|
|
|
|
Add missing modes as reported in T87117 bug report.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10885
|
|
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
|
|
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
|
|
|
|
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
|
|
|
|
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.
|
|
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.
|
|
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
|
|
|
|
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.
|
|
Use LISTBASE_FOREACH macro, rename variables, comment formatting,
simplification of logic, etc.
|
|
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
|
|
This adds the property subtybe `PROP_DISTANCE` where appropriate.
Differential Revision: https://developer.blender.org/D10900
|
|
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
|
|
This allows easily changing the scale attribute with a uniform scale
within a single simple node.
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
Differential Revision: https://developer.blender.org/D10857
|
|
|
|
There was a note about reusing this for "texture nodes", but that will
probably not be implemented in this way anyway.
|
|
Doing this, because it might make it easier to replace the implementation
of `bNodeInstanceHash`.
|
|
|
|
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.
|
|
Caused by an incorrect transformation order in cleanup commit
rBd037fef3bd1dc2e. The fix is to simply reverse the order.
|
|
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.
|
|
This is a relatively arbitrary value, but a good starting point-- it's
simple while also showing the possibility of the subdivisions.
Ref T86819
|
|
Caused by a cleanup, rBd037fef3bd1dc.
|
|
|
|
|
|
|
|
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
|
|
|