Hello, recently I’ve been working on a water system for rendering fluid simulation in Unity. Currently, work is under way to simulate and render the ocean near the coastline. The fluid simulation itself is performed using the particle-in-cell method, then this module uses the saved data (fluid surface and particles) for rendering.
The video below shows a simple example of simulating the surf zone (5 second loop). For better quality watch in 4k.
There are obvious flaws in the video (development is in progress), but it gives the general idea.
It is planned that this module will require about 512 MB of video memory. For each type of shoreline, 50-200 MB of disk space is required. If there are 20 different types of shoreline in a game, it will require 1-4 GB of disk space depending on the complexity of the flow.
Now, work is underway to create a library of different types of shoreline, combining which (manually or procedurally) the game level is created. By type of shore is meant a geometry that affects the behavior of the fluid near the shoreline. Color, texture, the presence of additional objects, whose difference in geometry does not affect the flow, can be arbitrary.
The shoreline will be constructed in two stages:
Drawing a spline;
Filling the shoreline with different types of shore along the spline (for example sandy beach, rock, pier, shipwreck, seawall, …).
Yes, we have such plans. Now the work is far from complete. Many things need to be figured out.
Now I’m working on data compression, the small example of the simulation shown above now requires 700 MB of video memory for textures. I’m sure that we’ll get a compression ratio of 30-40%, totaling about 250 MB. This is just for the shoreline, also games may require: boat wakes, splashes, streams, etc.
In the first message I’ve paraphrased the questions I’m concerned about. I would be grateful if you could answer them.
I work on a maritime simulation. So I need to have all these feature. Very important is a boundless ocean and also boat wakes splashes and of course underwater view. Performance is of secondary importance because I don’t want to support mobile platforms. Nevertheless I need enough performance to create realistic sceneries.
I really want to see an finished water asset of your work. I like the look and movement of the water. And the shoreline looks outstanding.
This years top gaming cards are averaging 8GB of VRAM and mid-range gaming laptops from 2015 like the one I have are in the neighborhood of 2-3GB of VRAM.
Now if the average game takes roughly 4 years for a team to build then it’s entirely possible that the average gaming machine will have a minimum of 4GB’s of VRAM by the time you are finished if that’s not already the case now.
No matter what happens with that, what you are doing is entirely practical because it’s amazing and everyone wants to see a game that looks that good.
Even if all you make is a tech-demo that most machines can’t run, you’ll have so many job and partnership offers that what you are doing will eventually come to something big. If you end up meeting someone who knows how to optimize your work then you have no problem at all.
If it’s awesome, people will buy better machines just to play it. I haven’t heard anyone say “killer-app” in a long time. Bring it back!
Wow. This is the best ocean asset that i have ever seen. I would love to feature it in my game or in upcoming projects. Are there any details about this being made public being available? I’d love to test it. The video shown looked amazing in a experimental state. Need a tester?
I think some projects would have no problem with 256-512MB. A gig isn’t practical for games but Unity serves many markets that don’t care about limitations - they will throw more hardware at it (sim, military, arch vis, film)
This is impractical for the scale given, for most games but again see the above comment, Unity doesn’t just serve game markets
Ideally a solution like this for console games, would not cost more than 256MB of video memory and have a fixed storage size regardless of how much it’s used, so some form of reuse would be interesting.
This is only my opinion in relation to things similar to my current project.
Hello,
The next question is how to design a game level with a shoreline. As far as I understand, the standard method assumes that firstly the sculpting of the terrain is made and then the ocean plane is placed. In this case, this method is hardly possible, the simulation will take a lot of time to calculate and a lot of disk space for storage.
To solve this, it is proposed to create a library of different types of shoreline, combining which (manually or procedurally) a level is created. By type of shore is meant a geometry that affects the behavior of the fluid near the shoreline. Color, texture, the presence of additional objects, whose difference in geometry does not affect the flow, can be arbitrary.
The shoreline will be constructed in two stages:
Drawing a spline;
Filling the shoreline with different types of shore along the spline.
Below is an example of the layout of a coastline (about 500 m) using 6 types of coast.
Sand (5)
Rocky beach (2)
Transition Sand - Rocky beach (1)
Transition Rocky beach - Sand (1)
Pier (1)
Shipwreck (1)
Below, as an example, a video of one of the shoreline segment (bridge pier) is shown.
Question:
Would it be convenient to use the above-described scheme for constructing a shoreline in the production of games?
I would really appreciate your answers.