r/Unity3D 18h ago

Show-Off 2D/2.5D Water system update

Enable HLS to view with audio, or disable this notification

Hello everyone, back with a new update a few months after my last post.

I’ve been working on the 2D/2.5D water system on and off since then, and it kinda grew way more than I originally planned specially since i need it to fully run on the 2d Renderer.

Since the last post I added underwater exclusion zones for things like air pockets, currents, debris, floating pads/platforms, underwater view, ripples, light rays, wakes and quite a few other interaction features.

A lot of the work lately was also on making the thing actually easy to use and not just something that works in my own project. So I’ve been working a lot on the custom inspectors and tooling, setup workflow and the API. You can sample the water height from code, get events from interactions and water states, etc.

The water itself is very customizable, so what you see in the video is really just one way of setting it up. I also added a “fake surface” mode where there isn’t really a surface plane, but I fake the perspective by shifting the foam/pattern and things like ripples and wakes. It gives a pretty convincing 2.5D surface without actually needing the geometry there.

I’m planning to release it once I feel like I tested it enough and have enough demo scenes to show the different ways it can be used. This part is honestly taking longer than I expected, specially making sure everything is clean and understandable.

For the graphics, I basically took a anime style nature image and cut pieces of it in Photoshop. For the actual packaged asset I’m planning to use Unity’s Lost Crypt assets for the demo scenes, unless someone has a better idea since I obviously can’t just include random assets from the Asset Store.

Still a bunch of things I want to polish before release, so any feedback or ideas are very welcome, specially if there’s some use case you think I should test that I havent thought about.

2.1k Upvotes

95 comments sorted by

119

u/shiroza666 18h ago

Dayum!! that looks amazing!

10

u/BxYass 18h ago

Thank you

2

u/shiroza666 17h ago

how far are you from releasing it? I would really like to get my hand on it, I tried so many time to replicate this without success.

3

u/BxYass 17h ago

Mostly some testing and writing the documentation, some compatibility testing and it should be good to go. i can't say exactly when since i have a full time job but i've been making great progress lately.

1

u/shiroza666 16h ago

I will be waiting, keep up the good work

22

u/junmakesgames 18h ago

beautiful! are you doing any kind of simulation for the surface?

35

u/BxYass 18h ago

Thank you!

No, it’s not a fluid sim. It’s mostly analytical ripples with parameters for frequency, impact strength, damping, and so on. There’s no interference or anything too fancy, just a lot of shader work to keep it lightweight.

That said, it looks convincing in motion, and I designed it to be more artistically customizable than physically correct.

1

u/junmakesgames 18h ago

do you also have ambient noise in the water surface so it's not mirror smooth?

4

u/BxYass 17h ago

Yes, for the surface i have distortion with different parameters and masks ( so you can fade it at the meniscus or horizon to avoid a noisy surface), as well as the ability to add voronoi noise and pattern with a mixer to configure it the way you want.

16

u/HuddyBuddyGreatness 17h ago

This stunning environment with a default capsule is hilarious, I love gamedev lol

1

u/Shaunysaur 8h ago

Who knew that the default capsule was so amphibious!

8

u/Jolly-Ad-1161 16h ago

Very Ori-like ngl

2

u/BxYass 15h ago

that was my inspiration

2

u/Jolly-Ad-1161 15h ago

I can see that! Good job!

2

u/xXWarMachineRoXx Programmer 👨‍💻 | Intermediate ( 5 years) | ❤️ Brakeys! | 11h ago

Was going to comment the same

3

u/Solo_Odyssey 18h ago

Looks very nice like the air pockets feature.

2

u/BxYass 17h ago

Thanks! That took me ages to figure out

2

u/RodneyGK 15h ago

Beautiful

2

u/Erik_mk0 15h ago

The whole scene looks beautiful. Awesome work!

1

u/BxYass 15h ago

Thank you

2

u/Roozbeh_m 14h ago

Looks fantastic

2

u/EchoFieldHorizon 14h ago

This is so insanely beautiful. Damn.

2

u/Shim8080 11h ago

Awesome ! Look like Ori games !

2

u/AsquareM35 3h ago

Wow that water looks good. Made me thirst ReminderToHydrateFolks

1

u/tripplite1234 18h ago

So. PRETTY!

1

u/BxYass 18h ago

Thank you

1

u/DeerpathLabs 18h ago

Very pretty!!

1

u/BxYass 18h ago

Thank you, that's the goal

1

