0
$\begingroup$

I am attempting to create lightning storm from a particle system that instances an object. For the material, I the base object has an animated color gradient, animated using the mapping node.

I have successfully instanced the base object on to the particles using the Animation Nodes addon. Now I want to offset the texture animation based on the birth time of the particles. At first I thought I could use the "Cycles Material Output" node, but I can't seem to do anything to the vector mapping node in the material with it.

Left: Instancing Node Tree. Right: Base Object with Animated Gradient

$\endgroup$
2
  • $\begingroup$ I think you should use 'particle info' node in the Cycles side. Cycles rendering will be frame based, not particle based, so I don't think the information you want can be transmitted from AN to Cycles.So the calculation has to be done in Cycles. $\endgroup$
    – lemon
    May 1, 2017 at 6:08
  • $\begingroup$ I was eventually able to solve the problem using the particle info node. However, it can't be hooked up to the mapping node to any effect, so I have to use a Separate XYZ node to isolate the Z vector. $\endgroup$
    – Nahotnoj
    Aug 3, 2017 at 22:46

1 Answer 1

1
$\begingroup$

Try the setVertexColor Node.

It seems not so intuitive at first, but it's the per object iterator way to assign the color to instanced geometry. You need to set the value to 'Col' and then back in the Material Node editor use the Attribute node and put 'Col' (for Name field) or what-have-you there too.

Hope I understood your problem. Seems I ended up here so maybe others will find that useful.

I was actually looking for a color ramp node in animation nodes, but I suppose you could take a different single value in this way and pass it through a ramp too.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .