0

I want to use the colors/vectors I have baked into an image to move particles. Is it possible to sample the value of a texture on another object?

This is what I thought would work.

enter image description here

So each point in the next image would have the color of nearest texture. But that is not the case.

enter image description here

Is this possible?

TheJeran
  • 2,601
  • 1
  • 8
  • 24

2 Answers2

0

Use the sample nearest surface node to get info from the closest point interpolated. The uv map or attribute (I'd recommend sampling the uv map and using in the shader)

If the points are being generated on the mesh you want the uv from, then you don't need to sample anything. It still would have the uv attribute.

shmuel
  • 1,560
  • 10
0

I realized I was going about this the wrong way. I had to think of it differently. Instead of sampling the texture from a sphere, I need to imagine the particle coordinates as UV coordinates.

Thanks to this answer on a previous question of mine (Shoutout to that wizard) I was able to convert my particle locations into UV coordinates.

I then used the values from two textures I made. Wind direction

enter image description here

and windspeed

enter image description here

and sampled those at the UV coordinates of the particles.

It looks like this

enter image description here

And this permits me to achieve this result

enter image description here

TheJeran
  • 2,601
  • 1
  • 8
  • 24