particlesGPU overlapping and color from image pixels


I’m new to TD and I’ve been playing a lot with particlesGPU in the couple of days and I’ve fine tuned it to render 3d box particles from the points of a box but I’m trying to understand how to do 2 things:
1- 3d box particles are overlapping so I would like to know how to avoid that. Ideally particles could touch but not pass through each other. I’m thinking that I might need to edit the python script to detect “collisions” in order to avoid that.
Screenshot 2023-02-03 at 11.29.57 PM

2- I would like to instance the particles based on an image. Let’s say I have a 128x128 image and each pixel would become a 3D box particle that would assume the color of that pixel. I’ve managed to instance the particles from a box with one of the dimensions set to 0 (so it becomes a plane) with 128x128 divisions to simulate the image. I’ve managed to use an image as particleSourceColor but there is a randomization running inside particlesGPU that assigns randomly the color of each particle. I would like the color of the particle to be assigned mapping the particle position(x,y) to the pixel (x,y) color.

Any ideas on how to implement these modifications? :slight_smile:

This is roughly how it is set after trying to tweak the internal particleGPU network.