Page MenuHome

Geometry Nodes: Add Instance Scale Input Node
ClosedPublic

Authored by Johnny Matthews (guitargeek) on Jun 6 2022, 3:53 AM.

Details

Summary

A field input node for the scale of each top-level instance transform. The scale can be set with the "Scale Instances" node, but previously could not be retrieved.

Diff Detail

Repository
rB Blender

Event Timeline

Johnny Matthews (guitargeek) requested review of this revision.Jun 6 2022, 3:53 AM
Johnny Matthews (guitargeek) created this revision.

The commit message could have a bit more detail I think, for example:

A field input node for the scale of each top-level instance transform.
The scale can be set with the "Scale Instances" node, but previously
could not be retrieved.

source/blender/nodes/geometry/nodes/node_geo_input_instance_scale.cc
30–37

I think we can skip the domain interpolation, since no other domains exist for instances

return VArray<float3>::ForFunc(instance_component.instances_num(), [&](const int i) -> float3 {
  return instance_component.instance_transforms()[i].scale();
};
This revision is now accepted and ready to land.Jun 6 2022, 5:51 PM