I saw two articles, about using webgl to make high-performance water, above are two links, if you can’t open the access, can you inform me, I want to know how to implement the effect in the article in the three.js, is there any good resource open source to help?
You mean something like this example by Attila Schroeder? [See related discussion here.]
I used his program to create a simpler version which is incorporated in a module that I use for flight simulations, like this or this.
For best performance, I would suggest using WebGPU. However, if you are determined to use WebGL, I have a WebGL version of the above - which is an updated version of the jbouny program.
In the images that you posted above, the bottom example doesn’t need a special wave generator, but merely a reflective plane.
No, I hadn’t looked at them because I thought they were links to the 2 articles.
The examples that I provided use mesh geometries to create realistic 3D waves using the inverse fast fourier transformation.
However, the videos indicate that you may not need 3D waves. If so, you can use the three.js Ocean module that use normal maps to create the illusion of waves. Or if you are more interested in flowing water, you can use the Water2 module. And WebGPU offers another interesting variation that looks interesting both above and below the water.
So, just within three.js, you have many different artistic options available to you.
I know almost everything about creating water in video games.
In the example “tamats” foam trail is texture appling to water shader, but thre trail applied for one boat, other boats wihout trails, because of performance. You can see code with extension Spector.js. Waves is one plane with projectes waves and have issue in some angles.
Another solution is using render target texture where you can project boat position like white color and then in fragment shader change white color to foam. And maybe for large distance need to use several render target to show trail for far boats.
Foam trail-fluid: Register | The Digital Fairy
Source: GitHub - jwagner/fluidwebgl: WebGL Fluid Simulation
Last year i made some types of water.
Thanks for this demo (its 2D, but in my project its already 3D waves): GLSL Sandbox
Okay, it looks like I need to find a way to find a good transparent texture and figure out where to place the texture within my particular grid system since I will not always be aboard the ship.