Announcement

Collapse
No announcement yet.

Large grid loses fidelity

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

  • Large grid loses fidelity

    Using Max 2014, PhoenixFD 2.2.0, I have some animated flying characters (each is a single mesh (multi element) driven by a point cache) which need to disturb surrounding Pflow particles.

    Within Pflow I’m using the PhoenixForce operator to drive the particles, but I’m finding it difficult to get good results with large simulators.

    With a small test I did on one character it seemed to work very well. The character’s wings move the particles up and down creating nice swirling motions.

    When I increased the size of the Pflow source and simulator (to about 3 million cells) to encompass many point cache characters, I can only see particles near the characters get dragged along but their wing flaps only move the particles up and down very slightly. All the swirling motions are gone.

    Perhaps this is happening because with a larger grid the fluid in the centre has less freedom to move (it’s surrounded by more fluid).

    Other than simulating with a smaller grid, which setting(s) will help allow the fluid to move more freely again?

    Thanks
    Graham
    Graham Macfarlane
    3D Studio Max, Vray and motion graphics specialist
    Elyarch Ltd - London UK

  • #2
    i suppose the reason is that the cell size is bigger, compared to the small simulation. try to keep it the same, this should resolve the issue.
    however, i think it would be difficult to do this, because the entire area that must be covered may require huge cell count. this is a well known problem, and in almost all the cases can be avoided using the moving grid technique.

    btw, 3M is a small grid for production scenes, in the most cases grid sizes above 50M cells are used.
    Last edited by Ivaylo Katev; 03-07-2014, 09:44 PM.
    ______________________________________________
    VRScans developer

    Comment


    • #3
      Just in case - please make sure you have Velocity exported from the Output rollout of Phoenix, in order to get correct results.

      If you are not actually visualising the Phoenix simulator itself, and just using its velocity to drive the particles, you might not need such a big resolution as 50M - you will just get more velocity detail with more resolution.

      Did you actually increase the resolution (this will change the Cell Size under the grid rollout), or just made the simulator wider? If the resolution is unchanged, there shouldn't be noticeable difference, but if it's increased, the simulation itself might behave differently - you can check this with the Velocity preview option in the Preview rollout - you can also use the "Draw Just a Slice" and "Detail reduction" to make it more responsive
      Svetlin Nikolov, Ex Phoenix team lead

      Comment


      • #4
        Hi Ivaylo and Svetlin,

        The new "Draw Just a Slice" feature looks very nice. Thanks for pointing it out Svetlin!

        * Grid size:
        I’ve kept the cell size consistent at 0.2cm at all times. I’m only changing the xyz size parameters.

        I found with the test on a single character, that only 100k cells was more than enough detail to drive the particles since they are not dense (think sparse dust motes).

        The flight takes place in slow motion so distance travelled is not great, thus when the simulator encompasses all characters it becomes around 3 million cells.

        Even so, I tried the “moving grid technique” but it didn’t work.
        I switched on the “Inertial forces”, linked the simulator to the character and reduced the simulator size so it was just a little bigger than the character.
        When I simulate this, I see that the particles all start moving inversely to the character motion, so it looks like the character is flying into a strong head wind.


        * Output velocity doesn’t appear to do anything:
        On a small grid for one character, as a test, I simulated with output velocity checked and then again with output velocity unchecked.
        I did a viewport render of the dragged particles for each of these simulations and overlaid them in After effects. They are both pixel perfect identical to each other showing very nice swirling particles.

        Turning on the preview velocity, I can see the velocity field clearly in the viewport but after unchecking the output velocity and re-simulating the velocity field looks, as expected from above, identical.

        I also noticed that the .aur cache files don’t change file size at all between velocity/no velocity output.

        Lastly and most curiously: I’m not using the “initial fill up” in the liquid panel, instead I’m using a script (grid size is 33,83,37)
        Script:
        Code:
        fn OnSimulationBegin=(
        	a_setsystem "core"
        	for x=0 to 33 do (
        	for y=0 to 83 do (
        	for z=0 to 37  do (
        		a_sett x y z 1
        	)
        	)
        	)
        )
        I noticed that if I switch off the above script (still no “initial fill up” either) the resulting dragged particle motion is slightly more turbulent and actually looks better!
        Graham Macfarlane
        3D Studio Max, Vray and motion graphics specialist
        Elyarch Ltd - London UK

        Comment


        • #5
          why you use the script? as i understand, you have simple air simulation, no need to create initial fill up.
          phoenix force operator needs the velocity channel to work. i suppose for some reason there is no velocity. if you enable the velocity preview, can you see it in the grid? try this with frame 13 and 14 , by default frame 14 keeps backup info, this includes the velocity.
          if everything fails, send us the scene
          ______________________________________________
          VRScans developer

          Comment


          • #6
            I have only used PhoenixFD for liquid simulation in the past. I completely forgot that I didn’t need the script for air simulation!

            My backup interval is set to 1 and with velocity preview enabled I can see the fluid velocities forming around the character as it moves. If I switch off the velocity checkbox in the output panel I can still see the velocity preview in the viewport after re-simulating.

            I don’t know what is wrong but I am at least getting the results I need now.
            I’m creating a long thin simulator grid which contains just one character as is travels along its course. I then repeat this for each character and simulate them separately.

            I will also try to start with a fresh simulator, as I think the one I’m using started as the sample pool scene that ships with PhoenixFD. I think it may have been saved with an older version of the plugin too.
            Graham Macfarlane
            3D Studio Max, Vray and motion graphics specialist
            Elyarch Ltd - London UK

            Comment


            • #7
              yes, the backup ignores the velocity checkbox and export it always.
              about the fail of the moving grid method - apparently this is a bug. the phoenix force operator is very old, before the moving grid concept, and is relatively rarely used (the most users prefer to use directly phoenix particles), and it does nod give in account the grid movement, the velocity of the grid is not added to the velocity of the fluid, and that's why you have wrong movement.
              ______________________________________________
              VRScans developer

              Comment


              • #8
                Thank you Ivaylo, everything is clear now.

                I considered using splashes or foam particles from phoenixFD but ended up using Pflow because I wanted a set of particles birthed at the start of the animation rather than being generated during the animation.

                It just occurred to me that I could animate the rate to zero after a few frames are simulated and set the threshold very low but when I tried this I can’t get any splashes or foam to appear at first. The only way the particles appear is when I use initial fill up (less than 100%) but the particles only appear on the liquid surface, not throughout the volume.

                Is there way to create particles (splashes or foam) throughout the fluid at the start of the simulation?
                Graham Macfarlane
                3D Studio Max, Vray and motion graphics specialist
                Elyarch Ltd - London UK

                Comment


                • #9
                  you have to use the simple particles (drag), this is the default particle type released by a source that is set to produce particles. these particles are just dragged, unlike the foam, you can simulate millions of them without significant delaying. the ink in water sample scene is based on them
                  ______________________________________________
                  VRScans developer

                  Comment


                  • #10
                    Thanks Ivaylo,

                    I didn’t consider drag particles from a source because it looked like the particles need to be emitted from something in the grid.

                    Because I need all my particles born throughout the grid at the start, I'm now looking at scripting the filling of the grid with particles.
                    I tried the following code but nothing is created during the simulation.

                    Code:
                    fn OnSimulationBegin=(
                    	xc=this.xc; yc=this.yc; zc=this.zc;
                    	for z=0 to zc do 
                    	for y=0 to yc do 
                    	for x=0 to xc do 
                    	(
                    		A_CreateParticle "groupA" [x, y, z] 0.1 [0, 0, 0]
                    	)
                    )
                    Perhaps it’s a syntax issue?
                    Graham Macfarlane
                    3D Studio Max, Vray and motion graphics specialist
                    Elyarch Ltd - London UK

                    Comment


                    • #11
                      the syntax for position and other three component values in 3ds max is (point3 x y z)
                      but you can avoid the script, create a box, and make it brush mode source (disable the solid option in the phoenix properties), this will create particles in the entire volume of the box.
                      ______________________________________________
                      VRScans developer

                      Comment


                      • #12
                        Thanks Ivaylo,
                        The box method is very nice, and the drag particles are simulating so fast that having a large grid is not a problem!
                        Graham Macfarlane
                        3D Studio Max, Vray and motion graphics specialist
                        Elyarch Ltd - London UK

                        Comment


                        • #13
                          One last thing, hopefully!!
                          I’m setting up the rendering and thought the most appropriate mode for rendering the particles would be point mode in the foam shader (the particles are just supposed to be specs of dust floating in the air).
                          The render time for point mode is excessive (20 minutes or more for 1920x1080 with 10k particles)
                          If I switch to splashes mode (without changing any other settings) the render is done in less than 20 seconds.

                          Is this render behaviour correct?
                          Graham Macfarlane
                          3D Studio Max, Vray and motion graphics specialist
                          Elyarch Ltd - London UK

                          Comment


                          • #14
                            this is not normal, the ship scene that has 5M particles and similar resolution renders one about minute per frame. can isolate the problem in a simple scene using the same cache file and send us the scene and the cache file afterwards?
                            ______________________________________________
                            VRScans developer

                            Comment


                            • #15
                              I’ve stripped down the scene to just the phoenix elements. The problem still persists with the point type particles.

                              Scene and first two cache frame files have been emailed to phoenix@chaosgroup.com

                              There is no rush to look at the problem, I have the splashes mode to fall back on (or even the particle flow approach)

                              Thank you for your help!
                              Graham Macfarlane
                              3D Studio Max, Vray and motion graphics specialist
                              Elyarch Ltd - London UK

                              Comment

                              Working...
                              X