# Make the dots the color of your logo

The grid shown below is what i have right now but it just overlays. I want the white dots to be using the image texture color. I have this method i have seen with simon tommes. Where he uses a image texture and 'projects' it over the material set up by some math nodes. The image texture does clip to the knittr (in simon tommes shader) i put a picture here. I have this setup, also with math nodes. made a grid of dots This is my set up of nodes

• so what is it you want to achieve? Make the dots the color of your logo? – Frederik Steinmetz May 30 at 15:12
• yes! and when the image texture 'overlays' even just half... then the dot still has to be filled full. – Mik van Even May 30 at 15:14

You need to pixelate your UV coordinates which you can do as so:

x - (x modulo pixelSize)


You can then use the same modulo nodes by normalizing their outputs to get the coordinates for your discs:

(x modulo pixelSize) / pixelSize


Create your discs the same way you have already done and use them to mix between your image texture output and a background color.

I hope this helps.

• Nicely done, I was being too hasty. – Frederik Steinmetz May 30 at 17:32
• .. and nowadays, you could save yourself a few nodes by using Vector Math on whole vectors, which provides, e.g., Vector Modulo, and Length.. but that wouldn't match @Mik's original tree. – Robin Betts May 30 at 21:39
• I always split vectors if I'm only using two components. It saves unnecessary calculations. Force of habit. – gcs_dev May 30 at 22:07
• Ahh.. I see! That makes sense. – Robin Betts May 30 at 22:39
• @FrederikSteinmetz Thank you, and don't worry, we all can only answer with what we know at the time and pixelation and modulo just happen to be something I've been working with a lot recently. At least you tried to help the OP, I hope he appreciates the help despite not showing it. – gcs_dev May 31 at 9:42

There is another method though [EDIT: the method below is more efficient].
Create a plane and subdivide it a lot.
Create a disc or sphere, parent it to the plane. (in the screenshot it was a cube).
Parent the sphere to the plane.
Go to object properties and where it says instancing, check faces.
Give the sphere a material, add a texture coordinates node, check from instancer and connect the UV out to vector of your logo texture. It's probably easiest to put the logo on a white background.

• U want to think that its not possible. U see in the example shown above mine (which is from Simon Tommes) He has created the exact same thing. The image texture mapped to the mathematical shader (using math nodes). The way ur describing it uses a lot of vertices... thats not what i'm after. actually, Ian Hubert has a tutorial on that. – Mik van Even May 30 at 15:30
• You can absolutely do that in a shader, in fact you're halfway there! You just have to pixelate the UV coordinates fed to the Image Texture. To do this you should Separate the coordinates, then for each axis use a Modulo node (the second value will affect the size of the pixel) and subtract the result from the original axis: eg. X - (X mod 0.1) will give you ten pixels horizontally. I would use these coordinates to create your discs as well so they match the pixels of your image. – gcs_dev May 30 at 16:01