UE4-OceanProject / OceanProject

Environment Plugin Project (Ocean Simulation, Sky Simulation, Buoyancy, Time, Fish plugins for Unreal Engine 4)
1.39k stars 553 forks source link

Water appearing as a gray texture on Linux! #68

Open OldaysStudios opened 6 years ago

OldaysStudios commented 6 years ago

When we package our game for Linux after applying "M_Inst_Ocean_Nogerstber" to a plane mesh, the material turns into a gray texture upon opening the game, while packaging there are no errors in the logs.

Picture of the issue: https://i.imgur.com/AhaIAdI.png

Can anyone help us make this work? [Using Unreal 4.17]

EvoPulseGaming commented 6 years ago

Is this SM5, OpenGL 3 or 4? https://answers.unrealengine.com/questions/352034/bug-report-sm5-on-linux-is-limited-to-16-texture-s.html

While generally there is an error, you never know. (Check your warnings)

Also try changing the feature levels (switch between SM 4/5 OpenGL 3/4 ect) and report back results.

EvoPulseGaming commented 6 years ago

Visit me on slack: https://join.slack.com/t/oceanandwea...DMyZjIwMzZiNmE After work, 5pm central time

OldaysStudios commented 6 years ago

I tried many combinations, the log does not give me any warnings and doesn't tell me it did anything to the water, I deleted a sampler (from 17 to 16) since it gave me an error at 17, but not at 16, but even at 16 it makes the water gray. I also seem to be unable to visit you on slack, it gives me an error.

TheZoc commented 6 years ago

Hello :)

I've had similar issues when attempting to use this plugin on macOS... Sadly, I didn't find a solution yet.

My initial guess is that some of the custom nodes has code that could be potentially problematic when converted to OpenGL Shader Model, thought I couldn't pinpoint either what's wrong. Maybe @dotcamdev has more info about it, but I don't know if he is able to check this right now.

Your investigation of this issue is very much welcome!

Also, if you guys end up going to slack, I'd really appreciate if you could post your experiences and results here! It may help other people to find and solve the issue and maybe encourage more people to join :)

I'm sorry that I can't do much to investigate this right now, mostly due to time constraints on my side... Hopefully I'll be able to in near future! 😄

EvoPulseGaming commented 6 years ago

Try this https://join.slack.com/t/oceanandweatherue4/shared_invite/enQtMzE3NjUzNTg0MzczLWM2NTkyOTZkNmQ0ZTY2ZTYwZTI5YTQyYzk0ZTI3MzYyODQ3NWM5MDFjMzFjZjkzZTk0MGZmMDMyZjIwMzZiNmE

EvoPulseGaming commented 6 years ago

It appears that while 16 texture samples are the limit for opengl, lighting uses some depending if static or dynamic is used. Look into reducing the samplers

Apart from that, I don't see gray water, what I see a bunch of green. You need to provide a picture without the green fog.

Also another thing I am noticing, is that it appears that the fog or whatever that is, is thicker on linux than windows, but until we can get a clearer picture I can't help.

dotcamdev commented 6 years ago

Hey guys,

As @saschaelble noted, the Ocean material makes use of shared texture samplers (a DirectX 11 only feature) due to the number of samplers that get used up by dynamic lighting (among others).

OpenGL support is something I wanted to add before I had to take time off., It will require some compromises in order to get it working due to the limited samplers (8) for OpenGL. It may end up impacting the end result, but there may be some optimizations possible, so I will see what I can do.

I'm working on fixing up errors in the project and some de-bloating at the moment, but I promise this will be the next thing I work on after pushing an update in a couple days.

Thanks!

dotcamdev commented 6 years ago

Make an OpenGL Compatible Version

NilsonFLima commented 6 years ago

My 1st thought on this is to check all the texture samplers if all of them are marked as Shared:Clamped, but might also be necessary to check the samplers on all the library functions being in use, so if they are not marked as shared it will require to create a separate copy of that function renamed with the correct option on samplers. I remember doing this on the Water Planes assets in order to have the translucency water to work on OpenGL and Vulkan, which worked.

EvoPulseGaming commented 4 years ago

Just a fact update, the limit is due to MacOS OpenGL, which apparently has a 16 shader limit, but somehow is actually only 12. I have no idea if this was fixed or not, as OpenGL4 is supposed to support 32 shaders min.