Page MenuHome

Geometry Nodes: Add simple nodes for translating and scaling points
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Jan 12 2021, 10:45 PM.

Details

Summary

Doing simple operations with geometry nodes can be more overwhelming
than it needs to be. That's partly because most of the nodes are fairly
low-level operations. While we can't have "uber nodes" yet, it makes
sense to add some simple nodes for the most common operations.

We already have a couple nodes specifically for changing the "rotation"
attribute on points, so nodes for the "position" and "scale" attributes
make sense as a next step.

I wasn't sure whether I should include the "type" drop-down here, it's
sort of nice to avoid it on these simpler nodes. At the moment the patch doesn't
have them, but they could easily be added. We already have the "Transform"
node for the "constant" version of the translate node, but there is no
existing constant operation for point scales.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Jan 12 2021, 10:45 PM
Hans Goudey (HooglyBoogly) created this revision.

I think it is reasonable to have this.

This revision is now accepted and ready to land.Jan 13 2021, 12:40 PM
  • Merge branch 'master' into geometry-nodes-translate-scale-nodes
  • Add type drop-downs, use multiplication for scale node
Jacques Lucke (JacquesLucke) added inline comments.
source/blender/nodes/geometry/nodes/node_geo_point_scale.cc
25

The default should be (1, 1, 1).

38

When the attribute does not exist before this node, the scale is zero, making the multiplication below do nothing..
Not sure if there is a better way to fix this currently than to explicitly check for the attribute beforehand.

Hans Goudey (HooglyBoogly) marked an inline comment as done.Jan 13 2021, 5:41 PM
Hans Goudey (HooglyBoogly) added inline comments.
source/blender/nodes/geometry/nodes/node_geo_point_scale.cc
38

I'd like to handle this as part of the bug fix for T84639