13

Is it possible to change a particle's color to the color of the face/texture part it comes out of in cycles?

I want it to be the color of the face after shading and all that other stuff

Carlo
  • 24,826
  • 2
  • 49
  • 92
user17982
  • 141
  • 1
  • 1
  • 5

1 Answers1

20

Texture coordinates from Dupli

You can make your particles materials inherit the Emitting Object's UV Coordinates to project the texture onto your particles.

You can simply unwrap the parent object (particle emitter in your case) and with the Texture Coordinates node set as in the picture, you'll be able to acces to the coordinates of the UV map of the surface point where the particle is born.

enter image description here

enter image description here

By assigning the same material to the Emitter an Particles and using the texture as a shader mask you'll be able to achieve a perfect correspondecy between the objects:

enter image description here

Above you can see a plane initially emitting diffusive blue particles, than some areas of the surface switch to glossy-pink shading and particles follow this change because the material is the same.

Carlo
  • 24,826
  • 2
  • 49
  • 92
  • Sorry, should have clarified. I want it to be the color of the face after shading and all that other stuff – user17982 Sep 08 '15 at 03:56
  • @user17982 add that your original question – Highstaker Sep 08 '15 at 08:43
  • How would you set up a texture as a shader mask? – user17982 Sep 08 '15 at 21:43
  • By using the Texture's output as Factor's imput of a Mix Shader node. If the texture is RGB convert to BW before or take one channel with Separate RGB node. – Carlo Sep 08 '15 at 22:07
  • Could you upload a blend? I'm still confused – user17982 Sep 08 '15 at 22:17
  • Nice, but why doesn't this work for "Grid" particles? – Coby Randal Aug 02 '18 at 20:54
  • @CobyRandal I don't know, probably it makes sense as UV is related to surface, and not to volume. Think of an object, particles near the faces we expect have the surface color, but what about the inside? We have no clue there. Maybe it worth opening a question about this aspect. – Carlo Aug 02 '18 at 21:42
  • I have a similar issue but it's with a tree trunk model and I want the branch object particles to match the trunk. Problem is I don't know where to add that node setup and it uses an image texture which my material doesn't use how do I solve this? – Stephen Oct 03 '23 at 16:44