WaveMaker - Wave simulation asset Official Thread

Good question. This is something that a lot of people ask. It hasn’t changed since v1.

The current restriction in a surface is the number of vertices allowed in a single mesh in Unity. It is right now at 56k. Each surface is a single mesh, and it is definitely not a GPU generated mesh. This allows different types of interaction than the typical water-looking shader as well as compatibility with some devices that have problems with GPU support.

To achieve 56k max vertices needs 256x256 resolution or a combination that stays under that amount, which is pretty detailed for a medium surface. If you want very detailed waves, you will have to stick with smaller surfaces.

I’m planning to separate the surfaces in several meshes so that you can create more complex shapes the same way terrains work (being slower, for sure), but right now playing with the resolution, the size and the fixed-cells you can achieve many shapes and people seem to be quite happy with that.

Having a two-way coupling system (waves move objects + objects generate waves) in real-time requires a lot of computation and generally is not a good idea to use GPU algorithms only.

There are plenty of improvements that can be achieved combining meshes.

Nice to see someone focusing purely on this awesome concept! Real-time water deserves a lot of love.

If I may make a suggestion? I think more people would be interested to use this, if they knew right upfront what performance cost this package would have in their project. We have our existing game logic, rendering etc. to accommodate, and it could be asking a lot to include a package that also calculates waves in real time.

So it would be super useful to see a video with table of stats showing simulation quality and water surface size on various different devices (some older mobiles included) just to get a sense of what the cost is to run this. I’d be keen to see CPU spec for reference, how many cores (or jobs) and what percentage of those are used. Maybe show each simulation-per-CPU-per-quality-level, in sequence, with Unity’s profiler showing salient data for each. (Not sure if you are using PhysX here, but I guess that could complicate things a little since some work is offloaded to the GPU, I believe.)

This should lower the barrier to entry for new users which, since this is a paid asset, is I think what you want.

Thanks a lot for your suggestion. I know this is probably one of the most important concerns people would have.

I have performance tests made with a package but seems like the reports are not working well, the html is not correctly generates…The system is crappy.

I will try to run tests by hand and add more info. My PC is pretty new, the specs are really good, so I should run this on several PCs and devices as you say and give some information.

I should definitely improve the look of the videos and examples. I’m aware of that but my time is limited. I’ll do my best

Hi there. I’m getting an error when I run WaveMaker 2.

“A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details.”

The leak seems to be a real issue. At first everything is fine, then the texture disappears and then one of the spheres disappears. (I’m using your Simple Setup scene.)

Any suggestions on how to fix it? Thanks!

Hey! That’s an unexpected error.
Please, send me an email. You’ll find it in the last section of the official website

Hi everybody! Time for an update.

At last, version 2.3 has been released. It’s all changes and fixes of important bugs and undesired effects. Don’t forget to upgrade!

A summary of what’s important about this release:

  1. Fixed problems with scales in hierarchy and scale in the surface. Local mesh size is the internal size. Scale shouldn’t be used to modifiy the size of the surface! The simulation will scale too!
  2. Very serious stability problems with buoyancy are fixed now. Objects float correctly and near the surface now.

Bug Fixes:

  • Rigidbodies approaching a buoyancy enabled surface slow down a big distance before even touching it.

  • Different world and local scale and sizes don’t work as expected resulting in incorrect buoyant forces for children of scaled objects and similar situations. Documentation updated.

  • Velocity based interaction mode doesn’t detect interactors for certain combinations of size and resolution.

  • Improved calculation of buoyancy damping. Objects were not stable and had unnatural positions while floating.

  • Increased stability on Buoyancy. Warning: Your current rigidbody masses and buoyancy damping values will have to be readjusted if you notice unstability. If you can’t stabilize the floating objects with any damping value (around 0.002 to 0.2), try increasing the mass of the object. Extremely light objects tend to be unstable in general.

Changes:

  • Improved Catamaran sample scene with a follow cam and better textures.
  • Removed slider range on buoyancy damping. Values are relative to the size and size of the surface and should be very low to avoid unstabilities.
  • Debugger component improved in several areas (relative velocity, fixed some bugs)

Efficiency:

  • Update() is now barely called, only when changes happen to the mesh, reducing CPU constant use.
  • Detection distance of interactors has been greately reduced

Upcoming features:

Remember you can check the Trello board to know the status of upcoming features and bugs:

I’m working on good looking scenes for the videos. Specifically on URP and HDRP to show the independence of WaveMaker from whatever pipeline, material and shader you’re using.

I added a new screenshot to show people that it’s not up to WaveMaker how it looks but you can do whatever you want with it! That’s my new scene with a Sponza Atrium model fixed by the Arnold Renderer folks with an awesome looking Mixamo character walking in the water. I can’t show videos right now but I bet you’ll like the look in movement.

That’s my new water shader in HDRP (and in URP) that will be added in the asset soonish, with reflections, refractions, and other such effects. Seems like some people think that WaveMaker looks like in the videos, even though it is just a mesh modifier and I’m using a standard material… but nobody likes the default blue surface. So I’ll add that water shader to help people give a chance to WaveMaker :slight_smile:

I’m also working on softening the normals on the surface. Right now normals are set by vertex. That makes the surface doesn’t look soft but “poligonal”, as you can see in the official videos. I’ll add a feature to soften the normals by using a procedural normal map that will be replaced in your material in runtime.

The third important feature I’m working on is one that many find interesting and useful. It is a way to let WaveMaker simulate around a given object even when moving, so that you can simulate infinite water surfaces with just a small area actually simulating, making it look like the whole ocean is simulated. That’s incredibly interesting for games like boat racing or big water levels. Who knows!

