Announcement

Collapse
No announcement yet.

Creating realistic waving water?

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

    Creating realistic waving water?

    This is what i want to create
    https://www.youtube.com/watch?v=Kn5G1yA0F8o

    And i don't mean i want to recreate Halo 3's water, i want to create water that acts somewhat like that. Small and realistic looking waves.

    I can't find ANY tutorials anywhere, does anybody know what the technique is to create water like that?

    #2
    Check out Water planes in Learn tab of Launcher and this thread
    SuperGrid: Marketplace Page | Feedback Thread | Demo | Website
    Level design and prototyping for newbies

    Comment


      #3
      Also make sure to check this tutorial: https://www.youtube.com/watch?v=KPmRV1Z9ikY

      Comment


        #4
        Not that zeOrb didn't do a good job mentioning it, I just feel this should get more of a bigger mention.

        In the Learn Tab of the Launcher you have the option to download a project made by Alan Williard (Developer Relations Technical Artist here at Epic) as a learning example:

        Click image for larger version

Name:	WaterLearnTab.png
Views:	2
Size:	810.7 KB
ID:	1067673

        This example has three types of water available and a lot of customization. Oh yeah, and it's FREEE!

        If you're unsure about it you can check out the video demonstrations here:

        Tim Hobson | Learning Resources | Epic Games
        UE4 Documentation

        Comment


          #5
          Wow this community rocks! Thank you!!

          Is there a way to animate water surface by using displacement maps?

          What i mean is, that for example i run blender's ocean simulator, and then bake the simulation on to displacement textures.

          Is there then a way to cause animated tessellation with them in unreal engine? I feel like that would come off as some really realistic and beautiful results!

          Comment


            #6
            You can use a panner/sine node to move your displacement texture -> just connect it with the uv from the texture sample

            Comment


              #7
              I don't mean to move one texture, but to play bunch of displacement textures repeatedly. If my simulation would go 30fps in blender, and i bake every frame on a displacement texture, is it possible to play it back as a tessellation in unreal engine?

              Comment


                #8
                You could use the flip book material function to sort of play a movie from you're textures if that is what you want. But it is more performance friendly to just render 3-6 displacement textures and move those around using a panner or similar. I believe that in Assassins Creed: Black Flag they used 4 pre-computed wave height maps. There is also a material function somewhere in the engine called something like 4waychaos which is an easy way to move a single texture around in four different directions. The chaos function would be useful to for example move one detail texture around on the surface easily.

                Comment


                  #9
                  Also! I believe that the water in halo 3 was created using gerstner waves on the fly (in a shader). Nvidia has this great chapter on these kinds of wave here: http://http.developer.nvidia.com/GPU...gems_ch01.html.

                  If you want to get really advanced there is this paper written by Jerry Tessendorf that explains how you could do statistical ocean simulations using FFTs (this is what the used in AC:BF as a mentioned in the previous post). This article also touches on how you could do the actual shading of the surface, like inscattering and attenuation. Link: http://graphics.ucsd.edu/courses/ren...tessendorf.pdf.

                  On the topic of shading crytek held a presentation at gdc 2007 where they showed some atmospheric effects including river shading which might be interesting for you! You can download the presentation slides here: http://www.crytek.com/cryengine/pres...ames-revisited

                  Heres a link to an article discussing the water simulation and shading used in AC:BF. http://www.fxguide.com/featured/assa...th-the-action/

                  Comment


                    #10
                    Thanks guys! I managed to get a pretty cool result with only one displacement map and normal map baked in blender, and it looks like this with a freeze frame:

                    Click image for larger version

Name:	water.jpg
Views:	1
Size:	221.1 KB
ID:	1068052

                    The wave animation looks very cool in my opinion. But I'm still struggling to get a nice, shiny oceanish shader for it. For now the material looks very bad. For some reason, i can't get a translucent shader look shiny. Also if i use two sided material, it looks REALLY BUGGY.
                    Last edited by Ilmigue; 03-09-2015, 05:52 PM.

                    Comment


                      #11
                      Originally posted by Ilmigue View Post
                      Thanks guys! I managed to get a pretty cool result with only one displacement map and normal map baked in blender, and it looks like this with a freeze frame:

                      The wave animation looks very cool in my opinion. But I'm still struggling to get a nice, shiny oceanish shader for it. For now the material looks very bad. For some reason, i can't get a translucent shader look shiny. Also if i use two sided material, it looks REALLY BUGGY.
                      In version 4.8 there will be SSR for translucency, but as it stands currently it is really difficult to get the right look. I have tested 4.8 out (latest build from GitHub) and the SSR adds a lot to the scene, but it is not the full solution. Make sure you have a Skylight in your scene to get some specular highlights, but full reflection is not available at this time.

                      I am also working on an ocean shader, it uses Gerstner waves along with some extra displacement maps to get a fairly realistic looking ocean surface. It has controls for adjusting just about anything through the blueprint, still needs some more work but it's getting better.

                      One issue you may come across is when the camera is right down at the surface you will notice some pretty extreme artifacting issues where a wave is being rendered behind another wave, causing black or invisible sections of the surface to appear. To fix this you will need to render 2 separate meshes, one with your translucent material and the another new opaque material with the displacement only connected. Then set the opaque material/mesh so "Render in main pass" is Off, and turn on "Render Custom Depth". So all that mesh is doing is providing data that can be used through a SceneTexture:CustomDepth node to prevent any translucent sorting issues that come up.

                      Here is the thread I created due to the artifacts appearing on the waves, it was a while ago but the info is still relevant, TheBeej's answer has all the info:
                      https://forums.unrealengine.com/show...-Banding-Issue

                      Feel free to download my project (link below) from the other thread to see how I got around that part, or if you need more info (which is likely, this isn't very straightforward ) let me know.

                      Here is the link to download the project - https://drive.google.com/file/d/0B3u...ew?usp=sharing
                      Here is a link to the thread with more details - https://forums.unrealengine.com/show...n-Water-Shader

                      Hope that helps!
                      Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap

                      Comment


                        #12
                        Thanks DotCam i will check them out once i have time! Having really busy week now..

                        I got an idea from your post. I managed to get really good looking ocean shader with opaque material, but it look unrealistic because its not a see-through. Is it possible to mix two shaders in UE4, opaque and translucent materials together? This way it would be possible to get a great shiny look and also see the bottom. What i mean is, is a Blender like "mix shader". I know there is no mix shader where i could mix diffuse and glossy materials together. Still is it possible to use 2 meshes with one being opaque and other being translucent, and show 50/50 of both of them?

                        Comment

                        Working...
                        X