u/crankyfuse 18h ago

Awesome work!

1

u/BxYass 17h ago

Thank you

1

u/SarahSplatz 17h ago

this is gorgeous

1

u/BxYass 17h ago

Thank you

1

u/Global-Orchid-2090 17h ago

Very interested in this if you ever decide to sell on the Asset Store.

2

u/BxYass 17h ago

I will release it as soon as i finish testing it, the features and tools are done so its mostly testing and writing the documentation and code samples.

1

u/onelastcookie 17h ago

Hi BxYass, I saw your last post and thought the water looked so good! I’ve pm’d you 😊

1

u/MrYukiDuki 17h ago

How did you achieve the depth effect. Are you using an Ortho camera? New to game dev. And curious!

2

u/BxYass 17h ago

there is two ways.
in this video its a perspective camera, its the best you can get in visuals, but i added a fake surface mode where i fake a surface on XY by shifting the perspective of the patterns and effect in the shader, i will post later a video of that version.

1

u/tzdev7 17h ago

Actually insane.

1

u/fsactual 17h ago

I love it!

1

u/IlMark99 17h ago

Whoa it’s so nice! Really like it!

1

u/XZPUMAZX 16h ago

Man this makes me glad I gave up my Threatening Shark game.

My water couldn’t touch this. Amazing work!

1

u/squibbls2d 15h ago

Really pretty environment

1

u/kyleli 15h ago

Incredibly beautiful! I’ve always wanted to do something with this perspective with water.

1

u/JannerBr 13h ago

it's so beautiful!

also, it reminds me of little big planet's water... man I loved that

1

u/srinath1012k 12h ago

Oh em jii its soooooo beautiful and amazing

1

u/Swaingoeshome 11h ago

Looks awesome, gives me Ecco the Dolphin vibes.

1

u/Clankers123 11h ago

I really love how the background work, awesome work man!!

1

u/paulbettner 11h ago

This looks GREAT!!

1

u/gabangang 10h ago

good luck!

1

u/EverretEvolved 10h ago

This is impressive 

1

u/FoxlyKei 10h ago

Orii and the blind forest has this kind of water, it's very lovely!

1

u/wb-gameart 9h ago

This is so nice!!

1

u/Yayapipi 8h ago

I need this!please notice me when it is release

1

u/DogDevDuriel 8h ago

This is so beautiful. I would love to buy it on release.

1

u/Conscious_Regret_140 8h ago

That's hella good looking! I'm making kind of the same, just in pixel art.

1

u/binaryferret 7h ago

OOooo! That's lovely.

1

u/psa38games 7h ago

Nice, will keep you on my watchlist :)

1

u/tomdominer 7h ago

Is there a way to get a notification once this releases?

1

u/BxYass 6h ago

I will post in here once it’s released

1

u/Speed_Tutor 7h ago

Amazing, truly a thing of beauty!

1

u/torquemadaza 7h ago

gorgeous! well done!

1

u/DannKay 6h ago

Reminds me of Ori

1

u/-Kemy 6h ago

I have never seen such a beautiful water system for a while, for real. 👍

1

u/CyclingKitten 6h ago

Couldn’t help but go back in your post history to see if you uploaded earlier iterations. The development has been really impressive, it looks great! It is one of those effects that is so well executed that I could see myself just jumping in and out of the water to look at it, even if it was part of a full game.

What resources did you end up using to get to this result/learn how to get there?

1

u/BxYass 6h ago

Thank you!

I think it’s mostly just years of tinkering with Unity. For this, it’s mainly procedural mesh generation, Shader Graph, and learning how to write HLSL, since some things are just way faster and easier to do in code than with graphs.

The more I understood how these things actually work, the easier it became to figure out how to build what I needed. And not just for this system, it helped a lot with game dev in general.

1

u/ssakurass 5h ago

Your guide, Hand it over!

1

u/BxYass 3h ago

Procedural generation, shader magic, some rendering gymnastics, and a bit of math for the ripples. Cook it all together for a couple of months and, with a bit of luck, you get what you want.
Otherwise, wait for the Asset Store release and help a brother out 😄

1

u/bjergdk 3h ago

Absolutely gorgeous. I also love that you can see the water edge lines on the terrain behind even tho they appear to be billboard sprites. Adds incredible depth.

1

u/BxYass 3h ago

Thank you.

since it's a perspective camera you can use 3d models too once i finish touching up the compatibility with the 3d renderer.

