Page MenuHome

Geometry Nodes: Object info node optional instance output
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Oct 11 2021, 11:45 PM.

Details

Summary

The object info node output an instance as a performance optimization.
Before that optimization was (almost) invisible to the user, but now that
we aren't automatically realizing instances, it isn't intuitive for a
single object to become an instance.

I refactored the transform node so its ability to translate/transform an
entire geometry set was more usable from elsewhere and exposed the
function to get a geometry set from an object.


Another approach would be removing this option and adding a "To Instance"
node that could create an instance from regular geometry. That solution is
more flexible and avoids some nasty workarounds needed to choose
between multiple real geometries in the instance on points node.


There was discussion of adding this same option to the collection info
node. However, currently I think that there isn't the same expectation that
the output of the collection node is not an instance (because a collection
is just a container for multiple objects!), so I actually think it's more intuitive
to just use the realize instance node in that case.

Diff Detail

Repository
rB Blender
Branch
geometry-nodes-object-info-instance-optional (branched from master)
Build Status
Buildable 17838
Build 17838: arc lint + arc unit

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Oct 11 2021, 11:45 PM
Hans Goudey (HooglyBoogly) created this revision.
Jacques Lucke (JacquesLucke) requested changes to this revision.Oct 13 2021, 4:17 PM
Jacques Lucke (JacquesLucke) added inline comments.
source/blender/nodes/geometry/nodes/node_geo_object_info.cc
29

Add a tooltip.

source/blender/nodes/geometry/nodes/node_geo_transform.cc
160

That check doesn't work well currently unfortunately. That is because this will create a curve component if it does not exist already. Same below.
We could think about changing the api to have something like get_curve_for_write_ensure of similar, not sure yet.

This revision now requires changes to proceed.Oct 13 2021, 4:17 PM
  • Merge branch 'master' into geometry-nodes-object-info-instance-optional
  • Add decription
Hans Goudey (HooglyBoogly) marked 2 inline comments as done.Oct 14 2021, 8:37 PM
Hans Goudey (HooglyBoogly) added inline comments.
source/blender/nodes/geometry/nodes/node_geo_transform.cc
160

Good point. This is fixed with D12862 now.

Jacques Lucke (JacquesLucke) added inline comments.
source/blender/nodes/geometry/nodes/node_geo_object_info.cc
30

This tooltip is misleading, because the output can still be instances when this is off.
Maybe something like Output entire object as single instance. Furthermore, maybe add This allows instancing non-geometry object types.

This revision is now accepted and ready to land.Oct 15 2021, 1:01 PM