Emmision channel in MagmaFlow

Hi everyone,
I’m new to krakatoa,I am following the tutorial in user manual: “Channel Saving Lighting and Relighting”:
software.primefocusworld.com/sof … saving.php

it’s all ok until we added ambient ligth and we want to add the green color only to particles that were lit by either one (or both) lights. my question is: 1 ) how to the magnitude channel influence the emmision channel,if magnitude channel outputs the length of a vector ?
2) the emmision channel is interpreted as a vector like this?: [1,0,1] because the particles are illuminated by red and blue lights. if yes, Why if i replace the emmision channel with vector like this ?: [1,0,1] the result changes?
I hope that I explained
thanks


Yes, nice explanation.

Here is the deal: The Emission channel does not simply contain [1,0,1], it contains values between [0,0,0] and [1,0,1] depending on the illumination of the particle. Some particles in shadow are quite darker than those illuminated by one or the other light. The idea of the first example you posted is that the green color is added proportionally to that incoming light intensity stored during the saving of the particles. So if you have a value like [0.123,0.0,0.234], obviously the contribution of the red light is about half of the contribution of the blue light, but the Magnitude (Length) of the Vector is a lot less than 1.0, so the amount of Green added to the color will be a lot less. The sub-topic is called “Illumination Tinting” because it adds green only where there is already red or blue, but not where there is neither.

In your second flow though, you are passing the magnitude of [1,0,1] to ALL particles, which adds the green color uniformly to all particles. Thus, it would be equivalent to just adding Green to all particles’ Emission color without multiplying by anything. [1,0,1] is a static uniform value, while Emission is quite variable from particle to particle. Since the Magnitude of [1,0,1] is even higher than 1.0, you are even adding more green than the Input 3 is suggesting. So the second example you posted is equivalent to the “Ambient Light Color” example I posted on the same page, just using a value a bit above [0,1,0].

Or in MAXScript,

[0,0.755396,0] * length [1,0,1] → [0,1.06829,0]

So you are adding a uniform green value of [0,1.06829,0] and you get green particles, as expected.

Hope this explains it!

Thank you very much Bobo