Announcement

Collapse
No announcement yet.

Physical Water Surface

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

    I've just noticed that the support email address and the link to this forum thread have been missing for a while from the Marketplace description page of Physical Water Surface. It's fixed now.
    Use the support email address if you have any questions or issues before or after purchase to get personal support from me!

    Comment


      Here's how I masked out water, works reasonably well:

      1. Enable distance fields in project settings>rendering.
      2. Set your water material to masked and plug a DistanceToNearestSurface node into the opacity mask input.
      3. Add a mesh which covers the area you want to mask out, disable collision and apply a completely translucent material.
      Click image for larger version

Name:	watermasked.JPG
Views:	1
Size:	46.5 KB
ID:	1126805
      Attached Files
      Last edited by honaj; 04-23-2017, 03:36 PM.

      Comment


        Thank you for this information. Could you please explain your method in a bit more detail? I'm not sure if I'm understanding correctly what I'm seeing in your screenshot. Did you create a cube mesh, and inside the cube the water material is made transparent?
        Would this method also work for boats with a curved hull, and also for boats that are moving up and down and rotating (because of buoyancy)?

        Originally posted by honaj View Post
        Here's how I masked out water, works reasonably well:

        1. Enable distance fields in project settings>rendering.
        2. Set your water material to masked and plug a DistanceToNearestSurface node into the opacity mask input.
        3. Add a mesh which covers the area you want to mask out, disable collision and apply a completely translucent material.

        Comment


          Hey!
          I'm having some issues with my project and PWS, it works fine in demo level but when I add the WaterSettings+WaterPlane to my own level, on spawn the objects fly high up in the sky until they eventually land (and then works as intended). This also happens with the example boat if I drag it into my level, any pointers?
          Engine Plugins
          SteamCore:: | SteamCore::Web | Foliage Plugin | ScreenFade Plugin | EventDispatcher | Thumbnailer
          Blueprint Systems
          Simple Building System | Farming System

          Comment


            Originally posted by huklen View Post
            Hey!
            I'm having some issues with my project and PWS, it works fine in demo level but when I add the WaterSettings+WaterPlane to my own level, on spawn the objects fly high up in the sky until they eventually land (and then works as intended). This also happens with the example boat if I drag it into my level, any pointers?
            Are you spawning the objects above or below the water surface?

            Comment


              Originally posted by Theokoles View Post
              Are you spawning the objects above or below the water surface?
              I have tried both and it behaves the same in both instances, weird thing is that my floating object works fine in your demo level, but in my own level both your example boat and my object behaves the same (flies up in the sky).

              EDIT:
              I just realized the issue is that my water plane is not at Z:0 in the world, it's at -6000, when I moved it up to Z:0 it works as intended. Is there any way around this perhaps?
              Last edited by huklen; 05-11-2017, 02:37 PM.
              Engine Plugins
              SteamCore:: | SteamCore::Web | Foliage Plugin | ScreenFade Plugin | EventDispatcher | Thumbnailer
              Blueprint Systems
              Simple Building System | Farming System

              Comment


                Originally posted by huklen View Post
                I have tried both and it behaves the same in both instances, weird thing is that my floating object works fine in your demo level, but in my own level both your example boat and my object behaves the same (flies up in the sky).

                EDIT:
                I just realized the issue is that my water plane is not at Z:0 in the world, it's at -6000, when I moved it up to Z:0 it works as intended. Is there any way around this perhaps?
                I think the reason for this problem is that in the first frame when the object is spawned, the buoyancy equations are initialized and this goes wrong when the z coordinate is not very close to zero. The initialization is a bit tricky because buoyancy is a recursive algorithm, it uses some values calculated in the last frame. In the frame when the object is spawned, there is no value from the last frame and the large force on the objects that shots them up in the sky seems to be a side effect of that. I will fix this in the next update. Does it work for you to put the water plate at Z=0 for now?
                And can you confirm that the objects are floating normally on the water surface after they fall down again from the sky? This should be the case because detection of the Z coordinate of the water plane is already built in.

                Comment


                  Originally posted by Theokoles View Post
                  I think the reason for this problem is that in the first frame when the object is spawned, the buoyancy equations are initialized and this goes wrong when the z coordinate is not very close to zero. The initialization is a bit tricky because buoyancy is a recursive algorithm, it uses some values calculated in the last frame. In the frame when the object is spawned, there is no value from the last frame and the large force on the objects that shots them up in the sky seems to be a side effect of that. I will fix this in the next update. Does it work for you to put the water plate at Z=0 for now?
                  And can you confirm that the objects are floating normally on the water surface after they fall down again from the sky? This should be the case because detection of the Z coordinate of the water plane is already built in.
                  Yes I ended up moving all my world objects up to match the waterplane at Z=0 so all is good now.

                  I can confirm that the objects behave normally once they settle down, sometimes they fly up in the sky twice (first on spawn, once again when they touch the waterplane) but will eventually behave normally, kind of weird to explain.

                  EDIT:
                  One more issue I just remembered was when setting Follow Camera=true in my game, when switching from Third person to First person (this simply moves the Spring Arm to 0 for first person) my FPS would be cut in half, I ended up moving the water plane Scale and Position to a timer based event instead of tick
                  Last edited by huklen; 05-12-2017, 05:22 PM.
                  Engine Plugins
                  SteamCore:: | SteamCore::Web | Foliage Plugin | ScreenFade Plugin | EventDispatcher | Thumbnailer
                  Blueprint Systems
                  Simple Building System | Farming System

                  Comment


                    Thanks for reporting this, I will try to reproduce these issues. I'll let you know what I find.

                    Comment


                      Physical Water Surface is compatible with the newest engine version 4.16. Please let me know if you're having any issues with this version!

                      Comment


                        Hello Teokoles

                        first of all, thank you for the great water :-)

                        I am stuck on one thing, though: I can not get the physical water to receive shadows from static mesh objects (e.g. a static mesh ship, not using buoyancy) using static lighting.

                        A stationary directional light will produce shadows, but the shadows disappear again after building the lighting. Only when I move the static mesh with the widget the shadow appears, but disappears again after building the lighting.
                        A movable directional light creates shadows as I'd like them.

                        But I can't use dynamic lighting due to performance reasons.

                        Is there a way to bake the shadows onto the physical water with static lights?

                        Comment


                          Originally posted by Constant View Post
                          Hello Teokoles

                          first of all, thank you for the great water :-)

                          I am stuck on one thing, though: I can not get the physical water to receive shadows from static mesh objects (e.g. a static mesh ship, not using buoyancy) using static lighting.

                          A stationary directional light will produce shadows, but the shadows disappear again after building the lighting. Only when I move the static mesh with the widget the shadow appears, but disappears again after building the lighting.
                          A movable directional light creates shadows as I'd like them.

                          But I can't use dynamic lighting due to performance reasons.

                          Is there a way to bake the shadows onto the physical water with static lights?
                          Hi, I'll try to help with your problem, I think I know how to fix it.

                          Comment


                            That would be awesome, looking forward to your findings!

                            Thanks

                            Comment


                              Originally posted by Constant View Post
                              I am stuck on one thing, though: I can not get the physical water to receive shadows from static mesh objects (e.g. a static mesh ship, not using buoyancy) using static lighting.
                              The shadow needs to move on the water surface, because the water surface is always moving. Correct me if I'm wrong, but I think it might be impossible to work with static lighting here. It's useless to bake a shadow on the water surface mesh, because the mesh is displaced constantly in all three dimensions. Even if the light and the object are not moving, the location of the shadow in the water is always changing because of that.

                              Comment


                                That makes sense, thank you for your reply.

                                However, from my point of view there is sooo much possible with the Engine that I would not have been surprised if it had actually been possible to get static shadows onto the water :-)

                                Comment

                                Working...
                                X