Pixel Mapping a Torus - How to Color Points Using a Material and Extract with SopTo Chop?

I’m trying to map a torus with LEDs at the points and I’ve got the effect looking great in either a Material SOP or in a Geo COMP but I can’t seem to get the colors out to the SopTo CHOP I’ve attached my file so you can check it out. Thanks.

TorusMap.3.toe (5.0 KB)

1 Like

I finally got it. The trick was assigning the color to the vertices using UV coordinates bypassing the material all together. the key that I was missing was this line in the add color section of the point sop: “op(‘null1’).sample(u=me.inputPoint.uv[0], v=me.inputPoint.uv[1])[0]” where null1 is my texture TOP and the trailing [0] is for red, [1] for green etc. My adjusted file is linked for future seekers. TorusMap.7.toe (5.5 KB)

Nice work finding a solution! FYI the reason the sop to chop doesn’t output the colors you see in the sop viewer, is because the sop viewer is handling the texture sampling on the GPU, even though it’s happening there in the sop viewer.

The sop to chop is getting vertex attributes (as I think you found out from your second post)

I’m not sure what your end game is which might impact the route you take, but you can get a more performant and scalable solution with the top to chop node.

See attached for an ex:

TorusMap.8.toe (5.6 KB)

Hey I’ve gotten farther on this project and now I’m on a part where I need to skip LEDs. Does anyone have ideas on how to insert black pixels or zeros in r g b channel data by referencing a list of numbers without replacing the texture underneath. Currently I’m using a constant chop with rgb=0 and the splice chop. I need to basically do this same thing over and over for a list of numbers. Zoom into container1->Splice1 to see what I am talking about. Please ignore the mess. I know it’s not the cleanest way to do the shuffling but I wanted to see that I was on the right track. TorusMap.13.toe (16.3 KB)