Announcement

Collapse
No announcement yet.

Adding velocity from smoke simulation to water simulation

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

  • Adding velocity from smoke simulation to water simulation

    I thought that it would be better to continue the topic from facebook on the forum.
    Topic Link: https://www.facebook.com/groups/2337...9870589203296/

    Based on the information from this video, I wanted to make a gust of wind that will move the water.

    I made a blast of smoke simulation with cache velocity grid.
    Simulates water with initial fill up 50% without fill up for ocean. I'd like to blast a part of the simulation.

    There were quite a few issues and questions so I've gathered them all here:

    1. Can simulations have different resolution
    2. Can the simulations differ in the number of steps?
    3. How to set the mapper to add velocity to the water simulation, and not replace it as it works now,
    4. Is it possible to remap and clamp values ​​from the velocity field?
    - I tried to use a node with OSL> range / remapper with 3ds max 2021 but I can't tame it. Let's say I only want to use the blast start where vel is the strongest, and I don't want the rest of the turbulence where velocity is weaker.



  • #2
    Hey,

    I'm attaching a simple scene how a setup similar to yours should work. It is saved for Max 2019, let me know if you need it downsaved for older version.
    In it for the fire and smoke sim, I have enabled the "Only if selected" option in the preview rollout so that it won't obstruct the visibility of the liquid. Then I have set the end sim frame to be 50, while the liquid sim is using 100 frames.

    For this setup to look good you will need to use the Buildup time in the Mapper. Try and experiment with different values to see how it will affect your sim. When it is 0, the Velocity read by the Grid texture will be set immidiately while if you have a value greater than zero the values will be faded over time.

    Going over your questions:

    1. Can you use simulations with diffent resolution and steps per frame - yes, you can. Since the Mapper just reads the already saved velocity data, the grid res (unless it is really low res and there is not enough detail) and the sim steps shouldn't be a problem. In the attached scene the two simulators have different grid res.
    2. How to add velocity instead of replacing it - the Buildup time is the way to go. You can use higher values or animate the value.
    3. Can you remap values for the Velocity? - you can use a regular 3dsMax Output map for that. Just plug your Grid texture as an input for the Output map, then in the Output map settings, choose the RGB Color map. Since the Velocity channel is a vector you can control it with the 3 color curves.
    In the attached scene I have set the Green and Blue channel end points of the curve to 0, while leaving the Red one intact. This way only the velocities moving the smoke forward will be taken into account while the ones moving the liquid up and to the side will be discarded. Using the Output amount you can scale the intensity up or down globally. Just don't forget to plug the Output map in the Mapper so that it can be taken into account.

    Hope this helps

    Attached Files
    Georgi Zhekov
    Phoenix Product Manager
    Chaos

    Comment


    • #3
      Thanks for your help! I will check the file you sent as soon as I have a moment.

      Comment


      • #4
        Your stage is stable and much better than mine

        Unfortunately, I still have the impression that something is wrong with the water simulation when it is under the influence of the mapper. I modified your scene to illustrate what I mean - I added two boxes to the smoke simulation to limit / cut velocity on the sides and raise the entire velocity to 10. For stability, I gave 4 steps and changed the scale slightly. Settings in the screenshots in the attachment.

        51st frame - the mapper works but there is no simulation anymore
        Frame 61 - I turn off the mapper, then you can see how the water starts to simulate "normally"

        15-35 frames you can see how the wave from the box stops unnaturally in the area of the blast effect.

        PS. I also closed the container and turned off Fill up for Ocean


        Click image for larger version  Name:	settings.jpg Views:	0 Size:	293.3 KB ID:	1130051

        Comment


        • #5
          Hmm, could it be that the preview is misleading you as it has the auto-range option enabled?

          What if you disable the auto-range or take a look at the mesh preview or render the result?
          Georgi Zhekov
          Phoenix Product Manager
          Chaos

          Comment


          • #6
            I have the auto-range option turned off
            Here's the scene: https://we.tl/t-EMSvmrwQjf

            Comment


            • #7
              Ahaa I see what you mean now. Thanks for the scene. Your buildup time is really short, so the velocity from the smoke simulation will override the velocities in the liquid sim way too fast. You can increase the buildup time and the wave will behave more naturally.
              Just play around with the buildup time and find the value that works for your shot.

              Cheers!
              Georgi Zhekov
              Phoenix Product Manager
              Chaos

              Comment


              • #8
                Thanks for your help, now i understand what's going on.

                Comment

                Working...
                X