Page MenuHome

Geometry Nodes: Distribute points once per instance reference
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Sep 24 2021, 10:57 PM.

Details

Summary

With this commit, the distribute points on faces node runs only once for
every unique mesh in its input. That means if there are 100 instances of
the same mesh, it will only run once.

This basically reverts rB84a4f2ae68d408301. The optimization there
didn't end up being worth it in the end, since it complicates code quite
a lot. It's also incompatible with this method of dealing with instances,
and it breaks field evaluation for instances, where we would have to
make sure to handle each instance transform properly otherwise,
evaluating the field separately for every instance.

Diff Detail

Repository
rB Blender
Branch
point-distribute-simplify (branched from master)
Build Status
Buildable 17303
Build 17303: arc lint + arc unit

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Sep 24 2021, 10:57 PM
Hans Goudey (HooglyBoogly) created this revision.
Jacques Lucke (JacquesLucke) requested changes to this revision.Sep 25 2021, 1:54 PM
Jacques Lucke (JacquesLucke) added inline comments.
source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc
558

This is still realizing instances implicitly. In a setup like the one below it will realize the entire collection which is not what we want. If we want this behavior then the node should be evaluated on all instances recursively, without calling geometry_set_realize_instances at all. The same applies to the Curve Fill node I think.

This revision now requires changes to proceed.Sep 25 2021, 1:54 PM
  • Update logic to use recursive geometry sets, fix issue in poisson disk mode
This revision is now accepted and ready to land.Sep 27 2021, 6:10 PM