Announcement

Collapse
No announcement yet.

[Community Project] WIP Weather & Ocean Water Shader

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

    So anyways.. until I find out a solution for the sample count I can at least enable SSR if I disable the foam.

    I have successfully implemented far normal blending which basically blends to another set of normals at distance.
    This greatly improves the look when the camera is far and it also works perfectly with the "infinite" plane system.

    I have also adjusted the detail normals, it looks way better now in my opinion. It actually starts looking like water now

    Here are some comparison screens between the old shader of the new shader.

    Old Shader (ugly tiling pattern at distance)

    (Click for original size)

    New Shader (far normals blend)

    (Click for original size)

    Old Shader Closeup

    (Click for original size)

    New Shader Closeup (detail normals + SSR)

    (Click for original size)

    There are some things I need to cleanup, expose some variables, and make the infinite plane system configurable so it will take me a little bit more time before I release this.. but "soon" .. it's coming.

    Also for those interested, thanks to DanielW we now know how to increase the SSR quality! I will post some comparison screens sometime later.

    4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
    WIP Interactive Water Shader, WIP 2D Water Sim
    WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

    Comment


      I think the "up to 128 unique textures" is meant for DirectX/Windows, as far as I read there is still an 16 texture limit for Linux and Mac. https://answers.unrealengine.com/que...ork-in-op.html
      I hope this is what you meant ^^

      Comment


        But I'm using DirectX/Windows so I don't get it..

        4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
        WIP Interactive Water Shader, WIP 2D Water Sim
        WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

        Comment


          Originally posted by TK-Master View Post
          But I'm using DirectX/Windows so I don't get it..
          Hmm, this was the only thing I could think of, maybe ask on AnswerHub? Maybe it's a bug or something *shrug*

          Comment


            Okay I finally figured out what the problem was.. I was using the function Motion_4WayChaos to pan the normals/foam etc. which apparently included texture samples without "Shared Wrap" so I made a custom version of the function and now it seems I can use as many textures as I like (yay).

            Also because of this change the non-SSR version has now dropped to 12 samples so hopefully it will also work with linux/openGL.

            4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
            WIP Interactive Water Shader, WIP 2D Water Sim
            WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

            Comment


              Originally posted by TK-Master View Post
              Okay I finally figured out what the problem was.. I was using the function Motion_4WayChaos to pan the normals/foam etc. which apparently included texture samples without "Shared Wrap" so I made a custom version of the function and now it seems I can use as many textures as I like (yay).

              Also because of this change the non-SSR version has now dropped to 12 samples so hopefully it will also work with linux/openGL.
              Apparently for opengl3 and mac its stuck at 16 samples total until mac updates their drivers but for opengl4 on windows(I think) and linux this apparently is a bug, https://answers.unrealengine.com/que...ork-in-op.html

              hopefully you fixes will make it work. and thanks for this.

              Comment


                I was also wondering when were you going to push your changes?

                Comment


                  Sorry it takes so long I'm trying to nail down the infinite plane system and fix the destructibles atm but I could upload an early version later tonight.

                  4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
                  WIP Interactive Water Shader, WIP 2D Water Sim
                  WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

                  Comment


                    @TK-Master - I could really use the 4.8 early-version myself, as I have a project that uses it I'm trying to put a move on. Don't need infinite plane for this particular thing.
                    Storyteller - An immersive VR audiobook player

                    Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

                    Comment


                      Originally posted by n00854180t View Post
                      @TK-Master - I could really use the 4.8 early-version myself, as I have a project that uses it I'm trying to put a move on. Don't need infinite plane for this particular thing.
                      same here

                      Comment


                        4.8 version uploaded!

                        Here we go! I have uploaded the 4.8 version (github will be updated at a later time).

                        Screens:

                        SSR

                        (Click for original size)

                        Foam

                        (Click for original size)

                        Shore

                        (Click for original size)

                        New 4.8 features:

                        -Screen Space Reflections (SSR)
                        -Infinite Ocean System
                        -Distance Blended Normals
                        -Configurable Sets of Panning Normals (Small, Medium, Far)
                        -Heightmap-based Seafoam & Foam Wave Caps (Thanks Tin Le!)
                        -Cubmap-based Reflections (optional)
                        -Exposed many parameters to BP_Ocean. - You can now easily switch between shader versions, change textures, normals, foam, cubemap, heightmap etc.
                        -Underwater Distortion Effect
                        -Underwater Caustics

                        -Fixed buoyant destructible physics (too "jumpy")
                        -Fixed a few other problems caused by 4.8 engine core changes

                        Current known issues:
                        Destructible icebergs can cause a crash when rapidly shot by cannons (if you guys have any ideas about this one, please let me know )
                        SSR shader version uses 14 samplers (might not work in linux/mac.. please let me know)

                        Link removed, get the latest version from github!
                        Last edited by TK-Master; 10-20-2015, 01:01 PM.

                        4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
                        WIP Interactive Water Shader, WIP 2D Water Sim
                        WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

                        Comment


                          Thanks, man!!!

                          Comment


                            Code:
                            1>------ Build started: Project: ue47pano, Configuration: Development_Game x64 ------
                            1>  Parsing headers for ue47pano
                            1>  Reflection code generated for ue47pano
                            1>  Performing 26 actions (4 in parallel)
                            1>  [4/26] Resource ue47pano.rc
                            1>  PCH.UELinkerFixups.UELinkerFixupsName.h.cpp
                            1>  PCH.ue47pano.ue47pano.h.cpp
                            1>  PCH.OceanPlugin.OceanPluginPrivatePCH.h.cpp
                            1>  UELinkerFixups.cpp
                            1>  MyClass.cpp
                            1>  ue47pano.cpp
                            1>  OceanPlugin.generated.cpp
                            1>  MarchingCubes.cpp
                            1>  BuoyantDestructible.cpp
                            1>  Noise.cpp
                            1>  OceanPlugin.cpp
                            1>  SimplexNoise.cpp
                            1>  FishNode.cpp
                            1>  FlockFish.cpp
                            1>  TerrainMeshComponent.cpp
                            1>  TerrainGenerationWorker.cpp
                            1>D:\ue4projects\Merkur\ue47pano\Plugins\OceanPlugin\Source\OceanPlugin\Private\Terrain\TerrainGenerationWorker.cpp(31): warning C4996: 'FRunnableThread::Create': Function deprecated. Use FRunnableThread::Create without bAutoDeleteSelf and bAutoDeleteRunnable params and delete thread and runnable manually. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
                            1>          C:\Program Files\Unreal Engine\4.7\Engine\Source\Runtime\Core\Public\HAL\ThreadingBase.h(263) : see declaration of 'FRunnableThread::Create'
                            1>  ProceduralTerrain.cpp
                            1>  FishState.cpp
                            1>  OceanManager.cpp
                            1>  BuoyancyMovementComponent.cpp
                            1>  BuoyancyComponent.cpp
                            1>  FishManager.cpp
                            1>  FishFactory.cpp
                            1>  [25/26] Link OceanPlugin-Static.lib
                            1>  [26/26] Link ue47pano.exe
                            1>     Creating library D:\ue4projects\Merkur\ue47pano\Binaries\Win64\ue47pano.lib and object D:\ue4projects\Merkur\ue47pano\Binaries\Win64\ue47pano.exp
                            1>UELinkerFixups.cpp.obj : error LNK2019: unresolved external symbol "void __cdecl EmptyLinkFunctionForStaticInitializationOceanPlugin(void)" (?EmptyLinkFunctionForStaticInitializationOceanPlugin@@YAXXZ) referenced in function "void __cdecl UELinkerFixups(void)" (?UELinkerFixups@@YAXXZ)
                            1>D:\ue4projects\Merkur\ue47pano\Binaries\Win64\ue47pano.exe : fatal error LNK1120: 1 unresolved externals
                            1>  -------- End Detailed Actions Stats -----------------------------------------------------------
                            1>ERROR : UBT error : Failed to produce item: D:\ue4projects\Merkur\ue47pano\Binaries\Win64\ue47pano.exe
                            1>  Cumulative action seconds (8 processors): 0,00 building projects, 53,40 compiling, 0,00 creating app bundles, 0,00 generating debug info, 7,95 linking, 0,00 other
                            1>  UBT execution time: 43,39 seconds
                            1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""C:\Program Files\Unreal Engine\4.7\Engine\Build\BatchFiles\Build.bat" ue47pano Win64 Development "D:\ue4projects\Merkur\ue47pano\ue47pano.uproject" -rocket" exited with code -1.
                            ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
                            Can anyone help me? I'm on 4.7.6 and I get this error on Shipping and Development builds. I used this as source: https://github.com/UE4-OceanProject/...ive/master.zip

                            //edit:
                            Never mind - I realized I'm only using the skysphere, not any stuff that uses the code... I removed the code and I can compile now. Though, anyone got an idea?
                            Last edited by Ben_Cykyria; 06-15-2015, 11:34 PM.
                            VR Shooter Guns - Arcade Shooter for Vive
                            Unreal Meetup Franken - Unreal Engine 4 Meetup
                            Hands for VR: Basic - For Vive and Oculus [Marketplace]
                            Hands for VR: SciFi - For HTC Vive and Oculus Touch [Marketplace]

                            Comment


                              Good Day,

                              Many Thanks to the initiative.
                              There is a big problem though with actually building and packaging the project ...
                              When I try to build the project in C++ from Visual Studio 2013 I get the following errors:
                              Error 1 error RC2135: file not found: ../../../../Build/Windows/Application.ico A:\GIT_HUB\OceanProject\Source\OceanDemo\Resources\Windows\OceanDemo.rc 68 1 OceanDemo
                              Error 3 error : Failed to produce item: A:\GIT_HUB\OceanProject\Intermediate\Build\Win64\OceanDemoEditor\Development\UE4Editor-OceanDemo.exp A:\GIT_HUB\OceanProject\Intermediate\ProjectFiles\ERROR OceanDemo
                              Error 4 error MSB3073: The command ""A:\Epic Games\4.7\Engine\Build\BatchFiles\Build.bat" OceanDemoEditor Win64 Development "A:\GIT_HUB\OceanProject\OceanDemo.uproject" -rocket" exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5 OceanDemo

                              Comment


                                Originally posted by Vladone View Post
                                Good Day,

                                Many Thanks to the initiative.
                                There is a big problem though with actually building and packaging the project ...
                                When I try to build the project in C++ from Visual Studio 2013 I get the following errors:
                                Error 1 error RC2135: file not found: ../../../../Build/Windows/Application.ico A:\GIT_HUB\OceanProject\Source\OceanDemo\Resources\Windows\OceanDemo.rc 68 1 OceanDemo
                                Error 3 error : Failed to produce item: A:\GIT_HUB\OceanProject\Intermediate\Build\Win64\OceanDemoEditor\Development\UE4Editor-OceanDemo.exp A:\GIT_HUB\OceanProject\Intermediate\ProjectFiles\ERROR OceanDemo
                                Error 4 error MSB3073: The command ""A:\Epic Games\4.7\Engine\Build\BatchFiles\Build.bat" OceanDemoEditor Win64 Development "A:\GIT_HUB\OceanProject\OceanDemo.uproject" -rocket" exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5 OceanDemo
                                From this error it seems that you are missing Build/Windows/Application.ico in your project (you can copy that file from another project or from TK branch).

                                If you guys are using 4.7 I recommend that you use the TK's-Dev branch since it's more up to date than master.

                                4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
                                WIP Interactive Water Shader, WIP 2D Water Sim
                                WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD

                                Comment

                                Working...
                                X