Announcement

Collapse
No announcement yet.

Smoke inside a Water Mesh How to do?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Smoke inside a Water Mesh How to do?

    Hi,
    i try to do a dirty Water Simulation where i would like to colour the Water with Smoke. The Smoke should be created "inside" the Water Mesh with the same Speed and Behaviour as the Fluid Particles. I know that i can create a second fire/smoke simulator at the same Origin as the Fluid Simulator and read the Fluids .aur Files. Do i have to read them in the Input Path and just leave the Output Path as it is? Do i have to exclude the smoke in the water simulator? How do i do that? The Problem is i can't render the Water Mesh with the Smoke inside. It only renders the Mesh of the Water. Could someone please help me? I need an exact step by step Tutorial.

    cheers David
    Pixelschmiede GmbH
    www.pixelschmiede.ch

  • #2
    Yup, you can just read the data into a second simulator. You definitely should exclude the second sim from the scene interaction rollout's list of the first sim if you intent to sim again with the first one.

    How does your setup look so far? There shouldn't be a problem in rendering both a mesh and smoke together, so we'll help you figure it out, even without a step by step tutorial
    Svetlin Nikolov, Ex Phoenix team lead

    Comment


    • #3
      Thank you for your answer. I tried again working on this Scene, but i don't get it to work properly. Is it ok, if i upload the Test Scene and you look at it and maybe can explain me what i have done wrong. This would be superb. I have to move on, because i need this for a Project i am working on.
      Cheers.
      Attached Files
      Pixelschmiede GmbH
      www.pixelschmiede.ch

      Comment


      • #4
        Got the scene, starting looking at it right now...
        Svetlin Nikolov, Ex Phoenix team lead

        Comment


        • #5
          Okay, so after my hard disk broke down and I also had to endure a Windows update, I'm back running

          In order to get this setup to work, you need to understand the Phoenix cache channel types.

          So you have a liquid simulation in the simulator called "Water".

          When you go to the Simulation rollout, you can see what channels are simulated in the loaded cache for the current timeline frame. For example at frame 80 I have:
          [GRID: 1 960 000 cells, 140x140x100]
          - Liquid/Temperature (0.00 : 1.00)
          - RGB
          - Velocity (0.00 : 413.57)
          [PARTICLES: 22 674 total]
          - Liquid: 22 674 (Pos,Vel,Age,RGB,ID)
          - Foam: 0
          - Splashes: 0
          - Mist: 0
          - WetMap: 0


          You have 3 grid channels and 5 particle systems. The grid channels are Velocity, RGB, and Liquid which is in the same channel as the fire/smoke's Temperature.

          So you have a second simulator for rendering the liquid data, called "Smoke".
          You load the data from the liquid simulator - you can do that in two ways:
          1. Either directly browse to the caches of "Water" from the Input rollout.
          2. Or use the magic macro for the Input path:
          $(same_as_output) Water

          ^ this will be a more portable way to reuse caches and will work even if you copy the scene to a different directory later.

          When a simulator has loaded cache data, all other simulators see it as a mesh. We have prepared a docs page explaining all possible ways for simulators to interact with one another: https://docs.chaosgroup.com/display/...een+Simulators
          Since we don't want the simulation of the "Water" sim to interact with the loaded caches of "Smoke", we exclude "Smoke" from the Scene Interaction rollout of "Water".

          Once the cache are loaded in the "Smoke" simulator, we want to render them as a volume.
          We don't want any Fire, so under the Volumetric Options for Fire, we set Based On to Disabled.

          Now we can map the smoke color and the smoke opacity to the data from the "Water" simulator.

          In the caches we have 3 channels, so we should choose which one to use for the smoke density/opacity. RGB will be weird if we use it as density, Velocity/Speed will actually be quite cool, but the simplest way would be to get the liquid density from the Liquid/Temperature channel.

          This is why under Smoke Opacity, you should pick Temperature.

          Now you have to be aware of the channel ranges and adjust the opacity curve. Right now it goes from 0 to 2000 because by default it's ready to shade the Fire/Smoke simulation's temperature in Kelvins which goes up to 2000 or more.
          However, in this case you have the liquid density, which goes from 0 to 1 - you can check this in the Simulation rollout's cache file content box, which I also pasted above.
          You can also check the range in the opacity curve - it's marked a a teal/green zone. In this it would be very thin.

          What you can do for a start would be to edit the 2 points of the curve. Set the lower left one to X/Y = 0/0, and the top right one to 0/1.

          Render it out - the "Smoke" simulator will now render a blue volume where the liquid is. Since you've mapped the Smoke Color to the Smoke channel, but such channel does not exist in the cache, it's data will be read as zeroes. The color gradient maps the data of 0 to a blue color.

          You could experiment and map the color or the opacity to the Temperature/Liquid channel, or to the Speed channel which is the length of the Velocity channel, or you can also keep the color constant.

          Hope this helps clarify what is going on in this setup
          Cheers!
          Svetlin Nikolov, Ex Phoenix team lead

          Comment


          • #6
            Hi,
            Wow, thank you for you're Explanation. I will dive deep into it if time allows me. What i already tried is the thing with the adjusting of the 2 points of the curve, which gave me a start to work with. The Thing is, which i have not considered, that now every Particle get's a volume around it, which is difficult to adjust. I will now try to simulate the Smoke into the Water's Mesh with the Confine Geometry method. Is there something imporatnt to consider?
            Cheers David
            Pixelschmiede GmbH
            www.pixelschmiede.ch

            Comment


            • #7
              I got a report. Isn't it possible to use the Mesh of the Water Simulation as a Confine Geometry or as a Cutter Geometry? If i try to pick the Simulator there is the Report "Can't Make a Circular Reference" I understand what this means but how can i avoid that or do it the right way?
              Cheers
              Pixelschmiede GmbH
              www.pixelschmiede.ch

              Comment


              • #8
                Ahh, this happens because the smoke sim is in the exclude list of the water sim - this is the link pointing from the water to the smoke simulator that prevents you from creating a link in the opposite direction. You could cheat it by switching the scene interaction from exclude to include more and including all sources, emitters and obstacles. But there is an easier way - remove the smoke sim from the exclude list and just click Exclude Fire/Smoke Sims

                Btw, a completely different approach would be to not use a second simulator, but instead to attach a particle shader in Fog mode to the liquid particles. This would again use the volume shader, but you would be limited to very few options to control it.
                Svetlin Nikolov, Ex Phoenix team lead

                Comment


                • #9
                  Hi, i know that i can use the Fog Mode from the Particle Shader, but, yes there are very limited options to control it, which is to bad. it would be nice if we get a more controllable Fog Mode with as i already mentioned mapping Controls. But for now i try to realize what yo wrote to me. I stumble across a Problem, which is, i can't realize that the Water Simulation, which i first simulated, has freely flowing Smoke in it. I read the Docs Part with the interacting Simulators, but i can't get it to work as i wish. I know now how to read the cached Files of the Water Simulator and how to shade them, but it looks as every Particle has something like a Volume around it. Do you know what i mean? would like to use the Confine Geometry and Cutter Geometry Feature. Important is, that i first simulate the Water, after that i don't read any cached Files, rather i simulate the Smoke into the Water's moving Mesh which cuts the Smoke. I don't know how to do it?
                  Thank you in advance
                  Pixelschmiede GmbH
                  www.pixelschmiede.ch

                  Comment


                  • #10
                    Hey, can you show me how the volume around the particle looks?
                    Svetlin Nikolov, Ex Phoenix team lead

                    Comment


                    • #11
                      Hi, yes sure, i will post a Picture as soon as i rendered it out after work.
                      Pixelschmiede GmbH
                      www.pixelschmiede.ch

                      Comment


                      • #12
                        it's me again, ok here are two Pictures. The First one shows only the rendered Smoke. The Second Picture with the Water Mesh around it shows those Artifacts or Volumes i meant. How can i avoid those Artifacts? I don't want to soften the Smoke. It should look like some kind of Sand. It's hard to explain what i mean. Doesn't ever Particle which was simulated in the Water Simulator got some Volume or something around it? What i also would like to try is that the smoke looks it was simulated only with the smoke simulator, but moves inside the Water's Mesh.
                        Cheers.
                        Attached Files
                        Pixelschmiede GmbH
                        www.pixelschmiede.ch

                        Comment


                        • #13
                          Yes, most particle have sizes - Foam, Splash, Mist, Wetmap - they all have a Size channel. But the Liquid particles don't need sizes because their size is determined by the FLIP grid resolution.

                          Can you tell me more about the render settings of the first and the second picture? Is the first one using a simulator to load the temperature, and is the second one using a particle shader in Fog mode?
                          Svetlin Nikolov, Ex Phoenix team lead

                          Comment


                          • #14
                            I think i found out, what the Problem is. In the Water Material i enabled "Refraction Glossiness. This causes the Voxel's little Boxes to get visible, even if i change the Sampler Type to "Spherical" in the Rendering Rollout of the Smoke Simulator. This happens already if i change the Refraction Glossiness to 0,99. Should this be like this? I would like to use Refraction Glossiness because it's an essential Thing for Water/Mud. I attach the zipped Scene File if you would like to look at it?

                            The First Picture, which is only the Smoke rendered i used the Input Path: $(same_as_output) Water. Therefore it renders the simulated Particles of the Water Simulator. In the Smoke Color i used "Constant Color. Scattering is on Raytraced GI only. The Volume Light Cache i turned off. In the Smoke Opacity Rollout i enabled based on "Temperature" in the Texture i used a Noise Map. in the Opacity Diagram, Point one is on 0.00, 0,00. The Second Point is on 1,00, 1,00 with a slight downward pointing Curve.

                            The Second Picture is a normal Fluid Simulation, as i always do. There is no Particle Shader with enabled Fog Mode.

                            Cheers.
                            Pixelschmiede GmbH
                            www.pixelschmiede.ch

                            Comment


                            • #15
                              Hmm, something indeed sounds suspicious - if possible, can you send over the two setups?

                              Thanks so much!
                              Svetlin Nikolov, Ex Phoenix team lead

                              Comment

                              Working...
                              X