I worked really hard for 2 months to create something like this. I got discouraged by the issue with estimating the waves and gave up. I love to see a tutorial or even just see your code to see how you over came some of the same issues I saw. Super impressive work.
Cheers! I'll try to get a tutorial up as one of my next videos. There are a few more things I want to work out with the code before I share it, but I'll be sure to put it on github once I clean it up more and improve the wave height approximation
Your messy code is saving me a lot of time! I'm trying to figure out how to make an accurate submarine simulation, and resources like this give me a good jumping off point!
One thing I notice about a lot of games waves, (mainly Stormworks), when a wave comes over your vehicle or player, it only considers buoyancy forces, and ignores all fluid-velocity related forces.
Guess it does not need to be super accurate. If so: for cargo securing at sea ships, we usually assume 1kN per square meter for the impact force of sea sloshing. Maybe you can just use a fraction depending on wave height/wind speed and use 1kN for super bad weather. Just an idea to approximate it without boiling your computer
this was very entertaining I'll check your channel and you better have a part 2 in there cause I like this sea of thieves madness you got going on here
archimedes wouldn't give a proper buoyancy *vector* that actually changes depending on the tilt of the ship in the water and such though, it's simply the magnitude of the buoyancy on an object
They do actually wash through unfortunately, the ship just isn't very deep and follows the waves well enough that you don't really see it. You have to do weird shader stuff to actually prevent the waves showing inside
Was trying to make the same thing. The fact that the shader can't interact with objects and vice versa is frustrating, cause to make an immersive ocean there need to be variable wave height and speed and wind direction.
Thanks for reminding me, I really need to get around to it. I'm just not 100% happy with the buoyancy code because its technically slightly off (altho not really noticeable) but I haven't taken the time to find a better way to do it.
Yep, and had them be children of a rigid body. In the spatial noise process function I'd check if they were below the wave height and then add a force to the parent rigid body at the position of the spatial noise
Tried this in unity 3d. It worked until I used it on a big ship. Started flying and spinning. Will think about the global/local thing you mentioned and try again. Thank you so much for the hint
Global coordinates?!?! "world coord offset"?!?! IT TAKES A LOCAL COORDINATE AND YOUR TAKING FOREVER TO FIND THAT OUT MADE ME TAKE FOREVER TO FIND IT OUT THAT YOU WERE WRONG!!!!!!!
@@xen-42 i have formally apoligize, apparently it's the rotation that's in global coordinates 😔😔and this took me forever to find out too😔😔😔 you could have been more clear tho
I worked really hard for 2 months to create something like this. I got discouraged by the issue with estimating the waves and gave up. I love to see a tutorial or even just see your code to see how you over came some of the same issues I saw.
Super impressive work.
Cheers! I'll try to get a tutorial up as one of my next videos. There are a few more things I want to work out with the code before I share it, but I'll be sure to put it on github once I clean it up more and improve the wave height approximation
Your messy code is saving me a lot of time!
I'm trying to figure out how to make an accurate submarine simulation, and resources like this give me a good jumping off point!
Happy to hear it can still be of use!
One thing I notice about a lot of games waves, (mainly Stormworks), when a wave comes over your vehicle or player, it only considers buoyancy forces, and ignores all fluid-velocity related forces.
Makes sense. I have no idea what the best way to do that would be
@@xen-42 it would be an aerodynamic calculation on the buoyant objects, maybe I'll see about contributing to your waves project to add it.
Guess it does not need to be super accurate. If so: for cargo securing at sea ships, we usually assume 1kN per square meter for the impact force of sea sloshing. Maybe you can just use a fraction depending on wave height/wind speed and use 1kN for super bad weather.
Just an idea to approximate it without boiling your computer
@@mariegrasmeier9499 well, it basically just turns into simple mass deflection aerodynamics.
Thank you for the sea sickness warning very cool
Ofc happy to help
this was very entertaining
I'll check your channel and you better have a part 2 in there
cause I like this sea of thieves madness you got going on here
Love how the boat spins into the air, like a ballerina , hahaha
4:02
It's very realistic!
@@xen-42 yeah, I always have to be so careful not to get hit by those spinning boats when I'm at the beach! 🤣👍
People calculating the Archimedes' principle: *stupid*
Xen slapping some buoyant objects on the underside: *chad*
archimedes wouldn't give a proper buoyancy *vector* that actually changes depending on the tilt of the ship in the water and such though, it's simply the magnitude of the buoyancy on an object
Nice video! Would be interesting to use this in for example the Minecraft Godot thing :D
Definitely! I had considered it for this video but felt I should just focus more on the waves here
Awesome video!
Glad you thought so!
Really funny and interesting, thanks.
Thank you! I'm glad you enjoyed it
When they say you will never use maths irl
a^2 + b^2 = c^2
How do you prevent the waves from washing through the boat like that?
They do actually wash through unfortunately, the ship just isn't very deep and follows the waves well enough that you don't really see it. You have to do weird shader stuff to actually prevent the waves showing inside
Cool video
Thank you!
Was trying to make the same thing. The fact that the shader can't interact with objects and vice versa is frustrating, cause to make an immersive ocean there need to be variable wave height and speed and wind direction.
Yeah it's pretty annoying, you just have to have the same algorithm running in two places and just make sure it stays synced
Will you still be uploading a tutorial on this by any chance?
Thanks for reminding me, I really need to get around to it. I'm just not 100% happy with the buoyancy code because its technically slightly off (altho not really noticeable) but I haven't taken the time to find a better way to do it.
Amazing work.
Could you please share your code? I'm trying to do something similar and I'm struggling with the shader.
Here you go, will also update the description to link it: github.com/xen-42/godot-waves-buoyancy
@@xen-42 Thanks!
Hey can you continue minecraft godot : but this time you add cave system . Not just any cave but actual cave with eco system kinda stuff
I might do a cave video some day. What do you mean by with an eco system?
@@xen-42 sorry i meant improved like big cave instead of looking like "drilling the chunk" and called it cave
Did you use spatial nodes for buoyancy?
Yep, and had them be children of a rigid body. In the spatial noise process function I'd check if they were below the wave height and then add a force to the parent rigid body at the position of the spatial noise
Sweet.
Thank you!
pls give source code
I will once I am able to rewrite it to make it better and clearer
Tried this in unity 3d. It worked until I used it on a big ship. Started flying and spinning.
Will think about the global/local thing you mentioned and try again.
Thank you so much for the hint
Hope it ends up being helpful!
Why is UA-cam recommending old tutorials that are most likely out of date?
This isn't a tutorial so idk!
Global coordinates?!?! "world coord offset"?!?! IT TAKES A LOCAL COORDINATE
AND YOUR TAKING FOREVER TO FIND THAT OUT MADE ME TAKE FOREVER TO FIND IT OUT THAT YOU WERE WRONG!!!!!!!
big mood
@@xen-42 i have formally apoligize, apparently it's the rotation that's in global coordinates 😔😔and this took me forever to find out too😔😔😔 you could have been more clear tho
sry