Using expressions in GEO instancing parameters

Hi!

I’m trying to find a way to use expressions within the parameters of the Instance tabs of a GEO and can’t seem to get anything to stick.

For example, at the moment I have a Table DAT as the Default Instance OP and I’ve attributed various columns of this table to each parameter inside Translate XYZ, Rotate XYZ and Scale XYZ. This works as expected.

I would now want PivotZ to equal the negative of the value I’ve given to Translate Z (for example PivotZ should be -3.4 in the example below). I’ve tried various expressions but they all resulted in bad operand or improper type errors. My understanding is that the instancing parameters expect only column names which are strings while I’m attempting to perform math on the values hidden behind these strings.

I’m pretty sure I could cludge something together using an evaluate DAT to negate the columns I need but I feel there must be a more direct and elegant way to do this.

Thanks!

There is no expression evaluation available on a per-instance basis, so doing it on your data beforehand with an Eval (or in CHOP is likely faster) is the way to go.

Got it!

I assume this is because expression evaluation is performed on the CPU while all the instancing magic happens at the GPU level?

Yep, that’s exactly why.

Thanks Malcolm. A Dat To and a Math CHOP did the trick!

And also a GLSL Top with compute shader and several outputs for each parameter can do the trick!