Buoyancy testing


#1

Just another one of those projects that got me curious and had to code it to see if it’d work.
Using the water shader from the last project - it looks pretty good :grin:

repo: https://github.com/Lumak/Urho3D-Buoyancy


#2

Nice! Did you attach a constraint at the bottom of each object?


#3

No, no constraint of any kind. Just applied Archimedes’ Principle and his buoyant force eqn.


#4

Great! I had this thing on the back of my mind for so long! Never found the occasion to build it. Glad to see it can be done in urho!


#5

created a repo, link on top of the page.


#6

Cool stuff as usual, although I must say the water looks more like jello here :laugh:


#7

Especially when it looks this delicious from the side.


#8

updated repo: changed under water reflection and added smooth cam.
I think that’s the last of the updates, although, I found Rasterson’s underwater shader while googling under water distortion and that maybe a cool thing to add in the future.


#9

nice share codes … God Bless You


#10

Please add underwater stuff, that will help me understand how to do underwater location transition
(i.e. getting and exiting water and diving and moving under).


#11

Only check required is:

if (waterBbox_.IsInside(cameraNode_->GetPosition()))

which checks to see if the cam is inside the water’s bbox.


#12

:astonished:
This is awesome, playing around with it is cool as well. Great Work


#13

Glad you’re enjoying it :slight_smile:


#14

This is awesome! Great work!


#15

Wow, thank you so much for sharing this! This is so awesome! I can learn so much from this!