Community Tutorial: Ocean Simulation

Hey guys. Let’s see if anyone can help me. I followed the tutorial and initially it looked good to me. Running on 5.6 btw. But upon close inspection i have found problems. I use the material in a simple landscape but i’ve tried it in other geometry and the same happens.

The problem is that there’s this black tint all over the water that keeps moving and makes the sea very unrealistic. I think it’s a problem with my RT_Roughness as it appears completely black in the content browser.

Any idea on what can it be and how to solve it? Thanks!

@Deathrey


While roughness seems indeed wrong, your problem is caused by mismatch between lumen scene /distance field version of geometry and / or virtual shadow maps. and rasterized geometry with WPO.

1 Like

Hello, I folowed this tutorial and it’s absolutely great sim. I’m using 5.6, I got 2 problems after finished the tutorial, can you help me fix it.

First one is I have to open the NS_Ocean tab in another window in order to make the sim run, if I switch to another tab on that window, the sim stop, it just freeze, same when I close the tab.
Please see the video here. https://youtu.be/M3PFV64__-k

Second one is that my sim reset every 10 seconds making it looks very jitter, how can I make that period longer. The “Repeat period” doesn’t seem to affect that.

Thank you!

Thanks for the reply. And sorry for being the guy bumping up this post again every few days. You must have your notifications full of this..

I thought about shadows initially but no matter what setting i change in the lights, it can still be seen. Even with cast shadows off, so it needs to be something else. Any other idea?

Regarding the RT_roughness, the problem is solved now.

I know they’re just warnings but I’m getting these in my build and would like to clean them up if I can–

LogNiagaraShaderCompiler: Warning: GPU shader compile failed! Id: 3 Name: FX_OceanWater/WaterSim/ParticleGPUComputeScript/FNiagaraShader/4

LogNiagaraShaderCompiler: Warning: GPU shader compile failed! Id: 3 Name: FX_OceanWater/WaterSim/ParticleGPUComputeScript/FNiagaraShader/3

LogNiagaraShaderCompiler: Display: There were issues for job “FX_OceanWater/WaterSim/ParticleGPUComputeScript/FNiagaraShader/4”

LogNiagaraShaderCompiler: Warning: /Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.intermediate.usf(57,28-35): warning X3556: integer divides may be much slower, try using uints if possible.

LogNiagaraShaderCompiler: Warning: /Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.intermediate.usf(54,17-49): error X4026: thread sync operation must be in non-varying flow control, due to a potential race condition this sync is illegal, consider adding a sync after reading any values controlling shader execution at this point

LogNiagaraShaderCompiler: Warning: /Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.intermediate.usf(97,5-61): error X4026: this variable dependent on potentially varying data: stage_input

LogNiagaraShaderCompiler: Warning: /Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.intermediate.usf(25,130-179): error X4026: this variable dependent on potentially varying data: gl_GlobalInvocationID

LogNiagaraShaderCompiler: Warning: /Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.intermediate.usf(39,9-20): error X4026: this variable dependent on potentially varying data: _82

LogNiagaraShaderCompiler: Warning: /Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.intermediate.usf(41,29-43): error X4026: this variable dependent on potentially varying data: _98

LogNiagaraShaderCompiler: Warning: /Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.intermediate.usf(52,32-39): error X4026: this variable dependent on potentially varying data: _143

LogNiagaraShaderCompiler: Display: There were issues for job “FX_OceanWater/WaterSim/ParticleGPUComputeScript/FNiagaraShader/3”

LogNiagaraShaderCompiler: Warning: /Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.intermediate.usf(55,28-35): warning X3556: integer divides may be much slower, try using uints if possible.

LogNiagaraShaderCompiler: Warning: /Plugin/FX/Niagara/Private/NiagaraEmitterInstanceShader.intermediate.usf(52,17-49): error X4026: thread sync operation must be in non-varying flow control, due to a potential race condition this sync is illegal, consider adding a sync after reading any values controlling shader execution at this point

Sure, go ahead. I appreciate the credit.

Thank you!