Parameter reference from list

Hello Touchdesigner Forum!

I just started to dig in the software, and I have a basic question: can parameter fields accept lists of values?

For example, can I define multiple circles using the same CircleTOP by referencing n values in the column of a DAT table? Or in the channel of a CHOP?

I am aware of instancing with Geometry operators, but I am wandering if there is a specific expression syntax or clever method that extends to other operator types.

Thanks for some feedback,
Marco

Generally the answer is “no”. What you are effectively asking for is for the op to iterate or cycle through a list. Each op would need an internal for loop (which they don’t have for this purpose). Then, it would have to re-evaluate its entire set of parameters to burp out the next one.

All that being said, there are a small handful of parameters that take multiple Op references, but that’s a lot more like wiring multiple inputs into one Op.

1 Like

Hi @mmmarcopalma and @antoinedurr,

as Antoine is saying, and especially in the case of the Circle TOP, the answer is “no” but looking a bit outside of this, the answer becomes “it depends” :wink:

For example TOPs have a Pass parameter on their common page where you can control how many times the operator is processing the texture in a single frame. The current “pass” can be retrieved with the TOP member .curPass which can be used in parameters. For example the Edge TOP could be run multiple passes and the Sample Step parameter set to the expression me.curPass. Essentially this is a feedback loop over the Edge TOP that runs n times on top of itself with an always different Sample Step size.
I don’t have a list of TOPs where me.curPass has an impact but operators I can recall are filters - generators like the Circle TOP don’t support it to my knowledge.

Other families have similar capabilities like CHOP parameters being able to process every sample of a channel depending on the current sample index. SOPs can be manipulated via single parameters based on the point index or similar as well as the concept of stamping with the Copy SOP.

Some other operators feature Specification DATs, namely the Text TOP and the Text Components and I’m sure more to come. The Specification DATs are usually used to create multiple instances - like different lines of text with varying positions, colors or similar.

With the new POPs family we introduced a concept of mapping attributes onto parameters further opening up the possibilities what can be expressed in a parameter.

cheers
Markus

1 Like

The workflow you are looking to do (using chop arrays or dat tables to create multiple instances of a circle) is possible also with Geometry Instancing

The instancing pages on the geometry comp allow you to drive various properties via channels and their individual samples. Definitely worth a look for you direction of inquiry. Rather than accepting inputs of lists directly, you specify channels and the. Populate those, but the behavior is mostly identical.

For your specific use case I’d put my circle onto a plane geo and then create instances of that.

1 Like

Thank you all for your replies, I’ll have a look at your recommendations.
I’m still in the phase of getting familiar with the new environment, so all this helps very much.
As a Touchdesigner newbie coming from Grasshopper and its very strong and straightforward Data Structure and Data Type constraints, I’m still figuring out how data is managed here.

@antoinedurr @snaut thanks for explaining what goes on under the hood.
Happy to know that new features tackling this issue are on the roadmap.

@flowb I was aware of Geometry Instancing, but as far as I understood, the instanced geometry output can’t be further processed with CPU based operators. Are you aware of any workarounds? I’m testing combinations of SOPto and CHOPto to transform several copies of a SOP. Just going by intuition, not sure if there are more orthodox ways.

Cheers,
Marco

Instancing consumes the channel mostly, so any manipulation of the channel info would want to be done upstream of that.

If you’re comfortable with GLSL, the GLSL MAT allows you to do some operations on a per-instance basis. This would be one potential mechanism to do further permutations on the instanced channel samples. The GLSL MAT authoring article is one that I often find myself skimming through when I need to do unusual stuff :sweat_smile:

This will become more accessible without hopping into GLSL as the POPs become more formalized, though my understanding is that Geometry Instancing is highly performant and may still be preferred for some workloads.