# WaveWorks Infinite Ocean Planes

**URL:** <https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [October 20, 2015, 3:42pm UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226 "2015-10-20T15:42:40Z")\
**Posts on this page:** 19\
**Page:** 3

<div class="post-metadata">

**Author:** ![DigiTecK3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DigiTecK3D](https://forums.unrealengine.com/u/DigiTecK3D)\
**Post date:** [December 14, 2016, 8:10pm UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/42 "2016-12-14T20:10:14Z")

</div>

N8128, Thank you so much for a more thorough explanation on the issue! This will help greatly and hopefully anyone else that comes after us to save them a load of time tracking down this issue. We where suspecting it had something to do with that new ::NeedsLoadForClient() function but where dumb founded as to why it was happening and its nice to get an explanation on why the cooker is stripping out the assets. It all makes more sense now why it had been happening in the 4.12.5 build and not in the 4.9.2 builds.

So I’m starting to assume that the ::NeedsLoadForClient() function can’t be overwritten just for the MaterialExpressionWaveworks.h because all the other expressions run the same check and fail and strip out on cook as well? So now I also see and understand why you are saying we have to change it on a global scale at the root level for UMaterialExpression.

```auto

bool UMaterialExpressionWaveWorks::NeedsLoadForClient() const
{
    // We need the asset cooked
    return true;
}

```

---

<div class="post-metadata">

**Author:** ![Avicr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Avicr](https://forums.unrealengine.com/u/Avicr)\
**Post date:** [December 22, 2016, 8:18pm UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/43 "2016-12-22T20:18:47Z")

</div>

> [@N8128;637836](#):
>
> No problem. I know what you’re talking about, your WaveWorks expressions get stripped in 4.12.5, I’ll just copy/paste my part of the email dialog with NVIDIA in October:
> 
> "First, it took me a while to figure out why WaveWorks is not working in the packaged game, after seeing that there are MaterialExpressions missing in the ocean shader (that’s using WaveWorks) when debugging packaged game,  
> I searched UE4 release notes and found this: “New: Material expression objects that are not required in cooked build will now be stripped from cooked packages.”. Since I clearly needed all stripped expressions in ocean material, there had to be a problem.  
> Indeed it was, in the file (UE4 project) “MaterialExpressions.cpp” there are multiple new overriding methods that start with “NeedsLoadFor…” these return true is something (like material expression, material function call etc.) is needed in a certain context (Client, Server) or false if is not.  
> My problem was caused by “bool UMaterialExpression::NeedsLoadForClient() const” that stripped my WaveWorks expression because it assumes that “Expressions that reference texture objects need to be cooked” the WaveWorks expression does not DIRECTLY reference texture object and therefore it gets stripped and breaks the material,  
> which triggers a series of events that totally disable WaveWorks.
> 
> Quick fix is to just always return true in these functions. I ended up adding “bool NeverStrip;” to UMaterialExpression and then returning true if(expression has texture reference or NeverStrip is true), so that you can check that in the material editor for situations like this."
> 
> Follow the above and it should fix your 4.12.5 problem.

I have fixed the wave works material expression being cooked out by returning true in NeedsLoadForClient(), but the wave works asset still will not show in a cooked build. The cooked build crashes after a “random” amount of time somewhere in either an nvidia dll, or D3D11 itself. This leads me to believe some wave works RHI or other render resource is not being setup correctly during cooked build execution. Any other tips you can provide?

---

<div class="post-metadata">

**Author:** ![N8128](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@N8128](https://forums.unrealengine.com/u/N8128)\
**Post date:** [December 22, 2016, 9:59pm UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/44 "2016-12-22T21:59:52Z")

</div>

> [@DigiTecK3D;638070](#):
>
> N8128, Thank you so much for a more thorough explanation on the issue! This will help greatly and hopefully anyone else that comes after us to save them a load of time tracking down this issue. We where suspecting it had something to do with that new ::NeedsLoadForClient() function but where dumb founded as to why it was happening and its nice to get an explanation on why the cooker is stripping out the assets. It all makes more sense now why it had been happening in the 4.12.5 build and not in the 4.9.2 builds.
> 
> So I’m starting to assume that the ::NeedsLoadForClient() function can’t be overwritten just for the MaterialExpressionWaveworks.h because all the other expressions run the same check and fail and strip out on cook as well? So now I also see and understand why you are saying we have to change it on a global scale at the root level for UMaterialExpression.
> 
> ```auto
> 
> bool UMaterialExpressionWaveWorks::NeedsLoadForClient() const
> {
> // We need the asset cooked
> return true;
> }
> 
> ```

You are correct about doing it only in WaveWorks, it will break other expression because they are not linked to any valid texture reference, so the same check fails as you’ve said. I’ve planned on replying to point out the specifics on doing this, but you figured it out before, so glad it helped!

> [@Avicr;641720](#):
>
> I have fixed the wave works material expression being cooked out by returning true in NeedsLoadForClient(), but the wave works asset still will not show in a cooked build. The cooked build crashes after a “random” amount of time somewhere in either an nvidia dll, or D3D11 itself. This leads me to believe some wave works RHI or other render resource is not being setup correctly during cooked build execution. Any other tips you can provide?

The crash is caused by parallel renderer, here’s my solution, taken from another email of mine:

"The reason was that in UE 4.12, Epic changed randerer to issue draw calls in parallel by default: “New: Changed PC to default to parallel rendering when not in editor.”. This change is in “WindowsPlatform.h” the “#define PLATFORM\_RHITHREAD\_DEFAULT\_BYPASS 1” changed to “#define PLATFORM\_RHITHREAD\_DEFAULT\_BYPASS WITH\_EDITOR” this propages to console variable “CVarRHICmdBypass” in “RHICommandList.cpp” and undirectly enables parallel algorithms. I just use console command “r.RHICmdBypass” and set it to 1 to disable parallel algorithms as was the default until now. I’ve encountered this before and that helped me a lot to figure this one out. "

So to sum it up. Go to “\Engine\Source\Runtime\Core\Public\Windows\WIndowsPlatform.h” and change “#define PLATFORM\_RHITHREAD\_DEFAULT\_BYPASS WITH\_EDITOR” to “#define PLATFORM\_RHITHREAD\_DEFAULT\_BYPASS 1” OR probably even better, leave it as it is and change this in the config files or in blueprints with command “r.RHICmdBypass 1”, the important thing is that you turn off the parallel renderer before WaveWorks gets initialized and used. Hope it helps!

---

<div class="post-metadata">

**Author:** ![TX\_LOSER](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TX\_LOSER](https://forums.unrealengine.com/u/TX_LOSER)\
**Post date:** [December 26, 2016, 3:59pm UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/45 "2016-12-26T15:59:05Z")

</div>

Does 4.13\_Preview\_nvdia\_techs contain Waveworks? or 4.12.5\_nvdia\_techs contain it ?

---

<div class="post-metadata">

**Author:** ![DigiTecK3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DigiTecK3D](https://forums.unrealengine.com/u/DigiTecK3D)\
**Post date:** [December 26, 2016, 6:57pm UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/46 "2016-12-26T18:57:45Z")

</div>

N8128 As always thank you for the invaluable information!

Tx\_Loser - 4.13 does not have any of the waveworks tech in it, at the moment it looks to be only in the 4.12.5 branch. But if you extract out only the waveworks integration you should be able to move it up to the 4.13 branch.

---

<div class="post-metadata">

**Author:** ![TX\_LOSER](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TX\_LOSER](https://forums.unrealengine.com/u/TX_LOSER)\
**Post date:** [December 27, 2016, 8:26am UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/47 "2016-12-27T08:26:32Z")

</div>

> [@DigiTecK3D;642857](#):
>
> N8128 As always thank you for the invaluable information!
> 
> Tx\_Loser - 4.13 does not have any of the waveworks tech in it, at the moment it looks to be only in the 4.12.5 branch. But if you extract out only the waveworks integration you should be able to move it up to the 4.13 branch.

Thanks! But I want to know how use waveworks in the 4.12.5. I did found any project about waveworks,I download waveworks branch and open the project, found the plane and the material is black!

---

<div class="post-metadata">

**Author:** ![DigiTecK3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DigiTecK3D](https://forums.unrealengine.com/u/DigiTecK3D)\
**Post date:** [December 27, 2016, 3:24pm UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/48 "2016-12-27T15:24:28Z")

</div>

Tx\_Loser, I see what your saying now, it took me a sec to understand how to set it all up since there really is no documentation how on to use it or set it up. Also it is very basic and not a fully setup system, all those aspects have to be on you and what you want to do with it. I.E… the material shader is there for the ocean rendering etc… But here is a basic setup on how to work with waveworks.

For the waveworks to work you will need three assets at bare minimum, which includes making the waveworks  
asset that houses all the settings for the ocean settings and the waveworks material with a waveworks node  
referencing the waveworks asset and also a new blueprint with the waveworks infinite ocean system.  
 ![b835902b0d51ab148f40f2669085813bd1ef0db4.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

You need to make a new material for your ocean that will have a waveworks node in it and this node will reference  
the waveworks asset and must have a texture coord in the uv’s to work.  
 ![cf22159d36abf22f1c0edab79549e41cf34f251e.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

Along with the waveworks node and asset, the shader must have the flat tessellation enabled so the material will  
activate the waveworks rendering. If not the material will not work.  
 ![fc82ebff0f3910748ac71c08b59f9a46deb27dc3.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

You need to make a new blueprint actor and when you have it created add a new waveworks component. This is  
what is the quadtree system for the infinite ocean plane.  
 ![b0ff7454639baa06d40b0cc34d7c7d9eb9b29b82.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

Once you have the blueprint with the new waveworks component then you need to assign the waveworks material  
to the waveworks component so the infinite ocean plane can render the mesh.  
 ![8074305a5fced5746c36a778a0ece1e9c0cf63ca.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

---

<div class="post-metadata">

**Author:** ![TX\_LOSER](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TX\_LOSER](https://forums.unrealengine.com/u/TX_LOSER)\
**Post date:** [January 1, 2017, 4:43am UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/49 "2017-01-01T04:43:14Z")

</div>

Thanks so much

---

<div class="post-metadata">

**Author:** ![TX\_LOSER](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TX\_LOSER](https://forums.unrealengine.com/u/TX_LOSER)\
**Post date:** [January 1, 2017, 4:44am UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/50 "2017-01-01T04:44:12Z")

</div>

> [@DigiTecK3D;643107](#):
>
> Tx\_Loser, I see what your saying now, it took me a sec to understand how to set it all up since there really is no documentation how on to use it or set it up. Also it is very basic and not a fully setup system, all those aspects have to be on you and what you want to do with it. I.E… the material shader is there for the ocean rendering etc… But here is a basic setup on how to work with waveworks.
> 
> For the waveworks to work you will need three assets at bare minimum, which includes making the waveworks  
> asset that houses all the settings for the ocean settings and the waveworks material with a waveworks node  
> referencing the waveworks asset and also a new blueprint with the waveworks infinite ocean system.  
> ![b835902b0d51ab148f40f2669085813bd1ef0db4.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)
> 
> You need to make a new material for your ocean that will have a waveworks node in it and this node will reference  
> the waveworks asset and must have a texture coord in the uv’s to work.  
> ![cf22159d36abf22f1c0edab79549e41cf34f251e.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)
> 
> Along with the waveworks node and asset, the shader must have the flat tessellation enabled so the material will  
> activate the waveworks rendering. If not the material will not work.  
> ![fc82ebff0f3910748ac71c08b59f9a46deb27dc3.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)
> 
> You need to make a new blueprint actor and when you have it created add a new waveworks component. This is  
> what is the quadtree system for the infinite ocean plane.  
> ![b0ff7454639baa06d40b0cc34d7c7d9eb9b29b82.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)
> 
> Once you have the blueprint with the new waveworks component then you need to assign the waveworks material  
> to the waveworks component so the infinite ocean plane can render the mesh.  
> ![8074305a5fced5746c36a778a0ece1e9c0cf63ca.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

Thanks so much!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_595f74f21](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_595f74f21](https://forums.unrealengine.com/u/anonymous_user_595f74f21)\
**Post date:** [January 16, 2017, 9:26am UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/51 "2017-01-16T09:26:39Z")

</div>

Is this wave geenerator run just by a blueprint ?  
i need waves in my game for some of the planets.

---

<div class="post-metadata">

**Author:** ![DigiTecK3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DigiTecK3D](https://forums.unrealengine.com/u/DigiTecK3D)\
**Post date:** [February 1, 2017, 3:02am UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/52 "2017-02-01T03:02:24Z")

</div>

If you are using a UE4 Build that has the Nvidia waveworks integrated into it, then yes you setup the wave generator in this fashion by using a blueprint setup.

---

<div class="post-metadata">

**Author:** ![DrCorvax](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DrCorvax](https://forums.unrealengine.com/u/DrCorvax)\
**Post date:** [February 3, 2017, 11:36am UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/53 "2017-02-03T11:36:27Z")

</div>

Could anyone please post minimal working project using WaveWorks.

---

<div class="post-metadata">

**Author:** ![DigiTecK3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DigiTecK3D](https://forums.unrealengine.com/u/DigiTecK3D)\
**Post date:** [February 4, 2017, 1:36am UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/54 "2017-02-04T01:36:00Z")

</div>

Are you using the 4.12 waveworks build?

---

<div class="post-metadata">

**Author:** ![TX\_LOSER](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TX\_LOSER](https://forums.unrealengine.com/u/TX_LOSER)\
**Post date:** [March 9, 2017, 11:42pm UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/55 "2017-03-09T23:42:39Z")

</div>

> [@TX\_LOSER;643004](#):
>
> Thanks! But I want to know how use waveworks in the 4.12.5. I did found any project about waveworks,I download waveworks branch and open the project, found the plane and the material is black!

Excuse me, can you tell me how to extract out only the waveworks？

---

<div class="post-metadata">

**Author:** ![DigiTecK3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DigiTecK3D](https://forums.unrealengine.com/u/DigiTecK3D)\
**Post date:** [March 14, 2017, 6:25pm UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/56 "2017-03-14T18:25:59Z")

</div>

> [@TX\_LOSER;678679](#):
>
> Excuse me, can you tell me how to extract out only the waveworks？

Tx\_Loser, This isn’t exactly a very quick and simple thing to do exactly. I had to go back to the engine drop with waveworks,hairworks and the various nvidia tech in it for the 4.12 version and get a blank engine 4.12 and difference the two engines to pull out the difference and then extract out all the waveworks code. Which involved also cleaning out the various other nvidia tech I didn’t need since I was only concerned with waveworks code. Then integrating the isolated waveworks code into our blank work engine 4.12 version for the project we needed to have water in.

Recently one of our lead tech artist took that isolated code and had to integrate it up to 4.14 for us and from talking to him that also had some issue do to with some rendering and file location changes so he had to find those differences and put them in the proper location and adjust for rendering changes. Wasn’t a lot of changes, but enough that it was still more work on top to maintain waveworks.

---

<div class="post-metadata">

**Author:** ![TX\_LOSER](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TX\_LOSER](https://forums.unrealengine.com/u/TX_LOSER)\
**Post date:** [March 20, 2017, 3:26pm UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/57 "2017-03-20T15:26:59Z")

</div>

Thanks a lot ！

---

<div class="post-metadata">

**Author:** ![TX\_LOSER](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TX\_LOSER](https://forums.unrealengine.com/u/TX_LOSER)\
**Post date:** [March 20, 2017, 3:36pm UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/58 "2017-03-20T15:36:46Z")

</div>

> [@DigiTecK3D;680813](#):
>
> Tx\_Loser, This isn’t exactly a very quick and simple thing to do exactly. I had to go back to the engine drop with waveworks,hairworks and the various nvidia tech in it for the 4.12 version and get a blank engine 4.12 and difference the two engines to pull out the difference and then extract out all the waveworks code. Which involved also cleaning out the various other nvidia tech I didn’t need since I was only concerned with waveworks code. Then integrating the isolated waveworks code into our blank work engine 4.12 version for the project we needed to have water in.
> 
> Recently one of our lead tech artist took that isolated code and had to integrate it up to 4.14 for us and from talking to him that also had some issue do to with some rendering and file location changes so he had to find those differences and put them in the proper location and adjust for rendering changes. Wasn’t a lot of changes, but enough that it was still more work on top to maintain waveworks.

I have saw an update in waveworks, and I compare waveworks branch with UE4.15 , the github display able to merge . So, does it support ue4.15? If i want merge several nvidia branch, can only click creat pull request?

---

<div class="post-metadata">

**Author:** ![jamietelford](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jamietelford](https://forums.unrealengine.com/u/jamietelford)\
**Post date:** [March 23, 2017, 1:25am UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/59 "2017-03-23T01:25:33Z")

</div>

Update for Unreal 4.15 is pretty sweet… has interaction and wave action with the coast line… This was their update for GDC this year

v=DhrNvZLPBGE

---

<div class="post-metadata">

**Author:** ![Walid\_Chekkouri](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/walid_chekkouri/32/1194685_2.png) [@Walid\_Chekkouri](https://forums.unrealengine.com/u/Walid_Chekkouri)\
**Post date:** [August 5, 2020, 6:42pm UTC](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226/60 "2020-08-05T18:42:56Z")

</div>

@ **I’m trying to use the WaveWorksFloatingComponent for my pawn (boat simulation) however it doesn’t float, it seems to work only for Actors not Pawns, any suggestions?**

[Previous page](https://forums.unrealengine.com/t/waveworks-infinite-ocean-planes/45226.md?page=2)
