Attribute Transfer

I would like to do Attribute Transfer like Houdini.

What I want to do is to use incoming SOP’s primitive center to sample an image and output to point Cd. (Like mosaic effect, in C4D this can be done by use fracture node then colorShader)
I know it can be done in instancing using w but in my case, the incoming SOP won’t be a grid but randomized grids with various primitive sizes.

I attached a sample scene file. I read on the forum that Script SOP can be used to transfer prim attribute to point attribute.

My guess is to transfer primCd to either point Cd or point UV.

I couldn’t figure out how to use script SOP myself. If anybody has suggestion I really appreciate your help!
attribTransfer.1.toe (4.21 KB)

Actually Attribute Promote I meant.

here’s an example of Attribute Promote
https://forum.derivative.ca/t/attribute-promote/11491/1

and here an example of Attribute Transfer
https://forum.derivative.ca/t/attribute-transfer/11469/1

Thank you Idzard! I saw the links but that can transfer from points to primitive, and not the other way around. Lmk if there are still ways to do it.