How I Fixed the Ocean in My Pirate Game

  Рет қаралды 84,242

Tom Weiland

Tom Weiland

Күн бұрын

Пікірлер: 663
@tomweiland
@tomweiland 2 жыл бұрын
The pirate game has not been abandoned! Let me know if you've got any ideas for how to fill in the gaps in the water fog mask between the horizon and the water meshes 👇
@joshuafhiggins
@joshuafhiggins 2 жыл бұрын
You could do what Minecraft does and have a fog effect at the edges. Alternatively you could make a way to seamlessly blend LOD versions of the watter
@nathangeorge4017
@nathangeorge4017 2 жыл бұрын
Why do you have to use the horizon as a base? Why don't you just render the top of the water plane as white (like you're doing) and then fill everything above that plane with white? Like a flood fill. It seems like the water plane should always make at least a solid boundary between the top and bottom of the screen. So just fill anything above that boundary. In a pixel shader this would just mean that, starting from the top of the image, you would set every pixel in every column (not row) to white until you reached an already white pixel. Since the water is height based there should never be overhangs that have to be filled.
@tomweiland
@tomweiland 2 жыл бұрын
@@joshuafhiggins and you mean have the low LOD versions go all the way to the horizon? I considered that as well, and it could work, but how far those low LOD planes have to extend into the distance would depend on the height of the camera _and_ potentially on the resolution of the display.
@nathangeorge4017
@nathangeorge4017 2 жыл бұрын
Or you could also make everything white and then render the bottom of the plane as black and then fill everything below with black
@tomweiland
@tomweiland 2 жыл бұрын
@@nathangeorge4017 this was something that crossed my mind, but I honestly just wasn't sure how to approach the flood filling. The fragment/pixel function of a shader operates on each pixel individually, with no information about other pixels. Obviously I could sample the mask texture, but (on 1920x1080 resolution, with about half the screen submerged) that would mean sampling the texture at least ~540 times for each of the ~540 pixels in each of the 1920 columns-unless I'm missing something? That means sampling the fog mask texture ~559 _million_ times every frame, which doesn't sound very efficient to me...
@GnuSnu
@GnuSnu 2 жыл бұрын
After 83 years of my life, I can finally witness another devlog
@tomweiland
@tomweiland 2 жыл бұрын
You didn't have to do me like that 😂
@winsicole
@winsicole 2 жыл бұрын
Wow the dedication to watching this man is truly amazing
@dusanvukobratovic7659
@dusanvukobratovic7659 Жыл бұрын
And you will wait 83 years more
@lallybroch3929
@lallybroch3929 2 жыл бұрын
Another Devlog!! But also don’t stress about getting them out fast! The game is looking amazing!
@tomweiland
@tomweiland 2 жыл бұрын
Now if only it was actually playable 😂
@danibiyarslanov
@danibiyarslanov 2 жыл бұрын
@@tomweiland nah dude take your time, ive been making a game for a year too and its still not playable lol
@buttsworth.
@buttsworth. Жыл бұрын
I have binge watched almost all of your dev-logs, I hope the project is going well and its smooth sailing, excitedly awaiting the next dev-log
@tomweiland
@tomweiland Жыл бұрын
Glad you've enjoyed the devlogs!
@ayaanhaque6340
@ayaanhaque6340 2 жыл бұрын
I honestly thing that these reflections are the best improvement you have made visually to the game, aside from maybe the water flattening around the islands. The game is coming along really well now!
@tomweiland
@tomweiland 2 жыл бұрын
Agreed! I think your last statement needs to be corrected though-the _graphics_ are coming along nicely. The _game_ is still as unplayable as it was a year ago :P
@BusinessWolf1
@BusinessWolf1 5 ай бұрын
I can see from the comments that you're now a servitor to the machine god, 8 hours a day. That's okay man, never think it's 'been too long' to continue your project. You will get used to it, you will upskill in certain areas, and your work, whatever it is, will help you with the game in one way or another. You've got this man! And if your priority is now a career rather than making the game, I wish you good luck on that too. But I really don't think it is. I think you and me are a lot alike, I didn't go to university for the same reasons as you. Well anyway, I've been fucking off on work hours for 15 mins now, so I'll get back to that but just know, you are not alone. There's a lot of people like you, full of passion, working 8 hours a day and MAYBE getting in half an hour every 2 days on their project. It's the consistency that counts. See you at the top.
@tomweiland
@tomweiland 5 ай бұрын
Thank you for the kind words! These are the kind of comments which make me want to come back to this project, but I'm still trying to figure out where and in what capacity it fits into my life now that I work full time 😅
@SuperDutchrutter
@SuperDutchrutter 2 жыл бұрын
The island reflection looks amazing. Good progress on the water, hopefully the game gets into a playable state soonish!
@tomweiland
@tomweiland 2 жыл бұрын
🤞
@Dyornos
@Dyornos 2 жыл бұрын
Code free of charge: If(aboveWater) Renderfog = false; Good luck solving the actual problem tho, glad your back.
@tomweiland
@tomweiland 2 жыл бұрын
Haha thanks :P
@mikeohc
@mikeohc 2 жыл бұрын
Water is by far one of the most complicated subject once you dive deeper into it. Great video! Would love to see it getting resolved
@tomweiland
@tomweiland 2 жыл бұрын
Yeah it's one of those things that can literally always be improved further, there's no end :P
@Koffiato
@Koffiato 2 жыл бұрын
I think going SSR on reflections would give much better results. Since camera is barely above the reflective surface, it'll be very close to ground truth too. This will also solve (or rather) help with the double lighting issue. With the added bonus of in reflection lighting being completely free.
@tomweiland
@tomweiland 2 жыл бұрын
The problem is that nothing that is off screen can be reflected, which means tops of boats and islands will be cut off in reflections if you don't have them in view. As for the camera barely being above the reflective surface, I'm not really sure what you mean since a boat's crows nest or the top of even a small island is more than "barely" above the water surface, is it not?
@Koffiato
@Koffiato 2 жыл бұрын
@@tomweiland yeah cut off makes sense. I used "Barely above surface" as in SSR only works well when viewing angle of the reflective surface being almost parallel to the camera, going high up and looking directly down breaks the effect. But I don't think that's a realistic thing to happen in this game that's all. Your channel is great find btw, thanks for all
@AIAdev
@AIAdev 2 жыл бұрын
Awesome video Tom. Very cool
@tomweiland
@tomweiland 2 жыл бұрын
Thanks, I'm glad you enjoyed it :)
@IronFreee
@IronFreee 2 жыл бұрын
I know that working alone on a project can be hard, but I'm happy to see you back :D
@tomweiland
@tomweiland 2 жыл бұрын
Thanks 😅
@volutedberet
@volutedberet 2 жыл бұрын
Never thought i would live to see another pirate game devlog lol Also the water looks even more amazing now! Great work
@tomweiland
@tomweiland 2 жыл бұрын
Dang, you had really given up hope, huh? :P
@cosminmosmin
@cosminmosmin 2 жыл бұрын
I have been waiting so long for this level of quality in a devlog
@tomweiland
@tomweiland 2 жыл бұрын
Glad you liked it :D
@sealinggrain7
@sealinggrain7 10 ай бұрын
Its been 6 years to the day since you started tjis project! Please continue on. You can do it!!!!!!!!!!
@tomweiland
@tomweiland 9 ай бұрын
I haven't touched the project at all for a while now due to working full time, but I do want to get back to it at some point 🤞
@sportan-i1v
@sportan-i1v 2 жыл бұрын
These are always really cool, good to see another dev log
@tomweiland
@tomweiland 2 жыл бұрын
It was about time 😅
@JDracular
@JDracular Жыл бұрын
Hope you are doing well, your old C# networking tutorial series has helped me a lot, and your pirate game looks great. Glad to see you're still replying to comments after so many months.
@tomweiland
@tomweiland Жыл бұрын
Glad the old series was helpful! Have you checked out the newer one?
@JDracular
@JDracular Жыл бұрын
@@tomweiland not really, just following the pirate game series.😁 looking forward to a new episode.
@badbanana9894
@badbanana9894 2 жыл бұрын
You better finish this tom. Been following it for like two years now and actually NEED to play a finished version.
@tomweiland
@tomweiland 2 жыл бұрын
Well buckle up, it's going to take a while 😂 But yeah, I need to play this too at some point, so I definitely intend to get it to a playable point...
@kiki-drawer2669
@kiki-drawer2669 Жыл бұрын
Not sure if you olan to stick the the game or not or just busy but even months later i still enjoy watching your videos! Thank you still! Hope you are taking care and living the good life!
@tomweiland
@tomweiland Жыл бұрын
I do want to continue working on it and there will be at least one more devlog in the near future, but beyond that I'm not really sure yet. I don't want to live at home indefinitely and this project/these videos don't come even remotely close to making a livable income. Even if I managed to upload once a month, I would have to average _several million_ views per video just to begin approaching a decent salary, and that is not exactly something I can rely on to happen :P Glad you've been enjoying the videos though!
@kiki-drawer2669
@kiki-drawer2669 Жыл бұрын
@@tomweiland completely understandable! It's not easy pulling in the views. Ive seen amazing creators get trampled on by KZbin no matter how often they upload. its a shame! No problem! It just good to see other people's experiences and creativity ^-^
@qiveal9293
@qiveal9293 2 жыл бұрын
Glad your still working on this!
@tomweiland
@tomweiland 2 жыл бұрын
Me too :P
@Wishbone_Games
@Wishbone_Games 2 жыл бұрын
Cant wait for next years devlog!
@tomweiland
@tomweiland 2 жыл бұрын
💀
@tomasabrams7234
@tomasabrams7234 2 жыл бұрын
Great to hear from you! I honestly think about your videos every time I work in Unity
@tomweiland
@tomweiland 2 жыл бұрын
That means a lot, glad you like the videos :)
@jsbarretto
@jsbarretto 2 жыл бұрын
An easy way to solve the problem of waves displacing the water plane that you mention in the middle of the video is to have a vertex shader that distorts the reflected vertices in accordance with the wave height, meaning that they always meet the water's surface at the appropriate altitude. It's not perfect, but it at least gets rid of those local discontinuities.
@tomweiland
@tomweiland 2 жыл бұрын
So you mean when rendering the reflection I should use a different shader for everything which moves it in a way that the flat reflection plane ends up producing a reflection that fits onto a not-flat water surface? That's a very interesting idea, but it sounds extremely complicated and time consuming to figure out, and I'm not entirely convinced that it'd even be possible to make it look right 🤔
@paulo1940
@paulo1940 10 ай бұрын
hey tom, I have just gotten to explore your channel today and I must say, I am in love with it, your videos were so high quality and entertaining I am just hooked. I am a fellow programmer also wanting to see where I want to go and I am inspired by your continuous and hard work for this personal project and I am hoping to start one soon, maybe not game dev after (I am gonna take your word :D). Wishing you the best on your journey in 2024 and onwards!
@tomweiland
@tomweiland 9 ай бұрын
Thank you for the kind words! Good luck to you too :)
@axelseven7
@axelseven7 2 жыл бұрын
Simple trick for sea reflections would be to use SSR (screen-space reflections), perhaps you could cross-fade between planar reflections when the sea is calm and SSR when it is agitated. Or you could simply use SSR in every case. Another thing that might possibly be done is to displace the reflected image depending on the camera's angle and how heavily displaced the water plane is, using trigonometry. I'm not quite sure this would result in a good looking result but it feels like it could work with some tuning and adjustments. Keep in mind that if you plan to keep the Planar Reflection for agitated sea, whatever you do, the reflections will be physically inaccurate (that goes for SSR too but it would be less noticeable), since it only replicates what a flat surface would reflect. There would also be an issue with some parts of the terrain OVER the reflection plane and UNDER the sea plane being missing in the reflection. Personally I would advise for using SSR as I don't believe any other kind of hack you can conjure is gonna look good enough to be worth the effort. The next best thing is raytracing but we all know why that's not a great idea :).
@tomweiland
@tomweiland 2 жыл бұрын
The unfortunate thing about SSR is that anything that's not visible on screen also can't be reflected, which in some scenarios can look just as bad/weird as the problems I have right now with the reflections on big waves, so I'm not sure it'd be better. With some tweaking it might be possible to get the current setup looking _decent,_ so I'm not particularly eager to abandon that approach just yet :P
@axelseven7
@axelseven7 2 жыл бұрын
@@tomweiland fair enough. I can appreciate you going for a "higher-tier" physically accurate reflection model. Good luck on creating a reflection setup that fits your project :).
@morangodecabopreto
@morangodecabopreto 2 жыл бұрын
U are ALIVE! Good ,keep it up!
@tomweiland
@tomweiland 2 жыл бұрын
I'm not dead 🥳
@broken-rpg-cuzzo
@broken-rpg-cuzzo Жыл бұрын
Hey man cant wait till the next devlog have a great day your my new favourite KZbinr ❤
@tomweiland
@tomweiland Жыл бұрын
Thanks for the kind words 😅
@hazytp7150
@hazytp7150 2 жыл бұрын
The game looks wonderful so far. I hope the next devlog will be a little sooner but it's okay don't rush it!
@tomweiland
@tomweiland 2 жыл бұрын
It definitely won't be another year until the next one 😂
@creativemind42069
@creativemind42069 6 ай бұрын
I miss you... We all do. I am glad you switched to godot tho and that you are porting this to it. Looking forward to the first devlog in godot.
@tomweiland
@tomweiland 5 ай бұрын
I'm assuming this is a joke lol, but just in case: I have not switched to Godot 😅 I'd like to come back to this project eventually, but I haven't really figured out where it fits in with work and other life stuff.
@creativemind42069
@creativemind42069 5 ай бұрын
@@tomweiland Ya I was joking haha😅 Anyways looking forward to whatever comes next, I hope I can speak for a large part of the community if I say that you inspired a lot of us to strive for great projects. We will not forget your greatness. Good luck with anything you do🤞
@falricthesleeping9717
@falricthesleeping9717 2 жыл бұрын
YAAAAY, haven't seen a new video for a long time, good to see you back
@tomweiland
@tomweiland 2 жыл бұрын
Yeah...it's been _a while_ 😅
@weckar
@weckar 4 ай бұрын
Not sure if you still care, but a decent fix for the fog/mesh gap is to make a slightly fuzzy white band along the pixel curve that's wider than the gap; which looks like a pretty decent foam line and covers the crimes.
@tomweiland
@tomweiland Ай бұрын
This might work if my mesh had a higher vertex resolution but because of the distance between vertices the gap between the mesh and where the fog starts would likely be too big for this to work.
@hopser6620
@hopser6620 2 жыл бұрын
Nice to see you Upload again
@tomweiland
@tomweiland 2 жыл бұрын
It was nice to upload again :P
@trap7369
@trap7369 2 жыл бұрын
How long have I been waiting for 1 more video >.
@tomweiland
@tomweiland 2 жыл бұрын
Too long 😔
@danielrandall4836
@danielrandall4836 2 жыл бұрын
You r just aweso....i was litterly noob in tNice tutorials...u explained it very simply...thanks i will surely go for next parts of tNice tutorials video.. thanks
@tomweiland
@tomweiland 2 жыл бұрын
🤔
@eboatwright_
@eboatwright_ 2 жыл бұрын
the mans is back! I love how the game looks!
@tomweiland
@tomweiland 2 жыл бұрын
Glad you like it :D
@hexxt_
@hexxt_ 2 жыл бұрын
glad to see you're uploading again as for the water fog maybe try using the depth buffer to mask out far away areas
@tomweiland
@tomweiland 2 жыл бұрын
The problem is that I don't want it to be masked out if I'm looking at the pixel from under the water...
@krazybubbler
@krazybubbler 2 жыл бұрын
Great devlog! Thanks
@tomweiland
@tomweiland 2 жыл бұрын
Glad you liked it!
@sanaatangyaan
@sanaatangyaan 2 жыл бұрын
Fantastic video bro, legend.
@tomweiland
@tomweiland 2 жыл бұрын
Glad you liked it!
@flaschenzuglp9994
@flaschenzuglp9994 Жыл бұрын
Miss this series and your work. Was kinda unique. Hope all is good for you.
@tomweiland
@tomweiland Жыл бұрын
Glad you've enjoyed the videos, I will be back soon 👀
@spaceweedceo820
@spaceweedceo820 Жыл бұрын
Just saw a two-year-old video good to see you haven stopped developing 😊
@tomweiland
@tomweiland Жыл бұрын
😅
@TheRealMasterMassey
@TheRealMasterMassey Жыл бұрын
cant wait for the next update of this. I know its been a year but I just seen a comment saying you will have a new video out soon
@tomweiland
@tomweiland Жыл бұрын
_Hopefully_ soon 😅
@truesosense7722
@truesosense7722 11 ай бұрын
For the reflections, I have some ideas... You can try offsetting that camera to match the highest wave vertex, or you can get the camera texture and offset each pixel according to the highest wave (I hope it isn't too confusing). You can also use a realtime reflection probe which works pretty well but requires more computing power.
@tomweiland
@tomweiland 9 ай бұрын
The problem is that if you use a second camera to generate the reflections, it inherently assumes a flat reflection plane. Offsetting the camera based on the wave height would make it look more correct in the area that matches that height, but it would then look wrong anywhere where the water is at a different height. Offsetting the camera texture might work to a degree, but around the edges of the screen it would completely break down because you run out of texture to offset (if that makes sense).
@fnoffer
@fnoffer 2 жыл бұрын
eyy Tom, great to see you back ;)
@tomweiland
@tomweiland 2 жыл бұрын
Thanks, it's good to _be_ back!
2 жыл бұрын
Oh wait I remember you from somewhere, I think that you used to make devlogs or something. Damn, that water is so impressive I love it! Catch ya next year mate! :)
@tomweiland
@tomweiland 2 жыл бұрын
The next one better not be a whole year from now 😳
@twomur_
@twomur_ 2 жыл бұрын
so glad this project is back keep up the amazing work!
@tomweiland
@tomweiland 2 жыл бұрын
Yeah it feels good to be working on it again :P
@georgemaneta9542
@georgemaneta9542 2 жыл бұрын
About the first problem, in SoT when the player is swimming they are either fully submerged or floating above the surface, there is no in between. The camera shifts up/down a little when a transition happens. Having these 2 separate states is also useful to handling the breath/drowning mechanic. I've been thinking about creating a SoT clone myself, let me know if you wanna exchange ideas or maybe turn this project into a coop project.
@tomweiland
@tomweiland 2 жыл бұрын
Yeah, I've played a lot of Sea of Thieves, and the way they handle the transition has always bothered me, which is why I really didn't want to go with a solution like that. It just feels clunky when the game suddenly moves your camera a substantial distance up or down just because you got too close to the surface. For breath I can just check the camera's position against the wave height, so that shouldn't really be an issue. At this point the project honestly isn't even really in a prototype state (there's still no game loop), and I don't plan to involve anyone else at least until that changes.
@georgemaneta9542
@georgemaneta9542 2 жыл бұрын
@@tomweiland ok ok
@shahbazqasim8682
@shahbazqasim8682 2 жыл бұрын
bro thanks so much, you actually made soft soft easy to understand
@tomweiland
@tomweiland 2 жыл бұрын
🤔
@yobamablu7907
@yobamablu7907 2 жыл бұрын
Great video as always!
@tomweiland
@tomweiland 2 жыл бұрын
Thanks, glad you liked it!
@facepalmedev
@facepalmedev 2 жыл бұрын
Rather you than me... A lot of this stuff seems like a pain in the arse to solve, I admire that you challenging yourself though, it truly is the only way to learn new things and improve!
@tomweiland
@tomweiland 2 жыл бұрын
Agreed!
@xzippyzachx
@xzippyzachx 2 жыл бұрын
'ooray, now I can look at the reflection o' me face in the water while I trim me beard to perfection! :p
@tomweiland
@tomweiland 2 жыл бұрын
😂
@yced101
@yced101 2 жыл бұрын
High entertainment value on this one. Nice editing. Keep it up.
@tomweiland
@tomweiland 2 жыл бұрын
I put a lot of time into it, so I'm glad you enjoyed it :D
@bannanafruitsalad
@bannanafruitsalad 5 ай бұрын
Man, I got into more complex programming by watching your multiplayer server series. I hope life is treating you well and that whatever you're working on nowadays is running smoothly
@tomweiland
@tomweiland 5 ай бұрын
That's great to hear! Things are going well, but unfortunately I haven't really figure out where and in what capacity this project fits into my life now that I work full time 😅
@sollner_fox
@sollner_fox 2 жыл бұрын
Thanks, man! Great job! Thanks for help, bcause i`m already finish man game for jam, using a info from your previous devlog
@tomweiland
@tomweiland 2 жыл бұрын
Glad I could help :)
@stasdev
@stasdev 2 жыл бұрын
imagine making near clip plain of the camera = 0.001... then under water effect is either on or off. seems like a reasonable and simple solution
@tomweiland
@tomweiland 2 жыл бұрын
Unity doesn't let you set it lower than 0.01 units-that's the minimum, and I already have it set to that.
@stasdev
@stasdev 2 жыл бұрын
@@tomweiland ohh.. okay then :)
@FalloutBreakbeat
@FalloutBreakbeat 2 жыл бұрын
I've just subscribed, so you're now legally obligated to continue development of this game. Thank you. 👍 Also, I found your channel while searching for "should I make my game multiplayer", hoping for people to dissuade me, and you haven't successfully done that yet, so please try again. 😀
@tomweiland
@tomweiland 2 жыл бұрын
Thanks for subscribing! Have you watched this video? kzbin.info/www/bejne/m4LXaIeteNdpl9E If there's any single one of my videos that will dissuade you from making a multiplayer game, it'll probably be that one :P
@FalloutBreakbeat
@FalloutBreakbeat 2 жыл бұрын
Yeah, that's the one I found first and I'm still here. 😄 Looking forward to the next game update 👍
@musta_rd
@musta_rd 2 жыл бұрын
Lots of love bro
@tomweiland
@tomweiland 2 жыл бұрын
:)
@simonbarton3295
@simonbarton3295 7 ай бұрын
Idea for the underwater effect: close the water body mesh (add sea floor and walls). After the main pass, render this mesh with reversed face-culling and without depth testing. Add fog manually in fragment shader, based on G buffer depth. This also works for other bodies of water, including waterfalls and floating blobs of liquid.
@tomweiland
@tomweiland 5 ай бұрын
Walls would be sufficient to make it work, and it's something I considered but didn't implement yet because currently the water mesh is generated at runtime (and giving it walls would make that more complicated).
@LittleTopia
@LittleTopia 2 жыл бұрын
Nice, I love the new water! Good job 👍
@tomweiland
@tomweiland 2 жыл бұрын
Thanks, glad you like it :)
@Pystro
@Pystro 2 жыл бұрын
For your reflection problem: You might need to vertically offset each object that is on or above the water (boats, debris, player models) by (2 times) the water level at it's position when you render the scene for your reflection texture. Also, on rough water you shouldn't reduce the reflection strength (as you mention at 3:43), but blur the reflections. Water will keep it's full 3%+ reflectivity (source: en.wikipedia.org/wiki/File:Water_reflectivity.jpg) but its surface turns frosted/matte, at least until you start getting foam.
@tomweiland
@tomweiland 2 жыл бұрын
Offsetting everything for the reflection texture seems like it'd be very difficult to get right, if not impossible (since it'd have to be positioned based on how it's going to be reflected, but that's based on how it's positioned). I might blur the reflections, but blurring can get computationally expensive, so I'd still consider reducing the reflection strength a viable option (at least on lower graphics settings), even if it's not entirely realistic.
@Pystro
@Pystro 2 жыл бұрын
@@tomweiland I consider there to be two effects that the waves have on the reflections: Firstly, the water is obviously sloped. This is already taken care of by how the reflection texture is applied based on the gradient of the water surface. (I suspect that the deflection angle might be half as much as it should realistically be, but even if that's true, it's not an error anyone would notice.) Secondly, the waves raise and lower the water level. This is causing the problem you showed where the ship doesn't move. To fix this your reflection would just need to move straight up and down. And to calculate the amount, you can just sample the wave height at (below/above) the center of the respective object. In effect, you assume the water to be flat, but at the sampled height instead of at its neutral height. The only problem with this is that a large object might be sitting at a wave crest, while its reflection shows in a valley. But that mainly affects reflections of the top of the object; where the object touches the water (which is where errors are most visible) it will be almost exactly correct.
@maxherrmann1182
@maxherrmann1182 2 жыл бұрын
Looks great! And ofcourse... YAAAAAAAAAAAAAAAAY DEVLOG!!!!!!!!!!!!!!!!!!!
@tomweiland
@tomweiland 2 жыл бұрын
🥳
@monoculosofficial9934
@monoculosofficial9934 Жыл бұрын
I was looking at this in sea of thieves, and I think what they've done for a lot of objects like the islands and boats is to just have another low detail object flipped and distorted normally by the shader as it's underwater. Because you can see that the reflection of the island and boat that you see when you're either under water and looking up, or above and looking down, is not the same as the actual object. I think this then gets masked/unmasked by the water shader depending on what side you're looking from! Of course I might be completely wrong, but it makes sense as it provides accurate enough visuals while completely faking it!
@tomweiland
@tomweiland Жыл бұрын
_"I think what they've done for a lot of objects like the islands and boats is to just have another low detail object flipped and distorted normally by the shader as it's underwater"_ I think this depends on your graphics settings-lower settings definitely result in lower detail models being used for reflections, but I'm not sure about it higher settings. _"you can see that the reflection of the island and boat that you see when you're either under water and looking up, or above and looking down, is not the same as the actual object"_ Interesting...I'm not sure I've ever noticed that. I might have to go take a look :P Something I want to try out at some point (low priority) is screen space reflections, as I think those would be able to handle the non-flat water surface, though they come with other limitations (only objects visible to the camera can actually be reflected).
@Thornskade
@Thornskade Жыл бұрын
Was expecting him to say "I'll see you again next year" at the end
@tomweiland
@tomweiland Жыл бұрын
Why you gotta do me like that 😭
@bungercolumbus
@bungercolumbus 2 жыл бұрын
First? Anyway. Thanks again for the amazing server tutorials, you taught me a lot and I hope your game will thunder the shop when it gets out :3
@tomweiland
@tomweiland 2 жыл бұрын
Damn that was fast 😅
@bungercolumbus
@bungercolumbus 2 жыл бұрын
@@tomweiland Literally just opened the app and I saw your video which was uploaded for 8 sec. What were the chances
@JayCode_dev
@JayCode_dev 2 жыл бұрын
New devlog!!! Nice to see the water works well now! maybe this sound stupid but for the horizon problem, maybe use the distance between the camera and the fog, if its to fa dont render fog,
@tomweiland
@tomweiland 2 жыл бұрын
The problem with that is that it'd also remove the fog underwater where there aren't any objects being rendered (just skybox) 🤔
@stickguy9109
@stickguy9109 2 жыл бұрын
This one was really well edited. Next time I hope to see beautiful ocean
@tomweiland
@tomweiland 2 жыл бұрын
Thanks, glad you liked it :D
@xcruciating
@xcruciating 2 жыл бұрын
man I missed this kind of tutorials lol. Great work here, thanks!!!
@tomweiland
@tomweiland 2 жыл бұрын
🤔
@Ov3rPowered
@Ov3rPowered 2 жыл бұрын
Omg finally new devlog
@tomweiland
@tomweiland 2 жыл бұрын
Finally 🥳
@Ov3rPowered
@Ov3rPowered 2 жыл бұрын
@@tomweiland yeah
@youz123
@youz123 2 жыл бұрын
DEV LOG DEV LOG, I AM HAPPY
@tomweiland
@tomweiland 2 жыл бұрын
Excellent 👌
@אור-יםביבירובי
@אור-יםביבירובי 2 жыл бұрын
I can think of a few solutions for the horizon mask problem you have at the moment, 1. you can use the boundaries of the current ocean chunk that is loaded as the mask and use fog to hide the rest of the unloaded water. 2. you showed a black and white image in which the horizon was black and the rest was white, invert it and use that to mask out the blue fog again. hope I could help I never used something like this, just some ideas that came to mind while watching ^-^ the game looks good would love to see dev streams and more content that is Pirate Game related :)🥶
@tomweiland
@tomweiland 2 жыл бұрын
1. Yeah, I'll probably be extending the range of the water mesh. 2. Not entirely sure what you mean by this, or how exactly it'd solve the problem 🤔 I've done streams in the past, so maybe that's something I'll do again at some point, although I'm not quite sure yet and don't want to make any promises 😅
@---zh8qn
@---zh8qn 2 жыл бұрын
i might overlook sth but is this not only a problem if you are high up in the air? What if you only run your submerged shader once you are close to the water, since in all other cases you won't be submerged anyway? you could reuse your old version of the submerged boolean in some way for that
@tomweiland
@tomweiland 2 жыл бұрын
@@---zh8qn yes, that's what I'll be doing and it'll solve most of the problem, but there can/will still be artefacts when you're close to the water line.
@---zh8qn
@---zh8qn 2 жыл бұрын
@@tomweiland btw i really appreciate you reading through your comments and answering them, gives a really good feeling to the people watching you :D Keep up the good work
@gamenotover999
@gamenotover999 2 жыл бұрын
This was a fun one, also nice to see that you are still working on it.
@tomweiland
@tomweiland 2 жыл бұрын
Glad you enjoyed it :)
@vokarou7300
@vokarou7300 2 жыл бұрын
Keep up the amazing work !!!
@tomweiland
@tomweiland 2 жыл бұрын
Will do :)
@zimi992
@zimi992 2 жыл бұрын
It is sooo overengineered, I love it
@tomweiland
@tomweiland 2 жыл бұрын
What's overengineered? 😅
@rayanachchane1575
@rayanachchane1575 2 жыл бұрын
you could name "The polygonal robbery" and add missions on islands like sneaking into another pirate base
@tomweiland
@tomweiland 2 жыл бұрын
8 syllables is a bit of a mouthful and I'd rather avoid using references to the art style in the name. Thanks for the suggestion though!
@EearsEntertainmentment99.
@EearsEntertainmentment99. Жыл бұрын
This looks so fun to play
@tomweiland
@tomweiland Жыл бұрын
Thanks!
@bonkerzd6980
@bonkerzd6980 2 жыл бұрын
My game needs this
@tomweiland
@tomweiland 2 жыл бұрын
The reflections? Take a look at Unity's Boat Attack demo if you haven't yet.
@Rumplestiltzchen
@Rumplestiltzchen 2 жыл бұрын
Yay! Devlog
@tomweiland
@tomweiland 2 жыл бұрын
🥳
@Rumplestiltzchen
@Rumplestiltzchen 2 жыл бұрын
🥳
@Brzzb
@Brzzb Жыл бұрын
Looks epic! What ships are you planning to add and will this be playable on macbook?
@tomweiland
@tomweiland Жыл бұрын
I haven't really decided on any specific ship types yet. It should work on Mac, though at this point I can't say how well it'll perform, particularly on older MacBooks.
@GamesBySaul
@GamesBySaul 2 жыл бұрын
Really great work, those reflections are especially impressive! Looking forward to what comes next, just take your time!
@tomweiland
@tomweiland 2 жыл бұрын
Thanks, will do :D
@457Deniz457
@457Deniz457 2 жыл бұрын
Water looks HOT 👌💪
@tomweiland
@tomweiland 2 жыл бұрын
🥵
@e_buffturtle
@e_buffturtle 2 жыл бұрын
For the surface of the water the solution is simple, make a bubble particles effect that covers up the area where the water meets the surface when the player is half submerged. Many video games over look particles like this and it really shows when you try jumping in bodies of water and there’s no satisfying splash.
@tomweiland
@tomweiland 2 жыл бұрын
Yeah I've seen that in other games, and honestly I'm not sure I like how it looks. Now that I've got this solution essentially working, I'll likely stick with it. There will eventually be splash particles when you jump in the water, but they won't cover your whole screen or something to hide the lack of fog in parts that are underwater.
@memetech-
@memetech- 5 ай бұрын
0:46 Minecraft camera in water is the same way
@tomweiland
@tomweiland 5 ай бұрын
And I don't like it that way :P
@bd5067
@bd5067 2 жыл бұрын
Maybe a weird/stupid question, but why not use screen space reflections? Like sure, they are not perfect either as it only will reflect whatever is visible for the camera, but it seems like a much easier, accurate, and more performant friendly solution. I am pretty sure most AAA games just use that combined with some sort of dynamic reflection cubes (which update x amount of time if the environment is dynamic) to kinda hide the lack of reflections from outside of the camera view. So you'll still see objects reflected in the water which are outside of the frame, but they will just be a bit lower res and static. The other solution would be ray tracing obviously hahaha Personally I would stick with my proposed technique. It's what the industry bests use for their water and I feel there is a good reason for that
@tomweiland
@tomweiland 2 жыл бұрын
Well for one thing, URP has no SSR built in, and I wasn't able to find any solutions I could just take and use instead of figuring it out from scratch (though I admittedly didn't search for super long). As for reflection probes, literally everything that would need to be reflected (aside from islands) would be dynamic, so I'm not really sure how viable of an option they are. I also find them kind of annoying to work with, especially when everything in my scene is generated at runtime (I'd have to generate the whole map in the editor/outside of playmode just to be able to bake the reflections). I may still change it up in the future, but for now I'm just going to stick with the planar reflections-they get the job done and look really good in shallow/calm waters, which is where the reflections matter most anyways in my opinion.
@tediop1330
@tediop1330 Жыл бұрын
Will you still make videos? I really loved them, it's nice to see you still come back to answer some comments tho
@tomweiland
@tomweiland Жыл бұрын
I've been working on rebuilding the entire project and I do want to keep making videos, but this project is not making me any money (nor will it in the foreseeable future) so a lot of my time is going elsewhere as I'm trying to figure out how to support myself :/
@maxherrmann1182
@maxherrmann1182 2 жыл бұрын
You might be able to perform some of the screen space reflection raymarch techniques on your planar reflections to correct for height
@tomweiland
@tomweiland 2 жыл бұрын
Maybe 🤔
@beatrizazevedo4969
@beatrizazevedo4969 2 жыл бұрын
Keeps you creating ;)
@tomweiland
@tomweiland 2 жыл бұрын
Yep.
@kingnull2697
@kingnull2697 2 жыл бұрын
Since it shouldn't be possible to have water fog in the vertical space between 2 groups of white pixels, have you considered just filling those areas in with a super simple vertical pass?
@tomweiland
@tomweiland 2 жыл бұрын
I'm just not sure how I'd go about doing that. You don't have information about the neighboring pixels in a shader, so it's not like I can just check the pixels below to see if any of them are white.
@rodlopt
@rodlopt Жыл бұрын
To be honest I kinda like how blocky the ocean looks! It gives it a unique style.
@tomweiland
@tomweiland Жыл бұрын
Yes I love the low poly art style, assuming it's done decently well!
@Skeffles
@Skeffles 2 жыл бұрын
Fantastic improvements to the ocean, it looks amazing!
@tomweiland
@tomweiland 2 жыл бұрын
Thanks :D
@moustaphagaye7978
@moustaphagaye7978 2 жыл бұрын
Great video!
@tomweiland
@tomweiland 2 жыл бұрын
Thanks :)
@manafront
@manafront Жыл бұрын
just stumbled here, take your time it will pay off
@tomweiland
@tomweiland Жыл бұрын
😅🤞
@AndrewDavidJ
@AndrewDavidJ 2 жыл бұрын
Tom, you're the only English-speaker on the entire internet who actually pronounces the "v" at the beginning of "Voilà!" Thank you. I die a little bit inside every time I hear people butcher it by saying "wala"
@tomweiland
@tomweiland 2 жыл бұрын
I did take several years of French immersion (basically most of my classes at school were entirely in French), so that might deserve some credit, although honestly I'm not sure I've ever heard anyone say "wala" :P
@celaldogangunes
@celaldogangunes 2 жыл бұрын
I think you should share 1080p photo of 2:56. It looks amazing and it will be great as a background image for Windows
@tomweiland
@tomweiland 2 жыл бұрын
If you join the Discord server and ask me there, I can send you one :)
@clarkmeyer7211
@clarkmeyer7211 2 жыл бұрын
Lower the resolution of your water reflection in order to give the water ripple effect and to improve performance slightly
@tomweiland
@tomweiland 2 жыл бұрын
Lowering the reflection resolution doesn't give it a ripple effect, it just looks worse. I'll probably add a quality setting for it eventually, but that's not a priority right now.
@fredxvi
@fredxvi 2 жыл бұрын
Use a shader that repeats lod copies of the water mesh into the distance. Based on how far you can see, or truncate the water fog
@tomweiland
@tomweiland 2 жыл бұрын
Yeah there's a bunch of different solutions which I'll end up combining, and hopefully together they'll eliminate all artifacts.
@colorred5383
@colorred5383 2 жыл бұрын
5:50, I wonder if you could just turn off that texture/shader if the camera gets to a certain height, since it's only needed for the under water effect anyways? you could turn it off as soon as the camera is higher than the waves can be
@tomweiland
@tomweiland 2 жыл бұрын
I'll definitely be doing that which will solve most of the problem, but it won't prevent all artefacts so I still need to come up with something else to address those cases.
@colorred5383
@colorred5383 2 жыл бұрын
@@tomweiland i see, good luck! Looking forward to see your solutions in the upcoming devlogs!
@Gronk_777
@Gronk_777 2 жыл бұрын
Noice!!!!!! It's been forever! Thanks for the video, I love how your games progressing!😃 P.S. is there any way you can put this game on your website so your viewers can play? Thanks --- a subscriber who remembers to like every video
@tomweiland
@tomweiland 2 жыл бұрын
Once there's actually something playable I'll probably start doing small playtests. If you want to be a part of that when it happens, I'd recommend joining the Discord server, as that's the first place I'll announce it. _"a subscriber who remembers to like every video"_ I appreciate it 🙏
@Gronk_777
@Gronk_777 2 жыл бұрын
@@tomweiland OK, thanks!
@drierwhisper729
@drierwhisper729 2 жыл бұрын
YAY ANOTHER DEVLOG!!!!!
@tomweiland
@tomweiland 2 жыл бұрын
About time :P
@drierwhisper729
@drierwhisper729 2 жыл бұрын
Yes, to long have I waited for this lol
@Choo_Choo_Oreo
@Choo_Choo_Oreo Жыл бұрын
A note for the first minute of the video, that bug you mention is in SO many games with water in them.
@tomweiland
@tomweiland Жыл бұрын
And it always bothers me :P
@bdenix1997
@bdenix1997 2 жыл бұрын
well, thanks to someone on unity forums, i've finally found the way to get the world position of screen pixels in standard render pipeline. and now i can sample the same displacement function and have a nice transition between. about the problem the ocean shader vertices are not matching with frag shader, what i did to solve it was, instead of clipping the quad if worldpos.y is below displacement, i've made a gradient. lerping between screen input and underwater color, by 1- saturate ( worldpos.y - displacementY). so that even the vertex displacement is kind of off, it is covered by the gradient over extended. and lerping between a darker color by (1- saturate(abs(worldpos.y - displacementY))), i can have a thick gradient that is darker on the center, which also gives it a nice waterline look.
@tomweiland
@tomweiland 2 жыл бұрын
Sampling the water height at ever pixel is still not ideal because to get the height at a given point with Gerstner waves, you have to sample the wave equation 3+ times. That's a _lot_ of wave height calculations, and I think my masking solution is also more flexible for other things I may want to do in the future.
@bdenix1997
@bdenix1997 2 жыл бұрын
@@tomweiland Idk why u brought that topic. Thats obvious isnt it. The more complex the calculations are the more performance u gonna sacrifice. But the displacement function has to be same to get the exact point. Or else its not going to match. Which you need to sacrifice some performance. I personally am sampling from a heightmap. Not that heavy. One shouldnt have any permormance issues with some optimizations.
@bdenix1997
@bdenix1997 2 жыл бұрын
@@tomweiland and as you are doing the same thing, sampling displacement on every pixel is the only way of doing this.
@tomweiland
@tomweiland 2 жыл бұрын
_"The more complex the calculations are the more performance u gonna sacrifice."_ Well yes, obviously, which is why I'd prefer not to have to sample the wave equation 3+ times per pixel. My waves aren't a simple sine wave-Gerstner waves displace vertices horizontally as well as vertically, so you can't simply use the same math to calculate the height at a given point, because it would actually spit out the height for a point that's offset horizontally as well. As shown in the video, sampling the wave height at every pixel is not the only option-the masking solution works too, and in my opinion is better because it's more flexible and will be easier to work with for future things I'll have to do with the water rendering.
@bdenix1997
@bdenix1997 2 жыл бұрын
@@tomweiland yeah. Thats right. I just forgot about gerstner waves for a second. And you know what? i watched the video again. Realised that i kindof missed out on the last part. Now it makes sense. And the whole conversation was nothing but a waste of time. Sorry for being dumb 🤠 But how do you render your water into a texture? You just say an additional render option or sth like that. What is that?
@UncleSkeleton
@UncleSkeleton 2 жыл бұрын
I don't know much on this subject, but couldn't you raise the very far ocean vertices to the camera's height level and out towards the far clipping plane in the ocean shader to block out the fog? I seem to remember someone explaining this technique in the Unity3D reddit when assisting someone with the impression of an endless ocean & hiding the horizon. I've rarely handled shader jargon in my life so it's just a theory on my part. Best of luck to you figuring it out regardless though.
@tomweiland
@tomweiland 2 жыл бұрын
_"but couldn't you raise the very far ocean vertices to the camera's height level"_ Potentially, but I'm not sure that it wouldn't look warped 🤔 I'd have to raise the vertices of everything else in the distance as well (islands, boats, etc.) to keep them above the surface where they should be, but then they'd probably also need to be rotated to match the slant of the water surface and overall I think it'd be very complicated to make it look right. What I'll probably do is just disable the fog entirely when you get above the maximum wave height.
@UncleSkeleton
@UncleSkeleton 2 жыл бұрын
​@@tomweiland The transition doesn't seem warped in the example I saw but it's also obscured by distance fog. (Can't post links but I found a post that demonstrates it, it's the top response in "How do I hide the skybox horizon?" from about 5 years ago on r/Unreal3D) but I see the concern with islands and boats though. I commend your tenacity with this issue and not just going the easy route, ditching the clean mid-screen transition and hiding it with a camera offset in/out the water like plenty games do. Best of luck to you, I'm sure whatever you do it will come out great.
2 Years of Game Dev - Making a Multiplayer Pirate Game in Unity
16:47
World's First Selfie From Space! (YOU Can Get One Too!)
25:54
Mark Rober
Рет қаралды 929 М.
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 242 МЛН
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59
Do you love Blackpink?🖤🩷
00:23
Karina
Рет қаралды 22 МЛН
Why Making Multiplayer Games SUCKS
6:46
Tom Weiland
Рет қаралды 433 М.
How I Became a Sea of Thieves Developer
8:05
Zyger
Рет қаралды 276 М.
Moebius-style 3D Rendering | Useless Game Dev
8:12
Useless Game Dev
Рет қаралды 851 М.
How Games Fake Water
22:52
Acerola
Рет қаралды 221 М.
I Played My Pirate Game With Friends | Devlog #44 (Plus Gameplay!)
10:21
I Locked this AI Dog in an Escape Chamber for 1000 Years
21:29
Why Is It Bad That My Game Looks Good?
16:40
Deynum Studio
Рет қаралды 334 М.
I HAND-CRAFTED a WORLD for my RPG Game
7:26
AIA
Рет қаралды 509 М.
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 242 МЛН