Trying to build a POPs system and control individual instances

Hey all!

I’ve been learning TD for about a year now, but I’m still pretty green.

For my current project I’m to bring to live some magical underwater grass flowing in the currents. I’m trying to do this in POPs currently, so far I’ve figured out two ways of achieving this.

Option 1: following a similar tutorial I’ve managed to create the attached file (1.3) which effectively uses lines, copied to grid points. What I really love about this is that I can apply a noise after on everything which can apply the underwater feeling displacement on the tips.
However a big drawback of this method is that I can’t see how I can manipulate individual ‘strands’, because they are not being instanced.

Seagrass_01.3.toe (13.0 KB)

As an example I’d love to use the ‘Lookup texture’ operator which would let me create sweeping colour changing effects over the different grass strands. Not being able to use that, I suppose I could instead create a colour attribute on each grid point upon which the strands are copied, but I can’t see how to transfer this to a MAT to manipulate the colour :face_with_diagonal_mouth:

Option 2:
I created a version which uses instances in the more traditional way. However using this method, if I apply a noise to create my underwater effect, it of course cannot happen after the geometry node and therefore applying it to an individual strand causes each noise-displaced strand to be identical. You can see that in this example:

Seagrass_Instanced_01.1.toe (8.6 KB)

Anyone more experienced than I who might be able to weigh in?
Thanks so much in advance! :folded_hands:

Hello @puppydust

One approach you could try is assigning unique texture coordinates to each copy, then using those coordinates in the material to sample a color from a TOP. To do this, enable Use Template Point Attribs on the Copy POPs’ Template Attribute pages to pass the attributes through to the output.

Seagrass_01.Modified.toe (12.4 KB)

Thanks so much for this @Guillaume.L! This is exactly what I’m trying to achieve. I see this uses the attribute ‘Tex’ which I gather is a system attribute for texture coordinates.

If I may ask a follow up question: I would like to multiply the colours from this noise TOP to a gradient that runs along the length of each copy. So in this example, it goes from dark to light from the beginning to the end of each grass strand, and each grass strand is still colourized as in your modified example.

I’m not sure how to pull this off. I already have an attribute NoiseModulation that goes from start to end of each copy, and can use a pattern POP to make the lines go from black to white. But I can’t see how I can combine this with the colours in the noise TOP that is plugged into the MAT.

Do you know how I might do this?
Thanks again!

Seagrass_01.Modified.4.toe (14.5 KB)

To achieve this effect, you can transfer the point color attribute generated by pattern2 to the grass strand instances in copy4. In the material, the vertex color will then be blended with the texture color to produce the final appearance.
Seagrass_01.Modified.toe (14.3 KB)

Thanks so much Guillaume, that was simpler than I realised. Slowly getting the hang of this!