[Community Project] WIP Weather & Water Shader

Your here is that TrueSky doesn’t know how to behave when there is a translucent material, is called sorting, and happens with these materials. I am making a small video to show you an idea on how to fix, but I really don’t know if it will. Note that the second method works but every other translucency material applied must have the sort priority variable set aswell, so the 1st method is prefered if TryeSky allows it.

Please, let us know if worked or not @intrus03 !

The video will be live in 20min approx.

watch?v=miBELkL-f7A

I’m going to try multiple of the shaders to see which are broken currently on Xbox, but is currently the comparison.

Top: Xbox One

Bottom: Intended Look, PC

EDIT:

Seems like maybe there is too many instructions for UE4? Get error while compiling.
**LogShaderCompilers: Warning: D:\UE4_UE4_\UnrealEngine-4.19.0\FreedomPuzzle\Content\Materials\M_Ocean_Versions\M_Ocean.uasset: Failed to compile Material for platform SF_XBOXONE_D3D12, Default Material will be used in game.

EDIT2: **

The following 3 shaders don’t work on Xbox One:
-M_Inst_Ocean_SSR_Foam
-M_Inst_Ocean_Foam_Cubemap
-M_Inst_Ocean_SSR_Foam_Cubemap

You don’t get any more detailed debug info? That’s pretty ghetto.

Nope, just pops that message out when compiling for Xbox, doesn’t show anything else. Makes debugging pretty hard. I used a simpler shader and it works just fine now.

Which is the scalability settings at that running screen? High?

I don’t think it is an instruction amount restriction, but some in use not enabled. Is it possible to build a small sample in 4.18.3 and check if the same happens? It would be a good idea do it to see if is not some new brought by 4.19.

Yeah it is running on high scalability. Changing it to any other still wouldn’t work.

And sadly never had a 4.18.3 source, as it requires certain Xbox SDK updates so I avoided constantly updating the engine. Latest SDK I had was around 4.16.

There was quite some changes from 4.16 to 4.19. I guess the only think I can do to help is trying to cause the here somehow. Give me some more time to look into .

To clarify, I never used the shader until yesterday morning so I’m not entirely sure 4.16 version of the shader has the same. I looked into thread into other possible Xbox users and only found one person, and he had crashes with scene color. It doesn’t crash anymore so I guess that’s a plus.

While I finish more testing, I have found something that might cause issues:

  • not 100% if it is the of another component in my test, but something is requiring Shader Model 5 when I attempted running the build I have packaged to Shader Model 4, usually I only use SM5.
  • as Im not testing in a XBox One kit, it is interesting to know if you are using one and how updated it is, because older models support only SM4 and not SM5. If you dont have the kit and are developing inside a pure console it is interesting to know the model to track .

I will still try to break stuff here.

I am indeed testing it on an Xbox One Kit, specifically Xbox One S. It has the most recent update as well.

And in case which is the shader model set when packaging for Xbox? In my tests it is not working with SM4 only SM5, but I still need to rip some things off before calling out that need is from the ocen itself.

Xbox One only uses SM5 as its DX12. PS4 uses SM5 as well.

Yes, I know, in fact I knew since you said you got it updated already, when it was DX11 the SM5 was not possible, I had in my mind and asked nonetheless, sorry.

I tried hard to cause the, but Im afraid has something to do with the dev kit (Epic’s part). The materials you mentioned all of them are instances from M_OceanSSR. I have used the M_Inst_Ocean_SSR_Foam_Cubemap and it works in editor with SM4 selected, but when you package if fails and ask for SM5. So, the does not has anything regarding Shader Model. The usual behavior for anything which has high cost under certain scalability settings is to become invisible, which is not happening in your case.

As Im lacking a kit to have the same ability than you, the only thing I can tell you to experiment is an optimization on the plane and see how it will behave:

  • open the BP_Ocean
  • select each of the 3 meshes there
  • in the details panel at right, look for the attribute called “Treat as Background for Occlusion” and make sure it is checked for each mesh.
  • package and see if the still there.

If still doesnt work, but changed anything, let me know.

Hello Nilson,

Thank you very much for your response, I appreciate it very much.

Unfortunately neither of the two solutions works.

I have checked as you said that the M_Ocean_Ultra material has “Render After DOF” enabled.

As you said, the Truesky does not have the “Translucency Sort Priority”, and if I change it in BP_Ocean actor (OceanPlane, DepthPlaneUnderside, DepthPlaneTopside meshes) to -1, it remains the same behavior.

Thank you very much for everything, but it seems that doesn’t have a simple solution.

Hi guys, I’m having an building a game with the Plugin as I get an error like and I never had it before.
fatal error LNK1181: cannot open input file ‘E:\UNREAL ENGINE\UE_4.19\Engine\Plugins\OceanPlugin\Binaries\Win64\UE4-OceanPlugin.lib’.

Did you just rebuild the plugin under UE 4.19? If yes, just click on the .uproject file and select Generate Visual Studio Project files, open the .sln and try to build again. Once you succeed, you can close and double click the .uproject file to open the the UE editor.

@ Also another user reported the same gray water under using opengl 14 and M_Inst_Ocean_Nogerstber
could be a packaging, or it could be something that is windows only in the code…

I tried 4.17 and 4.18 without luck too. If we were talking on packaging for something different that DX12 SM5 I would expect some, but a Windows build versus XBox build should not bring any at level. My dev kits didn’t arrive yet so I am not able to try (I could if I had a XBox lol Im a PS4 guy).

Hi, seems an project. Downloading it now. May I ask what the usage terms are? Can I use in my own project? ( would be a non-commercial project, released freely)

I have checked the TrueSky documentation and I have found the changes you need to do in the materials (each one) to be able to work with TrueSky. Just open each Material M_OceanXXXX (not instances ofc) and change the output node like :

Transparency.png

Of course node will only show-up if you have installed the TrueSky plugin.