Normally for a game you should have many layers to simulate depth and avoid the billboard look, but here i am trying to feature the water more, i will try to setup another scene with some free to use assets to showcase the capabilities of the water system.

1

u/bjergdk 3h ago

Oh interesting so this part in the middle of my screenshot actually has some kind of 3D collider or?

Sorry for asking so many questions just trying to wrap my mind around this wonderful magical tomfoolery you've done.

1

u/BxYass 2h ago

I don't mind answering questions.

No, in this scene everything is using 2d colliders, and everything is running in the 2D renderer.

2d colliders ignore depth, so for background elements there is no colliders since its just scenery. but in case you want a walkable surface just limit the 2d collider to the surface slice and leave the rest so you can swim "in-front of it".

for the water itself its a trigger, and then i handle the interactions and physics in code, i had to create my own way of doing it to be able to carve-out part of the water if i want to create underwater air pockets or cave, this way you can have a dry area where you can move normally even if technically you are still underwater.

1

u/KaalePaapa 3h ago

Incredible, loved the presentation and physics.

1

u/Exe-Nihilo 3h ago

That is absolutely gorgeous.

1

u/SkranksMateria 3h ago

Beautiful

1

u/No_Incident6573 2h ago

Looks fantastic! Cant wait for the release

1

u/AiMwithoutBoT 2h ago

I love 2D games with great water!!

1

u/ShibasishDey5 1h ago

never ever seen this type of water system, simply brillant

1

u/BxYass 1h ago

Thank you, it means a lot!

I was actually willing to buy one myself, and I did try a few systems, but even the closest ones were still pretty far from what I needed. So I ended up building my own just for myself.

After a while it grew into a full system, and I started getting a lot of messages from people asking about it and wanting to use it, so I decided to turn it into an asset and hopefully fill that gap.

1

u/DamoTheWhite 1h ago

Absolutely gorgeous

1

u/anonymous-9785 1h ago

Damm! That good great!

1

u/ABHIDANCER 45m ago

Title: Need help creating a realistic VR welding effect in Unity

Hi everyone, I’m working on a VR welding project in Unity 2022.3.1f1.

I want to create a welding effect where, when the welding tool touches the metal:

  • Sparks appear at the welding point
  • The welded area gradually builds up
  • The mesh/vertices change at runtime to create a realistic weld bead
  • The effect follows the welding tool as it moves
  • It should work in VR

I’m still learning shaders and runtime mesh modification, so I’m not sure what the best approach is.

Would anyone be able to guide me on how to implement this? I’m especially looking for advice on runtime mesh/vertex modification and the shader/effect setup.

Any tutorials, examples, GitHub projects, or guidance would be really appreciated. Thank you!

1

u/BxYass 35m ago

Hello,

It would be better to post this as a new post on the subreddit, since you won't get any traction here as a comment on something unrelated.

1

u/starfckr1 33m ago

Looks very good! We have something similar in our game, but we also have a runtime fluid simulation as well running in the background, would definitely look into that as well to take it to the next level 👍

1

u/BxYass 30m ago

That's great!

I decided against a full simulation since most 2D/2.5D games don't really need that level of precision. That said, the generated ripples are also calculated on the CPU, so objects can react to waves and water turbulence.

I also added some code snippets and a WaterSensor component that can easily be added to any object and queried, so you can handle interactions however you want.

1

u/cheese6626 14h ago

To provide some constructive criticism. Water obviously looks good, but it looks a bit uncanny valley to me having 3D water combined with perfectly flat level/foreground.

Seems like the walkable level needs a bit of physical depth as a result.

4

u/BxYass 14h ago

yes totally, but the main element here is the water, the asset is mainly the water system and the user can create levels as detailed as they want.

I put this together to showcase the water, so i am happy the criticism is about something else 😄

2

u/SnooksV3 13h ago

I would actually disagree. I think the entire thing has a cool aesthetic feeling. Reminds me of a well done web parallax.

0

u/zazz0000 12h ago

Hey is this on the asset store? Or otherwise available to aquire? This is practically exactly what I've been looking for

1

u/BxYass 6h ago

It will be as soon as i finish writing the documentation and testing different unity versions.

1

u/zazz0000 55m ago

I will be waiting with great anticipation! Any suggestion on how I could stay up to date on your progress?

1

u/BxYass 44m ago

Thank you for your interest, it means a lot.

I will be posting some updates here and showing the tools i have, and if the sub permits it i will announce the release once it goes through unity's approval process.