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 NilsonLima View Post
    I am working with 4.17 (was thinking on having 4.17, 4.18 and 4.19 versions ready) and Im almost getting there. The code state was not that bad as I was thinking. Once I get there I will check again the comments Epic's employee made about it and from what I recall was easy steps.
    Since you're on 4.17 how did you fix the code snippet I posted above?
    Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap
    Plugins:
    ComputeShader CPU->GPU->CPU || Universal TimePlugin || Universal SkyPlugin
    Other tools/functions:
    Universal GetNetwork/LocalRole

    Comment


      Originally posted by EvoPulseGaming View Post

      Since you're on 4.17 how did you fix the code snippet I posted above?
      I didn't get there yet I guess. I just got the source from github and was removing the errors. Now Im stuck in two lines, which Im not sure why it can find SetGlobalBoundShaderState() since I have already used this function in another shader and all the headers are set. Probably when I fix this, more appear and that code you wrote too. Unless we are basing in difference source O.O
      Nilson Lima
      Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
      Join us at Discord: https://discord.gg/uFFSEXY

      UE4 Marketplace: Cloudscape Seasons
      supporting: Community FREE Ocean plugin

      Comment


        Originally posted by NilsonLima View Post

        I didn't get there yet I guess. I just got the source from github and was removing the errors. Now Im stuck in two lines, which Im not sure why it can find SetGlobalBoundShaderState() since I have already used this function in another shader and all the headers are set. Probably when I fix this, more appear and that code you wrote too. Unless we are basing in difference source O.O
        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)
        Free Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap
        Plugins:
        ComputeShader CPU->GPU->CPU || Universal TimePlugin || Universal SkyPlugin
        Other tools/functions:
        Universal GetNetwork/LocalRole

        Comment


          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/uFFSEXY

          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 Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap
            Plugins:
            ComputeShader CPU->GPU->CPU || Universal TimePlugin || Universal SkyPlugin
            Other tools/functions:
            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/uFFSEXY

              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/uFFSEXY

                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/uFFSEXY

                  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 Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap
                    Plugins:
                    ComputeShader CPU->GPU->CPU || Universal TimePlugin || Universal SkyPlugin
                    Other tools/functions:
                    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/uFFSEXY

                      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 Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap
                        Plugins:
                        ComputeShader CPU->GPU->CPU || Universal TimePlugin || Universal SkyPlugin
                        Other tools/functions:
                        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/uFFSEXY

                          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 Community Ocean & Sky Project || Join us on Discord! || Trello Roadmap
                              Plugins:
                              ComputeShader CPU->GPU->CPU || Universal TimePlugin || Universal SkyPlugin
                              Other tools/functions:
                              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/uFFSEXY

                                UE4 Marketplace: Cloudscape Seasons
                                supporting: Community FREE Ocean plugin

                                Comment

                                Working...
                                X