Announcement

Collapse
No announcement yet.

Under water / above water split view, is this possible?

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

    #16
    Originally posted by RyanB View Post
    If you read my post, I was pretty clear that I am still preparing it and its a lot of work. Sometime in the next week or two is my goal.
    Sorry, my English is not good! Anyway, thanks your reply

    Comment


      #17
      Originally posted by RyanB View Post
      If you read my post, I was pretty clear that I am still preparing it and its a lot of work. Sometime in the next week or two is my goal.
      Awesome that you're putting this together. Have these been released yet? If so where can they be (or will they be in the future) downloadable from? Thanks.

      Comment


        #18
        Originally posted by RyanB View Post
        I did that material by using the world position of the near clip plane. Since doing screenpos-> transform caused a crash I had to create a custom node to do it. I have an image from my twitter feed where somebody asked this same question:

        [ATTACH=CONFIG]134062[/ATTACH]

        Note that the 10 is hardcoded to match the default near clip plane. In VR editor the near clip plane changes based on world to meters scale. There is a way to access the frame's actual near clip if you need that but I will have to search for it later.

        No atmospheric fog. Just manual shader fog using scene depth.
        Would It be possible to have a screen grab of the material since it's not in the GDC package.

        Thanks

        EDIT:
        This is what I've got so far but I don't know how to setup a Blueprint that would automatically input the world position of the water plane and can't figure out how to make the water line follow the mesh of the water plane.
        Click image for larger version

Name:	edgeTest.jpg
Views:	1
Size:	250.9 KB
ID:	1128192
        Last edited by XavierPlaymind; 05-17-2017, 06:26 PM.

        Comment


          #19
          Finally I don't know why I didn't figure this out yesterday but no need for a complicated pp here's the solution if anyone was wondering. Thanks to Ryan.
          Click image for larger version

Name:	waterintersecting.jpg
Views:	1
Size:	499.3 KB
ID:	1128245

          Comment


            #20
            That will work for basic tranlucency, but for the extinction you really want to multiply the scene color by the extinction color. I originally was doing that via a mesh material as above, but the engineers have reworked the translucency as of ~4.16 so that scene texture does not include any other translucency in it which makes modulative effects tricky. That is why I have suggested it as a post process but either can work depending on what you need.

            To get the PP working, you just need to sample your displacement using the same screen to worldposition function and offset the Z of the result by whatever your wave displacement is.
            Ryan Brucks
            Principal Technical Artist, Epic Games

            Comment


              #21
              Thanks! I'll look into how to make it work with a blueprint I've still got a lot to learn about blueprint but that should make for a nice experiment.

              Comment


                #22
                Blueprint shouldn't be necessary for that part. It should just work if you use world coordinates for both your water and post process material.
                Ryan Brucks
                Principal Technical Artist, Epic Games

                Comment


                  #23
                  I can't seem to figure out how to make the 2 noises fit each other even after offsetting them by the same amount :/
                  Click image for larger version

Name:	edgeTest2.jpg
Views:	1
Size:	544.5 KB
ID:	1128291

                  EDIT
                  I've come a little closer to a perfect match but it still got a bit of work to make them match at 100%
                  Click image for larger version

Name:	edgeTest3.jpg
Views:	1
Size:	100.4 KB
ID:	1128292
                  Last edited by XavierPlaymind; 05-19-2017, 11:43 AM.

                  Comment


                    #24
                    You shouldn't subtract object position from the left side unless you are actually going to handle that with BP and set it in the corresponding material. I'd just remove it.
                    Ryan Brucks
                    Principal Technical Artist, Epic Games

                    Comment


                      #25
                      For those who can't make this method to "align the waves" you need a high poly or/and a highly tessellated mesh

                      Comment


                        #26
                        That is one way, but it also works fine as a post process material, you just need to do the same Z offset on the camera near plane and sample the same wave function. That works perfectly as long as you are only using Z offsets.
                        Ryan Brucks
                        Principal Technical Artist, Epic Games

                        Comment


                          #27
                          Originally posted by RyanB View Post
                          That is one way, but it also works fine as a post process material, you just need to do the same Z offset on the camera near plane and sample the same wave function. That works perfectly as long as you are only using Z offsets.
                          I tried this, but in PP material world position works badly with far surfaces, especially sky sphere.
                          Rocketeer

                          my portfolio
                          my youtube

                          Camera Volumes System
                          Instanced Plugin
                          Simple Portals
                          Water Flow For UDK
                          Setup Swarm

                          Comment


                            #28
                            Then you can use camera relative world position to get more precision back. but not sure what a sky sphere has to do with this. Why would you put this material on a sky?
                            Ryan Brucks
                            Principal Technical Artist, Epic Games

                            Comment


                              #29
                              Not on sky, in camera post process.
                              It was simple setup like:
                              Z of (ScreenPosToWorld - WaterHeight + Sine(AbsWorldPos.X + Frac(Time)))

                              When camera on "edge" of this, and I look on sky, mask becomes noisy, like dithered.

                              Ok, I will try this with camera relative world position.
                              Thanks!
                              Rocketeer

                              my portfolio
                              my youtube

                              Camera Volumes System
                              Instanced Plugin
                              Simple Portals
                              Water Flow For UDK
                              Setup Swarm

                              Comment


                                #30
                                You shouldn't do Sine of AbsWorldPos.x , you should use the ScreenPosToWorld for all the world positions there. The sky distance should never come into play.

                                Should be more like this

                                Z mask = ScreenPosToWorld.z - WaterHeight + Sine(ScreenPosToWorld.X + Frac(Time)))
                                Ryan Brucks
                                Principal Technical Artist, Epic Games

                                Comment

                                Working...
                                X