Announcement

Collapse
No announcement yet.

Ink in Water

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

  • Ink in Water

    hey there,

    I need to create something similar to this for a project:

    https://www.youtube.com/watch?v=0AySkEXqESk

    So far I only did fluid simulations with Phoenix, so I´m not sure where to start here.
    I have some sort of a liquid moving through another liquid and I have set up a particle flow to simulate the behaviour of that liquid moving through a hole in an object.
    All I need now is to somehow use that Pflow as a source to simulate smoke.

    I only have time til the end of this week, so I´d appreciate a little push in the right direction...

  • #2
    So...not to sound too lazy, I think I´m on track, but I have a bunch of questions before I start the detailed simulation.

    My setup:

    I have a Pflow system which I use as an emitter in a PHX_Source. I used a pretty low discharge value (5) and ticked "Temperature" (also quite low with 60, just to add some variety).
    I tickes "Smoke" with default value of 1,0 and Velocity with 1,0 and set it to "Inject" and Time base to "Particle age".

    In my Phoenix Sim I excluded the forces used in the Particle Flow setup and set a low gravity value.

    My questions:

    1. The smoke seems too dense, I guess that is because there is too much emission going on. Should I:
    a) lower the smoke value
    b) lower the discharge value
    c) animate the discharge value. Since the PHX_Source is set to "particle age" I guess I´d have to animate the discharge from frame zero to lets say 100 and then the particles should stop discharging smoke after 100 frames based on their age, right?
    d) increase the value for smoke dissipation.

    2. I also did a quick test render, trying out the trick described in the manual to make the smoke look more detailed by using a peak transparency diagram. In my test it did look more detailed, but I don´t get any transparency in the alpha channel.
    Why?

    3. I f I want to get render elements for the smoke I´d have to render it in geometry mode, right?
    Do I need to apply a special shader then or do I just use the settings ine the rendering tab for Color/transparency?

    Comment


    • #3
      Hello! Sorry for the late reply, and first off - did you check the "Ink in water" example scene: http://docs.chaosgroup.com/display/P...les-Inkinwater

      If you need to get the same effect, it's better to use the same method as this scene - the phx sources generate drag particles which are then rendered using the Point mode of the PHXFoam shader.
      If you are happy with the dynamics of your simulation so far, you could just turn off the smoke and instead emit drag particles which will give you a better ink-in-water look.

      Otherwise,
      1. The visual density of the smoke can be controlled entirely from the rendering option, as you have already done in pt.2. In general, the source settings will help you change the shape and behavior of the fluid.
      2. I cannot reproduce this, could you screenshot me your fire, smoke color and smoke opacity options?
      3. Geometry mode is enough for the render elements, the settings should work the same way as regular Atmosphere rendering. If not - this could be a bug, don't hesitate to call in such case
      Svetlin Nikolov, Ex Phoenix team lead

      Comment


      • #4
        Hey there,

        good thing phoenix is so intuitive and easy to play around with...

        I think I figured out most of this by myself already:

        I changed the transparency curve from "Transparency" to "Opacity" and now I get correct alpha and I can control the look. I´ll have to do some more testing, because the fluid is actually thicker than water (yes. its blood.) and the first look I got by playing around was actually closer to the desired look, so now I´ll have to try and reproduce it...

        I also get correct render elements in geometry mode, works like a charm so far...

        Only thing I´m not sure about: Do I need to check anything so the sim just uses my scene lights?

        I´m currently working on some medical animations and there are always some fluid-in-fluid scenes that I always struggled with, would be great if I could use phoenix for these as well..

        Comment


        • #5
          no need to check anything, the simulation is using by default the scene lights
          ______________________________________________
          VRScans developer

          Comment


          • #6
            Oh, yeah - getting great results the first time around and then trying to go back is a classic, you might wanna try using max's "incremental save" option to save you from this, but you'll need to hardcode a path in the Ouput rollout of phoenix to reuse the cache files after the max file gets copied

            Btw, the geometry mode is slower than the regular atmosphere mode, you could go back to 'atmosphere' while not using the render elements so you won't have to wait.

            The interaction with vray lights should happen automatically, but in case you are using omnies or other 3dsmax lights, make sure to enable their atmosphere shadows, check this for more help: http://docs.chaosgroup.com/display/P...ecolor-General
            Svetlin Nikolov, Ex Phoenix team lead

            Comment


            • #7
              Haha, yeah, I´m usually saving a lot of incremental saves...but mostly not when I´m just "playin´around"...
              I already noticed the increase in render time and since using the zbuffer element of the sim to do some DoF in post doesn´t work too well anyways because of the transparency, I just switched back to atmospheric.
              Until AE is capaple of deep compositing I might have to revert to rendering with DoF enabled for some shots, which is something I´ve been trying to avoid for quite a while now...

              Comment


              • #8
                Hi, any chance to have a sample scene of the ink for Maya?

                Thanks,

                Yannick
                Portfolio: http://www.cgifocus.co.uk

                Comment


                • #9
                  Originally posted by Yannick View Post
                  Hi, any chance to have a sample scene of the ink for Maya?

                  Thanks,

                  Yannick
                  Hi,

                  Here's a sample scene for Maya.

                  Just a quick explanation of the setup:
                  The Source is using 4 cylinders to emit particles (type drag) inside the simulator.
                  Phoenix makes four different particle groups (one group per object) and that is used in the PHXFoam shaders to color each particle group individually.
                  That's how the color variation is done.
                  The rest is just setting up lights and rendering.

                  Keep in mind that in the video above the particle count is huge (60M) and requires a lot disk space (about 400GB).

                  Regards,
                  Tsetso

                  ink_in_water_Maya.zip
                  Tsvetan Milanov
                  Chaos

                  Comment


                  • #10
                    Thank you for the sample scene.
                    Portfolio: http://www.cgifocus.co.uk

                    Comment


                    • #11
                      Hi there,

                      I´m back with a similar project, I didn´t really have time to polish the look last time, so I wanna take another shot at this, especially since its something I have to do quite often for medical animations.
                      The example I posted last time doesn´t actually represent the look I´m after, this video is a much better example:

                      https://youtu.be/gzkB574jivA?t=2m44s

                      The problem is less with the visual appearance now, but rather with the dynamics. I have a tube submerged in water beeing torn open by the pressure of a red liquid (lets say its blood. because it totally is.).
                      I simulated the tearing with cloth and now I´m trying to figure out how to get the dynamics right.

                      I tried playing around with a drag force in the sim, but tweaking it is difficult, since it looks either way too strong or way too weak.
                      I feel like I should be getting it down mostly with playing with the time/scale/gravity values, without worrying about external forces, am I right?

                      So I have two questions:

                      1. How do I increase the detail and make the simulation look less like cigarette smoke and more like a nuke? Just increase the scene scale or the gravity until it looks right?
                      2. The burst of the tube is rather fast, so I need the "liquid" smoke to come out pretty fast and then slow down, like it would in real live under water.
                      I´m currently trying to just animate the emitter, going from 0 to 300 in 2 frames and then back to 20 over the course of 50 frames or so.
                      Is this the correct approach? Or can I animate scene scale, time scale or gravity to achieve this look?

                      Comment


                      • #12
                        And one more issue:

                        3. The emitter doesn´t point downwards, like in the example video, but rather sideways (emitting from the cap of a cylinder with inject mode). If I exclude the tearing object, the smoke doesn´t seem to emit with any velocity. If I include the tearin object, the smoke gets propelled out of the tube way too fast, it took me a while to figure out, that I could decrease the velocity multiplier in the torn object and that would affect that speed.

                        So my question would be: How do I control the speed with which the smoke gets emitted? I increased the velocity multiplier in the Emitter object to 2, but that didn´t do much. Do I need to increase it much more, or are there other parameters I have to change (like temperature? Currently its around 300).

                        4. I´m also not happy with the look yet. there are always those spherical shapes visible (see the attached image), what are those and how do I get rid of them?

                        Click image for larger version

