0
$\begingroup$

I have two objects which are smoke generators and their domains are unfortunately overlapping. Now, when I apply one material to one smoke, it gets applied to the other smoke as well. I have baked both the domains separately and the domains' materials too are different.

What is happening:

What is expected:
enter image description here

The smoke domains have red and blue colours respectively. But they are getting mixed to form a single violet colour.
Why is this happening and how do I stop this from happening?

My .blend file:

$\endgroup$
3
  • $\begingroup$ I would say you don't need two domains for such result. imgur.com/8NeReP4 Seems to me enough to set color for each Flow object ... for more see blender.stackexchange.com/a/228710/2214 $\endgroup$
    – vklidu
    Commented Jul 9, 2021 at 13:40
  • $\begingroup$ @vklidu, thank you so much!! This worked perfectly fine! $\endgroup$
    – CoolCoder
    Commented Jul 10, 2021 at 1:16
  • $\begingroup$ @CoolCoder I've extended my answer to include the one domain solution and explain how it works a little further. Nonetheless I'm providing the two domain solution for others if there really is a need for separate domains. $\endgroup$ Commented Jul 10, 2021 at 8:16

1 Answer 1

2
$\begingroup$

The following answer is supposing that you need two separate domains for whatever reason, different smoke resolutions or behaviours, different effectors etc. If you only need two different smoke colors, you can achieve this with one domain, I'll give a simple answer below.

Two domains: Since all spheres are Flow objects, the smoke for all of them gets calculated by both domains. So there are 8 spheres simulated and get a red material, and in the same location the same 8 spheres get simulated and rendered with a blue material - so mixed together the smoke is violet.

To tell the domains which spheres they should simulate and which not, you can use Collections. In the domain settings you can select which collections should be used for Flow and which for Effectors. So the spheres that should emit red smoke have to be in one collection, the spheres for blue smoke in another - and you select them in the domain settings.

And you should specify separate paths for the caches, because otherwise simulating one domain might overwrite the other domain's data.

Another thing I noticed is that in one smoke material you've plugged the Density from the Volume Info into Emission Strength, this creates white emission which also mixes with your smoke color.

enter image description here

One domain: To use different colors on different flow objects, you can set them directly in the Flow Settings under Smoke Color. To get them rendered you can either set the Color Attribute "color" in the Principled Volume with the node's color set to white, or leave the attribute value empty and plug the Color output of the Volume Info node into the Color input of the Principled Volume.

smoke colors

With one domain you have to keep a few things in mind:

  1. The Smoke Color set in the flow objects will be baked in the simulation and cannot be changed in the material afterwards.
  2. You can either use the Color Attribute "color" in the Principled Volume node or plug the Color output from the Volume Info node into the Color input of the Principled Volume node. If you are using both, the color input and attribute, this will result in multiplying both colors which might give unwanted color. This doesn't matter much in your case where the RGB channels each have either 0 or 1 as value, but for any other values this will make a difference.
  3. This multiplying of colors also takes places if you only use the attribute "color" without the Volume Info, in this case the flow object's Smoke Color will be multiplied by the Color in the Principled Volume node - which is why you should set it to full white instead of the default grey, as @vklidu does in his example, or otherwise the smoke color gets darkened (or colored differently if you set other colors than greyscales).
  4. Since colors can be multiplied, this surely is a way smoke colors can be changed after baking simulation other than stated under 1., but it is limited and always based on the original baked smoke colors.
$\endgroup$
3
  • $\begingroup$ @vklidu Of course you're right :) But I'll have to edit my answer anyway since it describes how to do it when you need to have two domains, which the question here doesn't require. $\endgroup$ Commented Jul 10, 2021 at 6:47
  • $\begingroup$ @vklidu I just thought about explaining what to care about when using one domain - maybe I'll add that as a comment below yours. $\endgroup$ Commented Jul 10, 2021 at 7:20
  • 1
    $\begingroup$ Yes, I was going to extend it... maybe I'll delete the comments under yours and enter it in the answer. $\endgroup$ Commented Jul 10, 2021 at 7:35

You must log in to answer this question.

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