This is a very special question i'd imagine ;)

I have a base shape, that uses a particle system with pyramids on it.

enter image description here

Im triyng to add a gradient to the pyramid-spikes.

This efffect by itself can be easily done in a material for the particle.

enter image description here enter image description here

BUT: The fade on the pyramids will only be a part of a more complex material for the whole shape.

enter image description here

Currently i convert the particles into a mesh and then join them into one object to achieve this.

I currently have no way to achieve the gradient on each pyramid, but also have control over the material of the whole shape.

So im emulating it with this node setup, someone shared with me. enter image description here

But this only works partially, since i dont have a sperical shape.

Any ideas on how to solve this problem are well appreciated.

Thanks in advance :)

  • 1
    $\begingroup$ dynamic paint proximity to the emitter mesh might be worth a try. $\endgroup$ – richard Aug 18 '18 at 20:41
  • 1
    $\begingroup$ What effect are you actually looking for on the whole shape,( ignoring the particles, for a moment,) that you're only partially achieving with the gradient setup that you show here? $\endgroup$ – Robin Betts Aug 19 '18 at 9:35
  • $\begingroup$ i will add a iridescent effect to the whole thing sort of like this: 78.media.tumblr.com/02780d0cb02185243e6fe4df2602041f/… $\endgroup$ – Jens Clar Aug 19 '18 at 17:52

Gradient texture upon Generate coordinates

To assign a gradient texture to the single particle object you can use the built-in node available for cycles. You can control the gradient with a color ramp node as well.

The tricky part in your setup is that you would like to access the data of a different mesh that doesn't belong to the particle. One possible way is to take advantage of the Object option in the Texture Coordinate node.

You didn't share your setup for the colored shader (the one you show with particles baked and joined), so I'll assume by guessing that you are using the Generate texture coordinate of the object. We can't access that data, but we can try to transform the Object's texture coordinate from an empty object.

In the following example I'm using the Mapping node to translate the empty's (which was created in the same location of the object's origin) coordinates.

enter image description here

An altenative would be to simply move the empty in one of the corner of the object's bounding box and scale it appropriately:

enter image description here

The following image sequence is showing the node in action. The shape on the right is the mesh with particles baked with a shader showing the Generated coordinates to use as reference.

enter image description here

Note: accessing data from other objects may not be possible for all the attributes. Object's texture from another object can only provide location, rotation and scale of the object.

  • $\begingroup$ The "from dubli" looks very very promising. i'll try it out and get back with results. Thanks so much already. $\endgroup$ – Jens Clar Aug 20 '18 at 10:27
  • $\begingroup$ It's just a trick that works for this case, don't expect to ba able to do thing much different than what shown. Also it is probably not necessary the "From Dupli" option, you could get the same effect by playing with the vectors... it's just easier to understand in my opinion. $\endgroup$ – Carlo Aug 20 '18 at 10:31
  • $\begingroup$ I have no idea what im doing wrong but it wont work. i cant get the from dubli to work. How do you get the particle-material onto the particles ? Cause the material setting in the particle is greyed out as soon as i use objects or a group. You write that on the left has the particles applied ? $\endgroup$ – Jens Clar Aug 23 '18 at 0:57
  • $\begingroup$ Sorry, I meant "on the right", the one who stays still. I edted the answer. The material is applied to the partcle object that ios being duplicated (the little pyramid on the top in this case, you cen see it also in the image sequence). $\endgroup$ – Carlo Aug 23 '18 at 7:57
  • $\begingroup$ ok thanks for clearing that up. But i have no idea how to get the from dubli to work. I even tried a very basic test in a new file. Could you share the blendfile with me ? $\endgroup$ – Jens Clar Aug 23 '18 at 21:25

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.