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

    Originally posted by EvoPulseGaming View Post
    Updated VaOcean to 4.17!!!! On to 4.18!!!

    If anyone knows how I can solve this issue:
    GraphicsPSOInit.DepthStencilState = TStaticDepthStencilState</*false, CF_Always*/>::GetRHI();
    If I remove the /* */ part, it will throw an error, while it still works, I would feel better if whatever that is trying to set is used.
    This piece of code does not belong to the VaOcean plugin, but to another plugin called LensDistortion, which is a default engine plugin shipped into. The code there is exactly the same without the comments.
    Last edited by NilsonLima; 03-08-2018, 04:49 PM.
    Nilson Lima
    Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
    Join us at Discord: https://discord.gg/FUwTvzr

    UE4 Marketplace: Cloudscape Seasons
    supporting: Community FREE Ocean plugin

    Comment


      Originally posted by NilsonLima View Post

      This piece of code does not belong to the VaOcean plugin, but to another plugin called LensDistortion, which is a default engine plugin shipped into. The code there is exactly the same without the comments.
      Boom! Thats it. If you look back through the commits (in that exact file) you will see a comment about updating to 4.17, which is where you want to look!
      Free Environment Plugin Project (Ocean Project) || Join us on Discord! || Includes: Time/Sky/Ocean/Fish/Buoyancy plugins
      ComputeShader CPU->GPU->CPU
      Universal GetNetwork/LocalRole

      Comment


        Originally posted by EvoPulseGaming View Post

        Boom! Thats it. If you look back through the commits (in that exact file) you will see a comment about updating to 4.17, which is where you want to look!

        Hmm I didnt get through the commits, which I see now are from 2016, but got the latest release only which is 2014/15... Oh well... work to do then...
        Nilson Lima
        Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
        Join us at Discord: https://discord.gg/FUwTvzr

        UE4 Marketplace: Cloudscape Seasons
        supporting: Community FREE Ocean plugin

        Comment


          Originally posted by NilsonLima View Post


          Hmm I didnt get through the commits, which I see now are from 2016, but got the latest release only which is 2014/15... Oh well... work to do then...
          Working on the proper version now, it is crashing in 4.16.3, but compiled successfull. I see that there are API changes at this: RHICmdList.SetBlendState(TStaticBlendState<>::GetRHI()); for 4.17 and Im going to look at it now.
          Nilson Lima
          Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
          Join us at Discord: https://discord.gg/FUwTvzr

          UE4 Marketplace: Cloudscape Seasons
          supporting: Community FREE Ocean plugin

          Comment


            Originally posted by EvoPulseGaming View Post

            Im at work, and likely won't be home or I'd just link you my reference, but SetGlobalBoundShaderState is depreciated. I believe this was a warning when you compiled 4.16. if you google that with POSInitializer you should find the git hub link that gives you an idea what needs to be changed (I removed 4 lines and added 6 or so)
            That piece of code and surroundings must be like:

            RHISetRenderTarget(TextureRenderTarget->GetRenderTargetTexture(), NULL); // this was the Clear, replaced like this

            // Be sure we're blending right without any alpha influence on Color blending
            ///////////////////////////////////////////////////////////////////////
            // pre 4.17: RHICmdList.SetBlendState(TStaticBlendState<>::GetRHI());
            TShaderMapRef<FQuadVS> QuadVS(GetGlobalShaderMap(GMaxRHIFeatureLevel));
            TShaderMapRef<FUpdateDisplacementPS> UpdateDisplacementPS(GetGlobalShaderMap(GMaxRHIFeatureLevel));

            FGraphicsPipelineStateInitializer GraphicsPSOInit;
            RHICmdList.ApplyCachedRenderTargets(GraphicsPSOInit);
            GraphicsPSOInit.DepthStencilState = TStaticDepthStencilState<false, CF_Always>::GetRHI();
            GraphicsPSOInit.BlendState = TStaticBlendState<>::GetRHI();
            GraphicsPSOInit.RasterizerState = TStaticRasterizerState<>::GetRHI();
            GraphicsPSOInit.PrimitiveType = PT_TriangleList;
            GraphicsPSOInit.BoundShaderState.VertexDeclarationRHI = GQuadVertexDeclaration.VertexDeclarationRHI;
            GraphicsPSOInit.BoundShaderState.VertexShaderRHI = GETSAFERHISHADER_VERTEX(*QuadVS);
            GraphicsPSOInit.BoundShaderState.PixelShaderRHI = GETSAFERHISHADER_PIXEL(*UpdateDisplacementPS);
            SetGraphicsPipelineState(RHICmdList, GraphicsPSOInit);
            // pre 4.17: static FGlobalBoundShaderState UpdateDisplacementBoundShaderState;
            // pre 4.17: SetGlobalBoundShaderState(RHICmdList, GMaxRHIFeatureLevel, UpdateDisplacementBoundShaderState, GQuadVertexDeclaration.VertexDeclarationRHI, *QuadVS, *UpdateDisplacementPS);
            ///////////////////////////////////////////////////////////////////////


            Now there is an issue with the ENQUEUE_UNIQUE_RENDER_COMMAND_THREEPARAMETER, but Im going to look at it tomorrow, Im tired.
            Nilson Lima
            Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
            Join us at Discord: https://discord.gg/FUwTvzr

            UE4 Marketplace: Cloudscape Seasons
            supporting: Community FREE Ocean plugin

            Comment


              VaOcean has been updated to 4.19

              So at this point I'll be focusing on cleaning up, and uploading to the github in my signature
              Last edited by EvoPulseGaming; 03-11-2018, 03:44 AM.
              Free Environment Plugin Project (Ocean Project) || Join us on Discord! || Includes: Time/Sky/Ocean/Fish/Buoyancy plugins
              ComputeShader CPU->GPU->CPU
              Universal GetNetwork/LocalRole

              Comment


                Im so tired I just want to die. Got only 4.16 working and I think I will just take a break and do something less terrible. I will take a look again in a week, enough time to reset my mind.

                EvoPulseGaming what did you think about the performance? Im not that satisfied still.
                Nilson Lima
                Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                Join us at Discord: https://discord.gg/FUwTvzr

                UE4 Marketplace: Cloudscape Seasons
                supporting: Community FREE Ocean plugin

                Comment


                  Considering I am running it on a 6 year old mid/high range LAPTOP, it runs great. Also, 4.18 and 4.19 had rendering improvements. Particularly 4.19 with landscape tesselation lod. I haven't tested that part actually. (Setting the material for a landscape to ocean, I was just using the floor mesh)

                  Also, mixing in the infinite plane feature should be considered for large bodies of water
                  Free Environment Plugin Project (Ocean Project) || Join us on Discord! || Includes: Time/Sky/Ocean/Fish/Buoyancy plugins
                  ComputeShader CPU->GPU->CPU
                  Universal GetNetwork/LocalRole

                  Comment


                    Well, just figured I have left my video card operating at lower clock speeds on core and memory to simulate a GTX 1070, so I changed back to stock speeds, and comparing with Ocean Ultra now it is running minimum 25 FPS and max 35 FPS faster, so average 30 FPS which is good. There main material on the FFT ocean still not doing much, I have added some lerp for coloring, some SSS direct into material pin (not simulated), depth fade and got 347ps/136 vs, not shabby.

                    Im using for now a disc shaped plane large enough to hit the horizon, with high triangle density in the middle and lower density as the radius increase, total 31K triangles. Idea is to put the plane to follow the camera next, but so far it is good.

                    The visual from above is quite pleasant, even very far, so visually I like it. The Tessendorf technique for the middle ocean is great but I still don't like for the shore. I am following up the latest work released notes from Tessendorf and other techniques applied to it, particularly to the shore, so I might have a taste of what it looks like soon.
                    Nilson Lima
                    Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                    Join us at Discord: https://discord.gg/FUwTvzr

                    UE4 Marketplace: Cloudscape Seasons
                    supporting: Community FREE Ocean plugin

                    Comment


                      Anybody know where I can find full documentation? Settings guide etc?

                      All I could find was the "How to add to your project" wiki page. Yet it's quite old... 2015

                      Comment


                        NilsonLima I've uploaded VaOcean 4.17/18, and uploaded a 4.19 branch.

                        I'm working on re-inserting the buoyancy component, so I can compare to the buoyancy component from the ocean project for speed vs accuracy
                        Last edited by EvoPulseGaming; 03-11-2018, 03:51 AM.
                        Free Environment Plugin Project (Ocean Project) || Join us on Discord! || Includes: Time/Sky/Ocean/Fish/Buoyancy plugins
                        ComputeShader CPU->GPU->CPU
                        Universal GetNetwork/LocalRole

                        Comment


                          Originally posted by EvoPulseGaming View Post
                          NilsonLima I've uploaded VaOcean 4.17/18, and uploaded a 4.19 branch.

                          I'm working on re-inserting the buoyancy component, so I can compare to the buoyancy component from the ocean project for speed vs accuracy
                          I felt asleep while reanding all the posts from the original thread yesterday, saw the videos for buoyancy but didn't see any comments on how to make it work. Will continue reading today and I will take a look on the 4.17 you uploaded, before touching anything, so I can at leat see if I was going to the same direction. I really want to try doing myself thou, since I want to be able to support future API changes, because as you saw it is a hard task to find information about the changes. The only quick guidance is the LensDistortion plugin Epic provides and that might not be 100% with all the things you might need.
                          Nilson Lima
                          Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                          Join us at Discord: https://discord.gg/FUwTvzr

                          UE4 Marketplace: Cloudscape Seasons
                          supporting: Community FREE Ocean plugin

                          Comment


                            Originally posted by NilsonLima View Post

                            I felt asleep while reanding all the posts from the original thread yesterday, saw the videos for buoyancy but didn't see any comments on how to make it work. Will continue reading today and I will take a look on the 4.17 you uploaded, before touching anything, so I can at leat see if I was going to the same direction. I really want to try doing myself thou, since I want to be able to support future API changes, because as you saw it is a hard task to find information about the changes. The only quick guidance is the LensDistortion plugin Epic provides and that might not be 100% with all the things you might need.
                            A. You were going in the same direction.
                            B. LensDistortion only helped with 1 of like 10 different problems
                            C: This solved more issues than LensDistortion:
                            http://rcaloca.blogspot.com/2017/05/...rs-to-ue4.html (up to 4.17)
                            http://rcaloca.blogspot.com/2018/01/...o-ue4-v20.html (4.18,19)
                            D: There were more issues with missing functions/values that no longer were allowed to be implied
                            E: 4.18 didn't require an update
                            F: 4.19 didn't really require an update, they just got picky about a missing implied function

                            Free Environment Plugin Project (Ocean Project) || Join us on Discord! || Includes: Time/Sky/Ocean/Fish/Buoyancy plugins
                            ComputeShader CPU->GPU->CPU
                            Universal GetNetwork/LocalRole

                            Comment


                              Originally posted by EvoPulseGaming View Post

                              A. You were going in the same direction.
                              B. LensDistortion only helped with 1 of like 10 different problems
                              C: This solved more issues than LensDistortion:
                              http://rcaloca.blogspot.com/2017/05/...rs-to-ue4.html (up to 4.17)
                              http://rcaloca.blogspot.com/2018/01/...o-ue4-v20.html (4.18,19)
                              D: There were more issues with missing functions/values that no longer were allowed to be implied
                              E: 4.18 didn't require an update
                              F: 4.19 didn't really require an update, they just got picky about a missing implied function
                              I have got it 4.17 aswell, was missing some includes and there was a mispelled function. About C, I have read RCaloca blog since when it came out and I have figured C from it too, but the issue is that besides him being Epic's employee, relying on a blog instead of a more accurate documentation is a shame. While long term professionals might know what to look for, the keywords for searching and so, novices at some degree with the engine, that already have exhausted the current material pipeline and are looking for something beyond that, would find a hard way to get into shader development.

                              I have also followed this article series when it came out too, usefull in some cases (not updated on few changes thou): https://medium.com/@lordned/unreal-e...1-c47f2da65346
                              Nilson Lima
                              Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                              Join us at Discord: https://discord.gg/FUwTvzr

                              UE4 Marketplace: Cloudscape Seasons
                              supporting: Community FREE Ocean plugin

                              Comment


                                Hey guys, be careful with using VaOcean as a base for a new project. The original creator adapted his code from NVidia's OceanCS example, whole functions are directly copy/pasted. He neglected to mention this, which violates the EULA that comes with the code (It mentions NVidia must be credited). There may be other licensing implications that I'm not aware of, so you may want to look into that further if you're going to spend a lot of time improving on that code base.

                                Additionally, a lot of the code was written with DX10 as a target, which is a leftover limitation from OceanCS. UE4 uses DX11, and there are several improvements in DX11 that will help you write a more efficient FFT. It may even be more desirable to start from scratch...

                                You can find Microsoft's adaptation of OceanCS in this old blog post: https://blogs.msdn.microsoft.com/nat...mple-in-c-amp/

                                In OceanCS.zip you'll find NVidia's EULA and some of the code that was copy/pasted into VaOcean. If you want to see OceanCS directly, you'll have to download Nvidia's GPU Computing SDK 4.0.

                                Comment

                                Working...
                                X