Name:	Blood_Test_01.jpg
Views:	1
Size:	50.9 KB
ID:	863212

                        Comment


                        • #13
                          I switched to buffered mode and that seems to get rid of those shapes. I used the direct symmetric conservation method mainly, because it said in the manual that this works best for stuff like nuklear mushrooms, something that looks close to what I´m after. But I guess I still don´t get what those parameters actually mean...

                          Its always a good idea to go back to the manual though, right now I think I figured out the speed issue: Since I checked the velocity checkbox in the emitter and the emitter isn´t actually moving, I guess thats the reason the smoke doesn´t seem to have any speed while emitting.

                          Comment


                          • #14
                            Hey,

                            So the drag particle approach would not yield the result you are after - it will strictly produce cigarette-style smoke or ink that stretches into strings. To get closer to the reference video, you should use just smoke emission. You should also make sure you are on the latest nightly. There you can find the Conjugate gradient conservation - it will work better for a better rolling of the smoke mass. You should also increase the simple smoke factor in the smoke opacity options, and this should be pretty much it. You should turn off vorticity in order to get a smooth surface and you should up your resolution to at least 30M voxels.

                            Indeed, the velocity on the source is not meant to make the discharge faster. If you want that, then you should switch the source into Inject or Surface Force mode - depending on whether you want your emitter to be a solid obstacle or a non-solid - surface force works only for solids, while both modes work for non-solid objects.

                            This should be pretty much it Give it a shot and make sure you are on a latest nightly.

                            Cheers!
                            Svetlin Nikolov, Ex Phoenix team lead

                            Comment


                            • #15
                              Well, it´s going in the general direction, but still not quite there:

                              1. Whats the difference between "constant color" and "RGB" in the atmosphere render settings? I noticed you used RGB in the nuke example scene, so I ticked that checkbox on my current sim.
                              2. I generally use the opacity curves rather than just simple smoke, I just get better detail this way.
                              3. This is probably just a lighting issue or may be because the background of the smoke sim is also red-ish, like the smoke, but to me it looks like I´m missing shadows in my renderings, the smoke in the nuke example looks denser and just in general more massive than what I get.
                              4. I still don´t know how to deal with the speed. I want the speed to be high, when it bursts out of the tear, but then it needs to slow down immediately.
                              I´m not sure why i can´t get this to work, I´ve tried:

                              A) Keyframing the time scale from 1 to 0.1 over 25 frames.
                              B) Lowering the tear objects phoenix velocity property to 0.1
                              C) Lowering the maximum emission. Right now it goes from 0 to 1500 over 1 frame and back to 20 over 25 frames.

                              Adding the drag force doesn´t seem to do what I want.

                              Any ideas on how to improve the dynamics?

                              Comment

                              Working...
                              X