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

  • replied
    Originally posted by issam1975 View Post
    i haven't tested this package yet but it seems that the animations are retargeted to UE4 and i am pretty sure there is a swimming in it
    https://forums.unrealengine.com/comm...o-ue4-skeleton
    Oh! I totally forgot about that one, I downloaded it a few weeks ago but haven't used it yet. I'll have a look through and see if they will work, thank you very much for the suggestion issam1975, really appreciate it!!

    EDIT: They do have swimming animations, a lot of them! These are the ones listed in the readme, thanks again!!

    Code:
    Subject #125 (Swimming)
    125_01    Breast Stroke
    125_02    Breast Stroke
    125_03    Break Stroke
    125_04    Breast Stroke
    125_05    Butterfly
    125_06    Free Style
    125_07    Motorcycle
    
    Subject #126 (Swimming 2)
    126_01    Back Stroke
    126_02    Back Stroke
    126_03    Breast Stroke
    126_04    Breast Stroke
    126_05    Breast Stroke
    126_06    Fly Stroke
    126_07    Fly Stroke
    126_08    Fly Stroke
    126_09    Fly Stroke
    126_10    Free Style
    126_11    Free Style
    126_12    Free Style
    126_13    Motorcycle
    126_14    Range of Motion
    
    Plus these three
    79_02    swimming
    79_03    swimming
    80_72    swimming
    Last edited by DotCam; 06-05-2018, 05:00 PM.

    Leave a comment:


  • replied
    Originally posted by DotCam View Post

    Happy to help!

    Yeah I have some from marketplace too I'm not able to use. My biggest problem is not having a clue how to animate, and I use 3dsMax while it seems all the animation tools are made for use in Maya...

    Anyways, no worries Q. I'll either find a way to do it in max or wait for an animation god to bless us with his powers!
    i haven't tested this package yet but it seems that the animations are retargeted to UE4 and i am pretty sure there is a swimming in it

    https://forums.unrealengine.com/comm...o-ue4-skeleton

    Leave a comment:


  • replied
    Originally posted by qdelpeche View Post
    DotCam - Thanks for the comprehensive response, it is really appreciated. I have swimming animations but they come from another Marketplace pack, so unfortunately I can't offer them to you.
    Happy to help!

    Yeah I have some from marketplace too I'm not able to use. My biggest problem is not having a clue how to animate, and I use 3dsMax while it seems all the animation tools are made for use in Maya...

    Anyways, no worries Q. I'll either find a way to do it in max or wait for an animation god to bless us with his powers!

    Leave a comment:


  • replied
    DotCam - Thanks for the comprehensive response, it is really appreciated. I have swimming animations but they come from another Marketplace pack, so unfortunately I can't offer them to you.

    Leave a comment:


  • replied
    Originally posted by qdelpeche View Post
    Quick question, in order to get a player to float and be able to swim, would you add a buoyancy actor to it and activate it when entering the water?
    Hey Q!

    Yes a BuoyancyForceComponent is what you will want to add as a child of the character mesh, but currently you do not need to activate it, it will automatically get applied. Come to think of it adding an 'enabled' boolean is a good idea. Looking over the code it is possible to use a "Set Component Tick Enabled" in blueprints on the component, this should have the desired effect. I haven't used it yet but setting up some kind system to auto-disable it shouldn't be too difficult, easiest would probably be checking the players current location on the Z axis, when the character gets near the Z height of the ocean just have it enable the component.

    As far as the setup is concerned, here's a couple screenshots of the ThirdPerson demo character in the project. For the bone overrides the second image shows all that are really required, you can add more bones if you want and adjust the values however you see fit. I'm planning on creating a new blueprint for the character that will have a swim setup similar to games like GTA5 and Assasins Creed Rogue where the character 'snaps', for lack of a better word, to the surface but if the camera rotate pitch is push forward long enough the character will start swimming beneath the surface. I just need some swimming animations built for the UE4 third person dude (if anyone is reading this who knows how to create them, and would be willing to contribute them to this project, we would forever be in your debt!) and I'll add them in, will make sure to let you know if I can get an example working.

    Here's the screenshots:

    Click image for larger version

