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. enter image description here I have this setup, also with math nodes. made a grid of dots enter image description here This is my set up of nodes enter image description here

  • $\begingroup$ so what is it you want to achieve? Make the dots the color of your logo? $\endgroup$ – Frederik Steinmetz May 30 at 15:12
  • $\begingroup$ yes! and when the image texture 'overlays' even just half... then the dot still has to be filled full. $\endgroup$ – 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.

enter image description here

I hope this helps.

| improve this answer | |
  • $\begingroup$ Nicely done, I was being too hasty. $\endgroup$ – Frederik Steinmetz May 30 at 17:32
  • $\begingroup$ .. 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. $\endgroup$ – Robin Betts May 30 at 21:39
  • 1
    $\begingroup$ I always split vectors if I'm only using two components. It saves unnecessary calculations. Force of habit. $\endgroup$ – gcs_dev May 30 at 22:07
  • $\begingroup$ Ahh.. I see! That makes sense. $\endgroup$ – Robin Betts May 30 at 22:39
  • $\begingroup$ @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. $\endgroup$ – 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.

| improve this answer | |
  • $\begingroup$ 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. $\endgroup$ – Mik van Even May 30 at 15:30
  • $\begingroup$ 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. $\endgroup$ – gcs_dev May 30 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.