# How can I deform individual instances using geometry nodes? [duplicate]

I have a simple fish model and can bend it around Z axis using geometry nodes - bending factor is linked to input attribute:

What I'm trying to do is to distribute this model in volume and apply random bend factor to each fish:

I don't see any option to "Set attribute" for my fish object. I understand that all instances are the same geometry, so I need to realise them first - but how to iterate each individual realised geometry to apply some complex transforms?

• Sorry, I'm not sure if I understand correctly what you have done already - you say in the beginning you have a fish model and you can bend it around Z in GN, and the bend factor is linked to an input attribute. But in your nodetree nothing is linked to the attribute and I see nothing controlling the bending of the fish...? Is the fish we see the result of the bending factor -0.400? And if so, how did the fish get that bending? Commented Jan 22 at 8:16
• @GordonBrinkmann, the fish object is bended using it's own GN modifier, I didn't post it node setup - it's just a series of rotation transforms based on "bending factor" input value (yes, the fish on screen is a result of applying -0.4 factor). I created another object (simple cube) with it's own GN modifier and use the fish object as instance there. As I understand, I can't just somehow manipulate this bend factor from this cube's GN - it just takes the resulting geometry. So maybe I need to use "straight" fish and bend it randomly after realising geometry inside cube... Commented Jan 22 at 10:57
• Commented Jan 22 at 16:22

You can capture attributes on points so that these attributes will be available for each instance.

We don't know which animation you want, so this is an example:

• Capture two axis and a position (these will be the reference for each instance)

• Use these attributes on the realized instances, so that each transform applied to the instances are calculated individually (relative to the captures axis and coordinates)

For instance:

Captures, instances on point and realize:

Then calculate on these basis:

• Thanks for your reply! As I can see we never use captured position attribute while modifying realised geometry (it is not connected anywhere), so we deform the whole resulting geometry along these sine waves. This approach may solve my problem here, but I'm just trying to make things clear for me - I can't just treat realised instances as individual objects to apply individual transforms to each one independently, right? Like in your example - to make each of these bars randomly bended. Commented Jan 22 at 11:16
• @pavelplus, I do not use the position, as this is just an example. Also I don't capture and use anything else. But let's imagine that you capture a random (int) value. After that you can associate the behavior you want from this value (including the initial position). Alternatively, if using simulation zone, you can also store named attributes which in this case could be retreive (and modified) at each step of the simulation. All that is up to what you want to do concretely. Commented Jan 22 at 11:22