# \[Community Project\] FREE Ocean Water Shader

**URL:** <https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [August 22, 2018, 11:00pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372 "2018-08-22T23:00:54Z")\
**Posts on this page:** 20\
**Page:** 9

<div class="post-metadata">

**Author:** ![unit23](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/unit23/32/1223962_2.png) [@unit23](https://forums.unrealengine.com/u/unit23)\
**Post date:** [March 31, 2019, 3:13pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/163 "2019-03-31T15:13:34Z")

</div>

> [@NilsonLima](#):
>
> Since this was an user contribution long time ago, before I even started looking into the project, I am not familiar with it, give me some time to look at it and I will let you know. I am almost sure there was one map with it setup, but I might be wrong.

Yes, and I managed to set it up as mentioned above. Just wanted to share this here, because there is little info.

---

<div class="post-metadata">

**Author:** ![NilsonLima](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NilsonLima](https://forums.unrealengine.com/u/NilsonLima)\
**Post date:** [March 31, 2019, 4:07pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/164 "2019-03-31T16:07:18Z")

</div>

> [@unit23](#):
>
> Yes, and I managed to set it up as mentioned above. Just wanted to share this here, because there is little info.

Ah now understood the goal of your post, sorry that sometimes my english bets obfuscated when I exchange my language too many times a day, since there were a meeting with people talking in portuguese, italian, spanish and no english at all.

---

<div class="post-metadata">

**Author:** ![AntrHaXx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AntrHaXx](https://forums.unrealengine.com/u/AntrHaXx)\
**Post date:** [April 10, 2019, 8:21pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/165 "2019-04-10T20:21:02Z")

</div>

I have a building put under sea level and the water volume is displayinginside. Is there any way to prevent this from happening? I am currently working on UE 4.17.

Thanks!!

---

<div class="post-metadata">

**Author:** ![NilsonLima](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NilsonLima](https://forums.unrealengine.com/u/NilsonLima)\
**Post date:** [April 10, 2019, 10:02pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/166 "2019-04-10T22:02:31Z")

</div>

> [@AntrHaXx](#):
>
> I have a building put under sea level and the water volume is displayinginside. Is there any way to prevent this from happening? I am currently working on UE 4.17.
> 
> Thanks!!

Hi !

I have made two videos previously which explain ways to mask objects floating and underwater, please check those and let me know about your findings.

[https://youtube.com/watch?v=FUxQAv5FIuM](https://youtube.com/watch?v=FUxQAv5FIuM)

[https://youtube.com/watch?v=4XNaL5ePwPA](https://youtube.com/watch?v=4XNaL5ePwPA)

There are plans to have this changed/simplified/automated in the future, but no ETA.

---

<div class="post-metadata">

**Author:** ![AntrHaXx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AntrHaXx](https://forums.unrealengine.com/u/AntrHaXx)\
**Post date:** [April 11, 2019, 1:28am UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/168 "2019-04-11T01:28:23Z")

</div>

thx for your fast answering ! I’m not using the underwater blueprint. I just need to hide the ocean material inside the building. Is there any easy way to do that ? I tried to follow the second video but that didn’t work for me. This is what i have, i’m using the ssr ocean.

---

<div class="post-metadata">

**Author:** ![NilsonLima](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NilsonLima](https://forums.unrealengine.com/u/NilsonLima)\
**Post date:** [April 11, 2019, 11:23am UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/169 "2019-04-11T11:23:48Z")

</div>

The underwater is a postprocess effect that adds those effects (distortion, fog and wet lens) to the current scene color when you are below the water surface. The underwater effect is not related to any of the ocean materials (so you have following the video with the wrong material, I am sure I told which one). When you are underwater what you need to do is to not add the effects to the current scene color and instead let it with original color and for that you need a mask (1 will keep the effect, 0 will use default scene color) which is what I try to explain in the first video. There is a video at my YouTube channel which I explain exactly how the underwater effects are setup and explain how it works, maybe it is a pre-knowledge for you to completely understand what I have shown in the 1st video above.

---

<div class="post-metadata">

**Author:** ![AntrHaXx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AntrHaXx](https://forums.unrealengine.com/u/AntrHaXx)\
**Post date:** [April 12, 2019, 6:08pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/170 "2019-04-12T18:08:08Z")

</div>

Maybe I misunderstood something, but I’m not using the underwater bp, because I don’t need to go below the water surface in my game. So I only need to hide the ocean bp in the building area. In your first video, you explain how to hide underwater effects, but I don’t need it, there is no effect here and its ok like that. But I just need to hide the blueprint BP ocean, in this area. Your second video seems to be good to me, but my blueprint is not exactly the same… So it doesn’t work for me… I will join pictures. Thx for your time 😕

[![](https://cdn.discordapp.com/attachments/353660793432047616/566317725312352301/1-under.png) ](https://cdn.discordapp.com/attachments/353660793432047616/566317725312352301/1-under.png)

[![](https://cdn.discordapp.com/attachments/353660793432047616/566317729238220801/2-water.png) ](https://cdn.discordapp.com/attachments/353660793432047616/566317729238220801/2-water.png)

[![](https://cdn.discordapp.com/attachments/353660793432047616/566317731746545710/3-bp.png) ](https://cdn.discordapp.com/attachments/353660793432047616/566317731746545710/3-bp.png)

---

<div class="post-metadata">

**Author:** ![NilsonLima](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NilsonLima](https://forums.unrealengine.com/u/NilsonLima)\
**Post date:** [April 12, 2019, 7:04pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/171 "2019-04-12T19:04:14Z")

</div>

> [@AntrHaXx](#):
>
> Maybe I misunderstood something, but I’m not using the underwater bp, because I don’t need to go below the water surface in my game. So I only need to hide the ocean bp in the building area. In your first video, you explain how to hide underwater effects, but I don’t need it, there is no effect here and its ok like that. But I just need to hide the blueprint BP ocean, in this area. Your second video seems to be good to me, but my blueprint is not exactly the same… So it doesn’t work for me… I will join pictures. Thx for your time 😕

If you are inside a building partially submerged you can just make the BP\_Ocean not visible when in game by knowing when you overlap some trigger area in your game/scene.

---

<div class="post-metadata">

**Author:** ![AntrHaXx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AntrHaXx](https://forums.unrealengine.com/u/AntrHaXx)\
**Post date:** [April 12, 2019, 11:04pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/172 "2019-04-12T23:04:56Z")

</div>

Yes, I will do that if there is no other way, but the problem is that we can see inside the building and the outer ocean at the same time.

thx anyway

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7818390e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7818390e](https://forums.unrealengine.com/u/anonymous_user_7818390e)\
**Post date:** [April 19, 2019, 4:45pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/174 "2019-04-19T16:45:52Z")

</div>

I’ve had a problem while trying to install this, I’m pretty new to ue4 and I’ve been learning it but don’t know what to do in this case, what do I do here?

---

<div class="post-metadata">

**Author:** ![osiris\_dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/osiris_dev/32/88710_2.png) [@osiris\_dev](https://forums.unrealengine.com/u/osiris_dev)\
**Post date:** [April 21, 2019, 1:41pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/175 "2019-04-21T13:41:13Z")

</div>

Hello, first of all, want to say to all developers - great job! It’s a really impressive free plugin.

I also need a little help here - I am trying to create a simple scene with water surface patch on black screen, without foam - so I just added Ocen\_Ultra material instance to mesh, it works ok but it has artefacts when camera looking from small distance of water surface - take a look on image. Do yoг know how to resolve this?

---

<div class="post-metadata">

**Author:** ![NilsonLima](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NilsonLima](https://forums.unrealengine.com/u/NilsonLima)\
**Post date:** [April 21, 2019, 3:57pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/176 "2019-04-21T15:57:17Z")

</div>

> [@SpartanDevTeam](#):
>
> Any luck with the ai boats?

The buoyancy system would need to be changed in order for the regular AI movement work or all the movement should be written from scratch, including a custom navigation mesh, since the current won’t work either. I tried on different ways without touching the buoyancy code and I was not successful doing so.

---

<div class="post-metadata">

**Author:** ![NilsonLima](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NilsonLima](https://forums.unrealengine.com/u/NilsonLima)\
**Post date:** [April 21, 2019, 4:01pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/177 "2019-04-21T16:01:08Z")

</div>

> [@osiris\_dev](#):
>
> Hello, first of all, want to say to all developers - great job! It’s a really impressive free plugin.
> 
> I also need a little help here - I am trying to create a simple scene with water surface patch on black screen, without foam - so I just added Ocen\_Ultra material instance to mesh, it works ok but it has artefacts when camera looking from small distance of water surface - take a look on image. Do yoг know how to resolve this?

How many vertices/triangles you got in that mesh?  
Did you disable landscape modulation?

---

<div class="post-metadata">

**Author:** ![osiris\_dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/osiris_dev/32/88710_2.png) [@osiris\_dev](https://forums.unrealengine.com/u/osiris_dev)\
**Post date:** [April 22, 2019, 2:41pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/178 "2019-04-22T14:41:48Z")

</div>

> [@NilsonLima](#):
>
> How many vertices/triangles you got in that mesh?

A lot) It could be connected? Looks likу it’s pixel side issue.

Did you disable landscape modulation?

Probably not, but I have no landscape.

---

<div class="post-metadata">

**Author:** ![osiris\_dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/osiris_dev/32/88710_2.png) [@osiris\_dev](https://forums.unrealengine.com/u/osiris_dev)\
**Post date:** [April 22, 2019, 3:06pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/179 "2019-04-22T15:06:34Z")

</div>

This I reduced vertices, still artefacts

---

<div class="post-metadata">

**Author:** ![NilsonLima](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NilsonLima](https://forums.unrealengine.com/u/NilsonLima)\
**Post date:** [April 22, 2019, 5:27pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/180 "2019-04-22T17:27:16Z")

</div>

When using the original BP, it has a plane surface which is scaled to the viewer position and moved along with it to produce the effect of an infinite ocean. For this to be as realistic as possible with good performance and look, it is necessary a good amount of vertices near viewer position and less at horizon/infinite view. That said, you will be better with more vertices near points of interest at your scene and less vertices far away. Anyway, I never saw those artifacts before. I recommend you take a look on how the vertices are spread on the plane used in the project so you can understand which gives the best visualization, you can always scale it for your needs and works fine even being a circle shaped one.

The landscape modulation does not use the landscape reference per say, but uses a texture which represents the height information for the terrain, so the project with the island map has one, you just need to remove the texture and disable the landscape modulation at BP\_Ocean.

---

<div class="post-metadata">

**Author:** ![osiris\_dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/osiris_dev/32/88710_2.png) [@osiris\_dev](https://forums.unrealengine.com/u/osiris_dev)\
**Post date:** [April 26, 2019, 1:17pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/181 "2019-04-26T13:17:04Z")

</div>

Okay, Nilson, I think this issue is not about vertices grid, I didn’t see any problems in wireframe, but nevermind, I am not struggling with more problematic and strange issue - for Editor I can change global wave amplitude value and see how amplitude changes, but changing in in runtime give me no effect, how can I update amplitude in runtime?

---

<div class="post-metadata">

**Author:** ![Chosker](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chosker/32/710746_2.png) [@Chosker](https://forums.unrealengine.com/u/Chosker)\
**Post date:** [April 26, 2019, 2:07pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/182 "2019-04-26T14:07:10Z")

</div>

actually the artifacts look like the classic translucency sorting problem. I thought this project solved it with a customdepth approach?

---

<div class="post-metadata">

**Author:** ![osiris\_dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/osiris_dev/32/88710_2.png) [@osiris\_dev](https://forums.unrealengine.com/u/osiris_dev)\
**Post date:** [April 26, 2019, 2:14pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/183 "2019-04-26T14:14:01Z")

</div>

> [@Chosker](#):
>
> actually the artifacts look like the classic translucency sorting problem. I thought this project solved it with a customdepth approach?

I use in one project 2 different levels - one with blueprint from plugin, another with my plane + material from plugin, with same render setting water from plugin has no artefacts, so probably it’s not render settings issue, or it should be enabled somewhere in material?

---

<div class="post-metadata">

**Author:** ![NilsonLima](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NilsonLima](https://forums.unrealengine.com/u/NilsonLima)\
**Post date:** [April 26, 2019, 2:45pm UTC](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372/184 "2019-04-26T14:45:33Z")

</div>

> [@osiris\_dev](#):
>
> Okay, Nilson, I think this issue is not about vertices grid, I didn’t see any problems in wireframe, but nevermind, I am not struggling with more problematic and strange issue - for Editor I can change global wave amplitude value and see how amplitude changes, but changing in in runtime give me no effect, how can I update amplitude in runtime?

Before using the material on a plane, disregarding the blueprint, you need to check the blueprint which are the relevant settings altered into the material and create/change the material instance to reflect those changes (ie. custom depth).

In regarding to the wave amplitude, the blueprint changes that in a material parameter collection, so you will need to change that by hand exactly as the blueprint does when you do it in editor.

[Previous page](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372.md?page=8)

[Next page](https://forums.unrealengine.com/t/community-project-free-ocean-water-shader/115372.md?page=10)