Name:	Forums_CharBuoy01.JPG
Views:	14
Size:	189.9 KB
ID:	1484722Click image for larger version

Name:	Forums_CharBuoy02.JPG
Views:	12
Size:	127.7 KB
ID:	1484723

    Let me know if anything is unclear. Cheers!

    Leave a comment:


  • replied
    Quick question, in order to get a player to float and be able to swim, would you add a buoyancy actor to it and activate it when entering the water?

    Leave a comment:


  • replied
    Definitely buy the game DotCam and give it a spin. I guarantee you will forget about the gameplay, and just spend all your time looking at and swimming in the water! The SSS in the waves is amazing, and underwater, and the transition, and even the foam, is very well done. I heard, in early development, it was even more realistic, so they stylized it a bit to fit more with the rest of the art direction. They also do a great job of masking, I guess that is what it is, the water out of the ships, then flooding them when they are full of holes. Rare extended the "golden hour" (dusk, dawn) and actually enlarged the sun at that time of day, and it just plays off the water in a way that is beyond description. They had a real attention to detail, because any photographer knows the golden hour is a special time for lighting.

    I think their implementation of Light Propagation Volumes for Dynamic GI, and their Lighting Blueprint, contribute a lot to the great look of their water, which changes with the time of day, weather, and even regions. They use over 98 color curves in a single BP. Great solution. I think this would be something that could add value to this project. They smoothly change the color of the water from that Caribbean turquoise to stormy deep blue open water, so quickly. And it looks so good day and night, rain, or bright sun. So the lighting BP must play a key role in the look of their water.

    If you haven't yet, I would also take a look at Assassin's Creed Origins.

    Black Flag has amazing water, and they published a lot on how it was developed: https://www.fxguide.com/featured/***...th-the-action/ and https://www.fxguide.com/featured/5-t...iv-black-flag/ .... I think Ubisoft assigned the water shader to a division in Singapore. Anyways, Origins takes things on step further. The water displaced by ships, and even when swimming in the water, if facing the sun, you will get a beautiful SSS in the wake. And in Origins you can swim underwater everywhere, and they have different colored water by biome region.

    I only mentioned all this because you developers have given a lot of time to this, and I though you might get some inspiration. I never really thought UE4 could produce such beautiful results. This project is so close ... it is looking really good.

    After seeing the water in Sea of Thieves, I think the last goal for someone to reach in a water shader, is that "surfable wave" that properly breaks with a nice curl with SSS, with the technically correct and proper looking surf that rushes to shore, with swash and backwash shoreline effects.

    Water elements in games has been my favorite part ever since playing BioShock. So developers that write water shaders are my idols. EPIC should give all of you an award, or something, for the work you have put into this project over the years. I hope you guys continue to find the time to work on this, and put the finishing touches on it. Good Things!
    Last edited by CrashA51; 06-03-2018, 12:04 PM.

    Leave a comment:


  • replied
    Originally posted by CrashA51 View Post
    Wow, this "community" ocean shader was started four years ago, and still going strong. Four years ago development on Sea of Thieves also began. That game has some of the best water in any game, on any platform, both above and below the waterline, and it uses UE4! Never though I would see that day.... did Rare develop their ocean shader from scratch, or build it upon Nvidia Wave Works, anyone know? This video does explain how they achieved such beautiful colors with time of day, region, and weather changes, using a single Blueprint https://www.youtube.com/watch?v=cPQ0ksLKFyo
    It is probably the best water I have seen done in UE4 (or any engine for that matter), absolutely love their work. They are using a custom built FFT based formula to generate the waves. I don't believe it is based on Nvidia WaveWorks, it looks very similar because that's just the "look" you get with a FFT generated wave, it's much more natural looking.

    Thanks for the link! This should be very helpful, really appreciate that!

    I should probably buy this game shouldn't I lol. It's my favorite "Technical" element in games right now, just stunning work.

    Leave a comment:


  • replied
    Originally posted by Swdan View Post
    guys, note that packaging and launching the game as a linux headless server results in signal 11 segmentation fault
    caused by ocean bp is not able to load heightmap texture. either add some "is valid" check in c++ or... something
    took a day to figure out
    Sorry about that, not sure how that was missed but I will add it in shortly. Thank you for reporting it!

    Here's the issue on GitHub: https://github.com/UE4-OceanProject/...ject/issues/82
    Last edited by DotCam; 06-02-2018, 09:10 PM.

    Leave a comment:


  • replied
    Wow, this "community" ocean shader was started four years ago, and still going strong. Four years ago development on Sea of Thieves also began. That game has some of the best water in any game, on any platform, both above and below the waterline, and it uses UE4! Never though I would see that day.... did Rare develop their ocean shader from scratch, or build it upon Nvidia Wave Works, anyone know? This video does explain how they achieved such beautiful colors with time of day, region, and weather changes, using a single Blueprint https://www.youtube.com/watch?v=cPQ0ksLKFyo

    Leave a comment:


  • replied
    Originally posted by Swdan View Post
    guys, note that packaging and launching the game as a linux headless server results in signal 11 segmentation fault
    caused by ocean bp is not able to load heightmap texture. either add some "is valid" check in c++ or... something
    took a day to figure out
    Thanks for the heads up! I will update at the GitHub issue list and as soon we can check this we will update the repository.

    PS: issue added
    Last edited by NilsonLima; 06-02-2018, 09:32 AM.

    Leave a comment:


  • replied
    guys, note that packaging and launching the game as a linux headless server results in signal 11 segmentation fault
    caused by ocean bp is not able to load heightmap texture. either add some "is valid" check in c++ or... something
    took a day to figure out

    Leave a comment:


  • replied
    Ahoy! I'm trying to run the master branch from github on a source-built 4.18.2 engine and am getting a slew of errors when trying to compile the project, all of which seem to be in AdvancedBuoyancyComponent.cpp:

    Severity Code Description Project File Line Suppression State
    Error (active) E0135 class "FStaticMeshLODResources" has no member "VertexBuffers" OceanProject c:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 225
    Error (active) E0135 class "FStaticMeshLODResources" has no member "VertexBuffers" OceanProject c:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 227
    Error (active) E0135 class "FStaticMeshLODResources" has no member "VertexBuffers" OceanProject c:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 257
    Error (active) E0135 class "FStaticMeshLODResources" has no member "VertexBuffers" OceanProject c:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 260
    Error C2039 'VertexBuffers': is not a member of 'FStaticMeshLODResources' OceanProject C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 225
    Error C2228 left of '.PositionVertexBuffer' must have class/struct/union OceanProject C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 225
    Error C2228 left of '.VertexBufferRHI' must have class/struct/union OceanProject C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 225
    Error C2227 left of '->GetSize' must point to class/struct/union/generic type OceanProject C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 225
    Error C2039 'VertexBuffers': is not a member of 'FStaticMeshLODResources' OceanProject C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 242
    Error C2228 left of '.PositionVertexBuffer' must have class/struct/union OceanProject C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 242
    Error C2661 'UAdvancedBuoyancyComponent::PopulateTrianglesFromStaticMesh::EURCMacro_GetMyBuffers::EURCMacro_GetMyBuffers': no overloaded function takes 3 arguments OceanProject C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 227
    Error C2039 'VertexBuffers': is not a member of 'FStaticMeshLODResources' OceanProject C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 257
    Error C2228 left of '.PositionVertexBuffer' must have class/struct/union OceanProject C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 257
    Error C2039 'VertexBuffers': is not a member of 'FStaticMeshLODResources' OceanProject C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 260
    Error C2228 left of '.PositionVertexBuffer' must have class/struct/union OceanProject C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 260
    Error C2228 left of '.GetStride' must have class/struct/union OceanProject C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Source\OceanPlugin\Private\AdvancedBuoyancyComponent\AdvancedBuoyancyComponent.cpp 260
    Error Failed to produce item: C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Plugins\OceanPlugin\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-OceanPlugin.suppressed.exp OceanProject C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\Intermediate\ProjectFiles\ERROR 1
    Error MSB3075 The command ""C:\Games\UE4 Source\4.18.2\UnrealEngine-release\Engine\Build\BatchFiles\Build.bat" OceanProjectEditor Win64 Development "C:\Users\Piepants\Downloads\OceanProject-master\OceanProject-master\OceanProject.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command. OceanProject C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 44


    I checked the AdvancedBuoyancyComponent.h FBuoyancyVertex and FForceTriangle structs and they both have (BlueprintType) declared after USTRUCT. Anyone have any ideas on what's going on?

    Thanks!

    Leave a comment:


  • replied
    Originally posted by tosith View Post
    Hi, we are using this excellent project in our game and on the PC front, performance wise, everything is absolutely fine (Unreal 4.18.3 and 4.19.2). On the (original) Xbox One though - it is a different story. On 4.18 we managed to run the chapter that is using BP_ocean class to run at almost 900p at mostly steady 30FPS which at this point is good enough for the original Xbox One (pre S version). Sadly, we cannot ship with 4.18 version of the engine and on 4.19 there's a huge performance hit. For the records, on Xbox One X the same chapter is running almost all the time at a native 4K (using dynamic res option of 4.19). On the original Xbox however, even at 720p with the same settings like those in 4.18, the game is running between 20-23FPS. After a few debug test it is more than clear that this is GPU related problem (frametime is between 65-70ms).

    My question is - are there any specific 4.19 changes that can impact our performance and also, does anyone know any specific optimized settings just using the variables in the BP_ocean class?

    Thanks in advance.
    Hello,

    Unfortunately, I don't have good news for you... I've been reading through issues on Answerhub and came across a post (can't find it atm, will edit this and post the link when I do) detailing a huge performance bug in 4.19 with the Planar Reflection actor. If I remember correctly the bug affects lower end systems much worse, which makes sense why it only becomes an issue on xbox.

    It really sucks that this occurred when you are ready to ship, I wish there was some way I could help out. Good news is that 4.20 preview should be coming out soon. I know you aren't going to want to release from a preview build, but there have been a lot of performance issues and crashing in 4.19 so I can't see them continuing to support it beyond 4.19.3.

    To confirm it is the Planar Reflections, select BP_Ocean, then in the details panel select the PlanarReflection component and scroll down to the Rendering section and deselect the visible checkbox. This effectively disables planar reflections as you can see from the lack of reflections in the image below.

    Click image for larger version  Name:	Forums_Planar02.JPG Views:	1 Size:	512.1 KB ID:	1478349

    In my testing on a GTX1080 & 8700k the difference was a little bit more than 1ms faster without planar reflections, but this is in the demo project, a game project targeting xbox should see a big increase in performance. Do this on the 4.18 project as well and then compare the numbers to see if they are similar, if they are then something else is causing the issue so please let me know what you find out.

    Thanks!

    Leave a comment:


  • replied
    Hi, we are using this excellent project in our game and on the PC front, performance wise, everything is absolutely fine (Unreal 4.18.3 and 4.19.2). On the (original) Xbox One though - it is a different story. On 4.18 we managed to run the chapter that is using BP_ocean class to run at almost 900p at mostly steady 30FPS which at this point is good enough for the original Xbox One (pre S version). Sadly, we cannot ship with 4.18 version of the engine and on 4.19 there's a huge performance hit. For the records, on Xbox One X the same chapter is running almost all the time at a native 4K (using dynamic res option of 4.19). On the original Xbox however, even at 720p with the same settings like those in 4.18, the game is running between 20-23FPS. After a few debug test it is more than clear that this is GPU related problem (frametime is between 65-70ms).

    My question is - are there any specific 4.19 changes that can impact our performance and also, does anyone know any specific optimized settings just using the variables in the BP_ocean class?

    Thanks in advance.

    Leave a comment:

Working...
X