Foam outside grid

Doing a ship sailing through the ocean as many before me, but when the foam hits the end of the grid, it changes color. Why?

Hey.

The foam seems to go underwater. You can correct it from the Particle Shader’s Vertical Offset option.

Cheers!

But if I do that, wont it affect the entire scene? Also, how do I know what to set it at?

Yup, it will affect all the foam particles and you have to trial-and-error it. Even though particles can exist outside the simulator, once they exit it, fluid rules stop applying to them. In this case if the simulator’s liquid surface was lower than the fillup level, foam particles would exit the simulator and suddenly appear underwater, and will not re-surface. Unfortunately this cannot be controlled directly currently at simulation level, so you have to adjust it at render time.