Announcement

Collapse
No announcement yet.

Foam is dropping below water surface outside of sim

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

  • Foam is dropping below water surface outside of sim

    ​Attached image shows where the foam drops below the surface of the water...there is a distinct colour change right where the sim stops. Can this be resolved? I'm a bit of a noob with phoenixfd and oceans.
    Attached Files
    Regards

    Steve

    My Portfolio

  • #2
    you could try to render only the foam (hiding the sea) to see if issue is still there. Also, you could try to disable the displacement of sea to see what happens.
    www.mirage-cg.com

    Comment


    • #3
      Also, try the Vertical Offset option in the Particle Shader.
      Svetlin Nikolov, Ex Lead Phoenix developer

      Comment


      • #4
        So, this is what it looks like with no refraction and no displacement. There is a very obvious cut where the sim ends. The foam actually continues much further than where I've drawn the line indicating the sim end.

        Wouldn't affecting the vertical offset change all the foam meaning some one be floating above the ocean?

        is this a limitation of Phoenix?
        Attached Files
        Regards

        Steve

        My Portfolio

        Comment


        • #5
          So I've had to adjust the vertical offset to 0.24m. Now the foam outside the sim is visible but now I have foam sitting 0.24m above the ocean in the sim area.
          Regards

          Steve

          My Portfolio

          Comment


          • #6
            Yes, if the foam outside the simulator matches the foam inside it, it would be just by chance. Note that outside the simulator many of the fluid solver processes do not happen - they can't because this area is not simulated. So foam would rise to the ocean fillup level, but this might not be the level that the liquid actually reaches during simulation, so it might still be below the Ocean Level % option. The only way to make completely sure that foam would not end up under the liquid surface when it exists the simulator, is to make the simulator long enough so the foam does not exit it. If you are worried about increasing the grid resolution, try a more shallow simulator.
            Svetlin Nikolov, Ex Lead Phoenix developer

            Comment


            • #7
              Thanks. I thought that might be the case with having to extend the simulator. Okay, thanks for the info
              Regards

              Steve

              My Portfolio

              Comment


              • #8
                I should be able to rework the Vertical Offset to affect only the outside of the selected Liquid Simulator in the particle shader - this might be a solution for such problems but I hope it won't make the foam move in a fake-looking way....
                Svetlin Nikolov, Ex Lead Phoenix developer

                Comment


                • #9
                  I guess maybe instead of a sudden vertical offset for items outside the sim you could have a parameter to gradually increase the offset over a distance that can encroach on the sim itself?
                  Regards

                  Steve

                  My Portfolio

                  Comment


                  • #10
                    Oh yes, it has to gradually change but since this would be an effect of the simulation's foam rising speed, it might not always look well... Will think about it more.
                    Svetlin Nikolov, Ex Lead Phoenix developer

                    Comment


                    • #11
                      Hey, so in Tuesday's nightlies there will be a hidden script option the particle shader which can change the behavior of the vertical offset.

                      You gotta select the Particle Shader and in the maxscript listener type:
                      $.vertoffscond = 0 - this is the default behavior of the Vertical Offset
                      $.vertoffscond = 1 - a new method that offsets only the particles outside the linked Liquid Simulator with some falloff near the simulator edges.
                      $.vertoffscond = 2 - another new method that offsets only the particles outside the linked Liquid Simulator and also squashes them forcefully to the Ocean Level of the Liquid Simulator, before applying the vertical offset. Using this, there can't be any flying particles in the air outside the simulator - all particles will be forced to the ocean level and if they are below or above, you can adjust this using the vertical offset option.

                      Both methods are not perfect and I got some mixed results - you can get the particles inside the simulator looking like the particles outside it, but right at the border there might be a visible particle streak.

                      Please, if possible, check these two methods with your scene, also adjusting the vertical offset and ping me with the results - if any of the two is working fine, I will expose it in the GUI for Phoenix for Max and Maya, otherwise I will go back to the drawing board

                      Cheers!
                      Svetlin Nikolov, Ex Lead Phoenix developer

                      Comment


                      • #12
                        Hey, just checking if you've had the opportunity to try this out?
                        Svetlin Nikolov, Ex Lead Phoenix developer

                        Comment


                        • #13
                          Hey there. That's amazing work. I've yet to try it out because I'm working on a live project currently. I'll give it a go once I get the chance
                          Regards

                          Steve

                          My Portfolio

                          Comment


                          • #14
                            Hooray!
                            Svetlin Nikolov, Ex Lead Phoenix developer

                            Comment

                            Working...
                            X