representing ocean waves
I'm working on a simulation of boats on ocean, including waves (and a relatively realistic physics implementation) and one of the things that I'm wondering is how to represent the moving ocean "terrain". I currently use a png terrain heightmap to represent the ocean which has the issue that it's not moving, which is actually OK for certain types of simulation, but not all. I'm wondering about how to make the ocean move. In physics I can get the MeshURI and then access the mesh and modify it using the mesh manager. But that's all gzserver-side and I presume doesn't do anything for gzclient? Do I need to run the ocean wave generation algorithm twice and also modify some mesh (haven't looked where) in the client? Any suggestions overall for how to handle the ocean?
You should take a look at the uuvsimulator project, as far as I understand they're focused on underwater, but they have nice water surface visuals that move in an open loop https://github.com/uuvsimulator/uuv_simulator .
thanks for answering all my questions ;-)
Mhh, I'm not seeing any water surface modeling there nor any moving surface model.
The ocean model for example is here: https://github.com/uuvsimulator/uuv_simulator/tree/master/uuv_descriptions/world_models/ocean You'll need to look at other directories for the mesh and material scripts. Note this is only rendering water visuals on gzclient. This is what it looks like: https://youtu.be/6V_TR9i0k1Q?t=24s
I used that once here: https://bitbucket.org/chapulina/simslides/src/de9b10e6e93c/models/ocean/?at=OSCON_May2017
Interesting, thanks for taking the time to paste the links. I had no idea about GLSL... Food for me to understand :-). Quick question: if you place the viewpoint just above water level, do you see the waves in 3D or is this all "just" making a flat ocean surface have the look of waves from the distance?
It goes up and down: https://twitter.com/chapulinaBR/status/861285867809198080