What do you think about these features? Are you interested in any other?
Let me know!

2 Likes

Congrats on the update release!
Feature idea: Can an object make a permanent displacement, not just a wave, like a hole in the water to se the bottom of a lake etc?

Hey Khos! Thanks.
You can do that in a couple of ways: One of them is use a material that has a hole in that place (create your own material with transparency). You could create a shader that sets that transparency if you want it to move.

The other solution is to use the API of the surface. Get the surface component via code, and set particular positions in the plane (x, z), from 0 to resolutionX and 0 to resolutionZ, to fixed via surface.descriptor.SetFixed(posX, posZ). Those will not be simulated. Then you can set the height of those positions (the height is 0 on the surface level, so a value of -2 for example would set them to -2 unity units from that surface) with surface.SetHeight(x, z, value). That will probably generate ugly geometry, but you can see the idea.

There’s no way to paint it or modify it by hand right now.

1 Like

Hey there, I was thinking more in lines of your asset being able to simulate something like this:
7883215--1002967--upload_2022-2-9_17-50-50.png
This is a screen from the break waters game. I feel it should be possible using your asset as you are already manipulating the surface with your script (I think WaveMakerInteractor). I wonder ! :slight_smile:

Yep! Nice idea! I’m working on more general features right now, but this one (modifying the surface’s properties in areas and creating offsets) is definitely one of the features I have on the public list. Thanks!

1 Like

Hi dev! @Darkgaze
I have some problem here. So i m going to use wave maker 2 on my 3nd project, but it shows error when im importing wave maker 2. I already read the doc getting started.

Im using unity 2021.3 LTS, URP. With latest version mathematics, and burst. But i cant see the version of Job, and unity.collection. Tried to download the link you post, job and unity.collection but there are no download button. It said that job is built in.

What should i do?

The error shows “interactionType”. I will share the ss log asap.

And thanks.

Hey! You can contact me at unitysupport (at) lidia-martinez.com
If you follow exactly the guide in the website (in the Learning Portal section) you will see how to fix that. Please, follow the steps: http://wavemaker.lidia-martinez.com/2.3/learning.html

Hi Lidia Martinez! Thanks for the reply. Actually i need another guide. So i try to build mobile games where the player can walk on the water and create a little wave, like the video below

But the real project, i need a water base with 300x300 Local Mesh Size. And due to limitation the Descriptor limitation, i can’t create the wave as i expected.

I read the whole documentation, and i think i should use Velocity based, because the target platform is Mobile device. I tweaked the Water surface properties but still cant make it work. Also i tried to attached the Water surface to player, but the interactor doesnt work.

So, any guide or way around to make it happen? Im beginner with 60 days less experience in Unity. Any support would really be appreciate. Thank you.:slight_smile:

Hey.
As I said in the previous message, this is a support message, please send it to:
unitysupport (at) lidia-martinez.com

Also, as said in the Asset Store page:

:heavy_check_mark: What the asset CAN do…

  • Create small, medium or long surfaces like pools, portals, ponds, simple river shapes….

In the documentation, in the Surface section:

Avoid these

  • Making the grid size of the mesh (visible via “Wireframe” view in the scene view) bigger than the interactors.

First, WaveMaker is currently not made for oceans. What you are creating here is a huge sea space of water, the size of the mesh grid is bigger than the collider you are using, and the limitation of mesh size is not allowing you to have detailed detection of your colliders.

Please, send me an email to continue talking about this. Thanks :slight_smile:

Great, i will send a message when need another guide

Hi all !
WaveMaker has been updated to version 2.3.1. A couple of bugfixes, one of them is quite important, I’ve changed the way the Descriptor files generate data in the scene.

  • Removed NullPointerException when Undoing after deleting a Descriptor file.
  • Fixed NativeArray not being disposed error after build on some platforms. Native containers in the Descriptor file are now created and disposed on demand after certain actions performed. Important memory usage reduction if scene uses many Descriptors.

About the evolution of WaveMaker, huge changes were coming for 2.4 but I had to stop due to health issues and another project that I’m finishing: a smaller asset that I’m going to release in the next weeks.

WaveMaker 2.4 will have, among other changes, a nice looking water shader so that people stop thinking that WaveMaker looks only like the default shader it has in the demo videos. Apart from that, being able to export and import Descriptor data from/to textures, and other stuff. Stay tuned!

4 Likes

Hi, could I ask a question, why does the wavemaker interactor script need a collider and rigidbody? I am having trouble adding this to my vehicle… to be ale to make a 4 legged vehicle’s legs move the water surface, as soon as I add the script a rigidbody and collider is added, then the 4 legged vehicle does not work well, I think the collider might be messing something up, not sure. Is there any way to interact with the water without adding the collider/rigidbody?

8691465--1172703--upload_2022-12-29_0-26-9.png

Ignore the above post please, figured it out, was a layer issue:

https://www.youtube.com/watch?v=osl9rUV1PkQ

Sorry for the delay. It was holidays for me ! Ahh. That looks nice. :slight_smile: I guess that’s mud, otherwise, I’d make it a little soft, lowering the dampening of the fluid.

I had big updates for WaveMaker, to be honest. But I started to work on a studio and time went from 100% to 5%. I just sent for review another little asset that I worked on to rest a little bit from WaveMaker and I finished it during the holidays. Now I’ll have some time to work on WaveMaker, it was nearly done but I encountered several bugs on 2022 that didn’t allow me to work fast.

Thanks for the update! That looks very cool.

2 Likes

Is the Water shader for URP. Ready?
Vi que se había actualizado pero aun no lo he probado así que me surgió la duda de que trajera el shader para urp 14?
Gracias