instance

instance

Keywords:
  • copy
  • instance
  • iterate
  • repeat
filter
instance
RayTK
v0.42

Repeats its input some number of times, exposing the index as the iteration x value, and combines the results.

It is important to note that unless something in the input chain is making use of the iteration to change or move those copies, they will all be in the same position. The rangeTransform operator is designed for this purpose, though there are also other ops that can do so.

Refer to the Iteration guide for details.

It is also important to note that this operator, like radialClone evaluates its input separately for each iteration, which can cause a significant drain on resources if the input network is complex or costly.

Parameters

Name Description Regular Handling Read-Only Handling
Enable
Instance Count

The number of copies to produce and merge.

Runtime Baked
Combine

How to combine the copies. Only the “simple” options are guaranteed to work properly. The others may produce unexpected and problematic results.

Runtime Baked
  • Simple Union: Combines the shapes so that all of their volumes are included.
  • Simple Intersect: Combines the shapes so that only the places where all overlap are included.
  • Simple Difference: Subtracts the second copy from the first, the third from that, and so on.
  • Smooth Union:
  • Smooth Intersect:
  • Smooth Difference:
  • Round Union:
  • Round Intersect:
  • Round Difference:
  • Chamfer Union:
  • Chamfer Intersect:
  • Chamfer Difference:
  • Stair Union:
  • Stair Intersect:
  • Stair Difference:
  • Column Union:
  • Column Intersect:
  • Column Difference:
  • Simple XOR:
Radius
Number
Offset
Enable Transform
Transform CHOP

A CHOP containing channels tx ty tz and/or rx ry rz that specifies the translate and/or rotate for each instance.

Enable Translate
Enable Rotate
Enable Active CHOP
Active CHOP

A CHOP containing a channel named active, which is used to selectively turn instances off. Any instance with an active value of 0 or less will be excluded from the combined result.

Enable Uniform Scale

Inputs

  • definition_in: (required)
    • Coordinate Types: float vec2 vec3 vec4
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext VertexContext PixelContext
    • Return Types: Sdf
    • Supports Variables: index normindex
  • Blend Radius Field: (optional)
    • Coordinate Types: float vec2 vec3 vec4
    • Context Types: Context MaterialContext CameraContext LightContext RayContext ParticleContext VertexContext PixelContext
    • Return Types: float Sdf
    • Supports Variables: index normindex

Variables

  • Index:
  • Normalized Index (0..1):