Тёмный

I Made Sebastian Lague's Procedural Planet In Godot 4 

Athillion
Подписаться 1,1 тыс.
Просмотров 52 тыс.
50% 1

I made Sebastian Lague's procedural planet in Godot 4!
I also explored the capabilities of multi-pass post-processing and compute shaders.
Source code: github.com/athillion/Procedur...
► Procedural Moons and Planets, by Sebastian Lague:
• Coding Adventure: Proc...
► Water breakdown (foam), by Owen Deery:
fire-face.com/personal/water/
► Water refraction, by kmltml:
gist.github.com/kmltml/2e2091...
Music:
"Price of Freedom" by Zakhar Valaha
"Chill Abstract (Intention)" by Yrii Semchyshyn
"Space" by Music Unlimited
"Floating In Space" by Music | SFX
Chapters:
00:00 Intro
01:44 Terrain and Compute Shaders
09:25 Ocean
11:18 Atmosphere
13:25 Stars
14:33 Multi-Pass Post-Processing
15:16 Epilogue
#godot #godotengine #gamedev #programming

Опубликовано:

 

17 ноя 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 98   
@athillion
@athillion Год назад
Hi! What do you think about custom post-processing in Godot? What was your experience? Also, have you tried compute shaders with Godot 4 yet?
@asdasfdfgewqgrgyjh
@asdasfdfgewqgrgyjh Год назад
Glad they finally added compute shaders. I remember having a long conversation about that on the Godot Github a couple years back but it was decided not feasible due to the OpenGL 2.0 support and we would have to wait for the Vulkan renderer
@serendipinator
@serendipinator Год назад
Can you make an issue for this with your current struggles and project as an example of why mult-pass post processing is needed. The Godot Core Contributors are fantastic but tend not to add a feature unless there is a documented use case for it. This seems like a perfect candidate
@saminegamme
@saminegamme 7 месяцев назад
how can i do that in shader or gdscript
@davidzaydullin
@davidzaydullin 5 месяцев назад
thing i dont like about it is that i cant have some variable for objects that i can read while post processing
@Chevifier
@Chevifier Год назад
Me: "Im getting good and comfortable making fragment/vertex Shaders" Compute Shaders: "Well Hello There!"😂
@forthfora
@forthfora Год назад
Great work!! I always wanted a Sebastian Lague-like video on Godot, you nailed it!!
@dunyakilavuz
@dunyakilavuz Год назад
Always happy to see works like this made in Godot, keep up the good work!
@theotherquou
@theotherquou Год назад
Beautiful project and beautifully put together video :)
@TommyLikeTom
@TommyLikeTom Год назад
I love Sebastian Lague. Great job! I noticed you also implemented his style and tone in your video project
@NiklasAndersson7
@NiklasAndersson7 9 месяцев назад
Very interesting material. Many thanks for all your work and this valuable contribution to the Godot community!
@mikenone5902
@mikenone5902 4 месяца назад
I'd just like to say you did an excellent job both on the project and in making the video. It's very well articulated from start to finish. Very thorough!
@Steveplays28
@Steveplays28 Год назад
Great work, looks phenomenal!
@Shack263
@Shack263 Год назад
This is incredible! Good work. I hope one day I can make stuff like this too.
@UberSpaceCow
@UberSpaceCow Год назад
Wow! What an awesome video. Thanks for this :)
@stayathomedev
@stayathomedev Год назад
Awesome job! Been wanting to do this myself.
@HypeLozerInc
@HypeLozerInc Год назад
Thank you, this is what I've been curious about love seeing experimenting with engines
@ZZKJ396
@ZZKJ396 Год назад
Really well explained, subbed! 👍
@Mark_Rober
@Mark_Rober Год назад
This is amazing!
@wojciechbem8661
@wojciechbem8661 Год назад
Very inspiring. Keep going 💪
@Sk4lli
@Sk4lli Год назад
Very nice and informative video! I really hope these gaps in Godot capabilities get fixed, then it would definitely become a more powerful engine.
@jimmio3727
@jimmio3727 Год назад
My experience with viewports in 3.x was "don't use them ever" as they're quite fiddly to setup and then also extremely slow. I see that hasn't changed much. In my case, I was creating a ray-sphere intersection atmosphere similar to yours, however I didn't care that it wasn't true volumetric; I just wanted the sky to look good in a first person shooter project I was working on. So what I did was adapt the original viewport version to fit on a hemisphere and then to draw the hemisphere first (render order used to be set by tree location; now that's further adjustable in 4.0 on top of the usual node order) and force each fragment to be max. depth. This worked great and brought my performance up immensely; but obviously it's not without issues and isn't a fullscreen effect at that point. Happy to see it's not just me, at least...
@billyfromzera4162
@billyfromzera4162 Год назад
I love how you explain it!
@athillion
@athillion Год назад
Thanks! ❤
@LaSandWitch
@LaSandWitch Год назад
Quality, informative, thorough video! Loved it! Very Sebastian-esque, but definitely doesn't feel like a copy cat or anything!
@natcracken
@natcracken 10 месяцев назад
I'm been trying to hack together deferred rending in Godot, and the multi-pass requirements for it are very simmilar to your project. I'm dissapointed that Godot still isn't up to the task, and thank you for trying it first. You've saved me a lot of time
@owenlloyd2528
@owenlloyd2528 11 месяцев назад
Thank you. This was very interesting!
@lanichilds2825
@lanichilds2825 Год назад
It’s inspiring to see this I’m just now getting started with computers But I want to learn to make something like this 👍 proud of you
@ZylannMP3
@ZylannMP3 Год назад
In my project, I use a full-screen quad for planet atmospheres and lens flares. The atmosphere is a simple ray-sphere integration, but maybe it could include scattering to be more fancy (curious about baking optical depth! I might poke at your code some day). I don't use any viewport. When I get far enough from a planet, I switch the fullscreen quad to a cube around the planet, which is done seamlessly. It allows to layer multiple planets on screen, while reducing the amount of pixels to process in fragment shaders, resulting is better performance. I haven't tackled oceans though, which might be tricky. For oceans I was thinking of actual geometry (a sphere that tessellates when getting close) which would use depth too, so it would not be bothered by the other post-processing effects and would be able to wave, although I'm not sure about the effects of overdraw and transparency. In the distance it could eventually collapse into the ground shader to prevent Z-fighting, since my project takes place with large distances. It would be great if Godot allowed more interop between compute shaders and the main renderer. And also provide more APIs to do postprocessing effects as well, though I'm a bit concerned that my trick switching to cubes would not apply there... Check ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Cq_dHmgcc7U.html
@athillion
@athillion Год назад
This is probably a better approach than multiple viewports, I was also considering using actual geometry for the ocean, since I wanted to add actual waves to it. I stuck with the full-screen quad for now because I wanted the project to reflect Sebastian Lague's as much as possible so I could make a more valid comparison. If Godot could get better support for custom post processing, that would be amazing! Your solar system demo looks amazing. I suppose your voxel engine is not available on GitHub? I am looking into implementing something similar using Dual Contouring.
@ZylannMP3
@ZylannMP3 Год назад
@@athillion (not sure what's going on with RU-vid, I attempted to answer 3 times already but each time the comment goes away in limbo Oo)
@ZylannMP3
@ZylannMP3 Год назад
6th attempt....... my voxel engine and the demo project are both available on my Github. Sorry no links in this comment, I feel like RU-vid has an auto-mod which deletes comments way too aggressively or something
@Sk4lli
@Sk4lli Год назад
@@ZylannMP3 Yeah, for some reason often comments with links are aggressively deleted. Even links to other RU-vid videos. But it's an interesting approach. How does ist compare performance wise?
@ZylannMP3
@ZylannMP3 Год назад
@@Sk4lli I haven't tried the demo from this video yet so I don't know about comparison, but my project can run at 60fps on my 1060. I should probably try uncapping framerate to see how high it goes, but I not only have atmosphere in my project, also got lens flares and a multiple voxel-based planets with scattered rock props^^ I actually have an ocean on one of them, but it's just a big sphere. And later I want to add more fancy water, impostor foliage and planetary rings. And player-made structures such as buildings and ships, but that's way later in the future xD
@NeilRoy
@NeilRoy Год назад
Very nicely done.
@zacharychristy8928
@zacharychristy8928 Год назад
I've worked with some CUDA in the past, and there's a LOT of similar concepts between CUDA kernels and compute shaders. Im really excited, there's a ton of cool things you can do with that kind of power that you can't do with fragment/vertex shaders. You showed that off really well! Man, it sucks that they haven't added multipass shaders. I really wanted those.
@emoneydev8684
@emoneydev8684 Год назад
Amazing 👏👏👏
@__yunusey
@__yunusey 7 месяцев назад
Great content!
@pedroforesterdasilva
@pedroforesterdasilva 27 дней назад
Incredible!
@rrtt_2323
@rrtt_2323 Год назад
Very inspiring. I wanted to try that before.
@addmix
@addmix Год назад
I was planning on doing this eventually, but it looks like you've beat me to it.
@BastiaanOlij
@BastiaanOlij Год назад
I'll have to take a closer look at your project but I'm pretty sure you can create the ocean and atmosphere effects without resorting to postprocessing the way you are doing this, instead rendering a sphere around the planet and embedding the logic there should result in the same effect. Also you can likely combine your ocean and atmosphere pass into one. Both work on the same dataset, if the height you're sampling is below ocean depth you perform the ocean logic to get your base color, else just take the color as is. then apply atmosphere on top.
@GonziHere
@GonziHere 10 месяцев назад
I feel like you are correct, but bunching several post processes into one isn't a correct solution, rather a workaround for Godot, IMO. If it's a valid technique (IMO, it is) and can be done straight-forwardly without an engine (IMO, it can), it's an issue that Godot cannot do it, no?
@RobertoMaurizzi
@RobertoMaurizzi Год назад
Interesting video and very good exposition of the process and problems! I don't use Godot (I decided it'd be more useful to learn Rust while trying to write games, so I started with Bevy) but I'd really like to see more videos like this!
@RobertoMaurizzi
@RobertoMaurizzi Год назад
Hmmm, with Beta 6 I'm getting a `SHADER ERROR: Tokenizer: Unknown character #35: '#'` on the line `#include "res://materials/shaders/include/Math.gdshaderinc"` of a shader that should be the Ocean one (has a uniform float OceanRadius - and no, there's no shader resource name anywhere I can see... 🤔)
@B_dev
@B_dev Год назад
that's cool! i tried to do this about a year and a half ago, I got the planets generating mostly OK but didn't get into the shaders. I also never got to implement an LOD to allow for surface exploration, not to mention colliders.
@Darkest-Kn1ght
@Darkest-Kn1ght Год назад
I thoroughly enjoyed this video Athillion! Thank you, Thank you, and Thank You!!! I watched Sebastian Lague's series on the delivery game he created and was excited to see him using "real world" data to create a virtual version of Earth to fly around. My question is... could this be done in Godot, to the point where player characters could be placed in specific locations to explore and travel through? These characters would be land based at first and have no ability to fly around until later versions of the game. I have a concept for several games that I could implement, and one of those games would be based around a futuristic version of Earth gone terribly wrong, as well as other planet exploration due to having to leave Earth because of what happened.
@99JasonKim
@99JasonKim Год назад
impressive
@zzmz1670
@zzmz1670 Год назад
awesome!
@luisernestodeltoropena6606
@luisernestodeltoropena6606 Год назад
Really amazing, congrats! Can you give me some tips about where and how to learn more about computer graphics, to get to that level?
@stanleesiele6028
@stanleesiele6028 3 месяца назад
If only people would make videos this way
@kallelfiori9767
@kallelfiori9767 Год назад
this have a Sebastian Lague vibe but in Godot, love it
@kaihenthe
@kaihenthe Год назад
good video, could help alot with my prototype.
@marc.lepage
@marc.lepage Год назад
Nice!
@neozoid7009
@neozoid7009 Год назад
Awesome
Год назад
Man nice video, you accomplished what I am trying to do for my game. Do you mind if i look to your code and probably use some? Also i wonder. What game are you developing?
@athillion
@athillion Год назад
Sure! The code is free to use 🙂 I am working on something similar to a colony / life sim, maybe a hybrid between Spore and No Man's Sky, but smaller scale.
@saibadam
@saibadam Год назад
Me: Learning how to move a cube. Athillion: Compute shaders
@johanngambolputty5351
@johanngambolputty5351 Год назад
Bravo! I have been meaning to do this for his slime sim, but have been looking for a way to use OpenCL since I know a bit of that. I might just end up using godots python binding so I can use pyopencl to set up my buffers and launch my opencl kernels... I like OpenCL because its practically just plain C without too much extra syntax.
@astroid-ws4py
@astroid-ws4py Год назад
Just asking, How portable is OpenCL between systems? Is it possible to ship a game that includes OpenCL code for Linux, Windows and Mac easily? How does the OpenCL dependencies get installed? Asking for general information not necessarily that it is the best way to go for making with it games. Thanks.
@johanngambolputty5351
@johanngambolputty5351 Год назад
@@astroid-ws4py In theory, the code you write should work with every vendor that has implemented the OpenCL specification, but a bunch of stuff is implemented as extensions I think. For instance, I mostly use it on my AMD card and when I went to run my code on my laptop with intel hd graphics, it turns out that it only has floats and no double types (if you don't necessarily need the precision, you can just swap with a typedef). Though I think that's just an integrated graphics thing, most modern GPUs should have doubles. The OpenCL deps usually need an extra driver like CUDA for NVIDIA or ROCm for AMD (separate from the graphics driver), which the user needs to install. I've only really tried on Linux and only really on manjaro and arch, where there is a opencl-amd AUR package, which is a one click install. It really depends on how easy it is to get users to do so. After that, if you're working in C/C++, as long as the driver is installed and your program can find the so/dll, none of the code should be platform specific, so it should all work. This shouldn't be too different for a wrapper in another language like pyopencl, but it needs to also know where the .icd file for the driver is, so this might add some extra steps. Also, the user might need to also install python in that case, unless it can be bundled with your project (I imagine Godot does this, but I haven't looked). TLDR: Code itself should be almost 100% portable, cpu-side only the OpenCL header location import changes and only for Mac (and once its compiled this won't matter for the user...) and gpu-side, well it should be fine if you're writing pretty plain code with no fancy extensions. Dependency-wise, one driver is needed.
@Chevifier
@Chevifier Год назад
Instead of trying to write to the screen texture you could use a copy of it make the changes then use quad mesh and scale it up to the camera View matrix then apply that texture to it. Ive never actually attempted it but ive seen multiple screen space shaders do it. cell shading for example or you could even use a texturerect Control node set to full screen. For the MeshInstance version just add this to the shader. To line it up with the camera void vertex(){ POSITION = vec4(VERTEX*scale_multiplier,1.0); }
@athillion
@athillion Год назад
This seems quite similar to how I am doing it already. I take the viewport texture from the source camera and provide it to the next step, which is connected to another viewport, which produces a new viewport texture. 🙂 The shaded texture is slapped on each corresponding billboard quad mesh.
@SnowyFoxFox
@SnowyFoxFox Год назад
I'm sitll fairly new to gamedev, and I don't know much about shaders and post-processing, but I do know that Godot 4 is still in its infancy, as are many of its features. Godot doesn't have a very large team working on it, and they can only focus on so many things at once... so, especially when it comes to advanced visual effects and optimisation, it's going to be playing catch-up to Unity and Unreal for some time. Its real strengths lie in its workflow and its open source nature.
@cholasimmons
@cholasimmons 6 месяцев назад
Sebastian is King! I could do with that starfield in the back, is that procedural?
@TriviaQuizocity
@TriviaQuizocity Месяц назад
Bro did everything in the most difficult way you could😂
@RedDread_
@RedDread_ Год назад
Great work.... Mind if I use this to create a Kerbal Space program clone?
@athillion
@athillion Год назад
Sure, go ahead!
@haybail7618
@haybail7618 Год назад
this video is very sebastian-like
@theneonbop
@theneonbop Год назад
Good video! I think the stars look too bright, in real life they are actually very dim but your eyes adjust to the dark to make them brighter. The absence of this in the game makes the transition from day to night look a bit unrealistic.
@SeleDreams
@SeleDreams Год назад
the compute shaders don't use the shader language of godot ? since i remembered godot having a gdscript-like shading language that gets compiled to glsl rather than directly writing the raw glsl
@KillahMate
@KillahMate Год назад
Godot's current postprocessing setup is really basic, and the developers are aware of this - there's already an open Github feature request, and something much more flexible and more performant is expected to be added somewhere down the line... but not any time soon unfortunately. Hopfully sometime in Godot 4.x.
@yefersonramirez9585
@yefersonramirez9585 9 месяцев назад
Hiii, I donn't know if somebody have tried enable antialiasing and noted that effect dissapear. Somebody has idea what part of the effect can be affected by this? I would appreciate all possible help :)
@ilyad4288
@ilyad4288 Год назад
It reminds me of Spore
@alexanderstreng4265
@alexanderstreng4265 Год назад
Godot 4 has sky shaders. Maybe you could convert your stars to it. Is it necessary to have fxaa as a viewport or csn you get away with just enabling fxaa in ProjectSettings.
@grilleFire
@grilleFire Год назад
Any chance in making phsycis gravity and collisions ?
@oracuda
@oracuda Год назад
what is the unity project's performance without post processing compared to godot's?
@kaileh57
@kaileh57 Год назад
what beta of godot 4 did you use for this? (also great vid)
@athillion
@athillion Год назад
Thanks! I used beta 3, then 4, then 5 🙂
@feedmind4669
@feedmind4669 Год назад
subd
@RENhoekLOUD
@RENhoekLOUD Год назад
cuando llega Godot 4 Stable/Oficial (no Beta)? y si habra problemas con inportar proyectos de las verciones 3?
@maniksharma9736
@maniksharma9736 Год назад
Can u create a motion blur shader ?
@OrdinaryScripter
@OrdinaryScripter 6 месяцев назад
I'm going to try this in the roblox game engine wish me luck
@PSPbrtag
@PSPbrtag Год назад
I'm getting to the point where I'm comfortable with my knowledge in web development, but most of the stuff you've shown flies totally over my head. I wonder if I'll ever get to a point were I can understand this.
@hiperfx892
@hiperfx892 2 месяца назад
Finally! Sebastian from Walmart 😂
@vediamocosa2876
@vediamocosa2876 Год назад
Is there will be a videogame?
@1piece-nftmarket
@1piece-nftmarket 3 месяца назад
i cant even work on shaders from sabestian league.
@tawandagamedevs
@tawandagamedevs Год назад
Why is your local thread count 512 its suppose to be between 0-31
@JakubSK
@JakubSK Месяц назад
I made this in a much easier way in Godot and it runs at 60fps.
@reddragon_2002
@reddragon_2002 Год назад
Как сделать космос в Godot? Сделай видео)
@markcorrigan3930
@markcorrigan3930 Год назад
So when Daggerfall godot??? 😃
@scififan698
@scififan698 8 месяцев назад
you even learned to talk a bit like Sebastian Lague. lol
@carroteish3289
@carroteish3289 Год назад
Svensk?
@gibarel
@gibarel Год назад
doesnt godot 4 support vulkan? why use opengl then?
@mattlegge8538
@mattlegge8538 10 месяцев назад
I bet you're not wanting to go back to Unity now..
@lazi21
@lazi21 Год назад
snake_case
@themax2go
@themax2go 11 месяцев назад
can't run, i get a number of errors: "@export_node_path isn't a constant expression" (@export_node_path(Camera3D) var camera_path) E 0:00:09:0348 SCREEN_TEXTURE has been removed in favor of using hint_screen_texture with a uniform. FXAA.tscn::1:410 E 0:00:09:0348 set_code: Shader compilation failed. Condition "err != OK" is true. servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp:2059 @ set_code() E 0:00:09:0758 version_get_shader: Condition "!version" is true. Returning: RID() ./servers/rendering/renderer_rd/shader_rd.h:140 @ version_get_shader() system: M1 MacOS
Далее
Coding Adventure: Procedural Moons and Planets
22:48
Просмотров 1,7 млн
Planet atmospheres, ray-sphere intersections.
7:24
Просмотров 27 тыс.
Штаны легионера
00:44
Просмотров 151 тыс.
I Recreated our Solar System in Godot
8:06
Просмотров 4,2 тыс.
I Made My First Game in Godot in 3 Weeks...
26:21
Просмотров 274 тыс.
Godot - Terrain Prototype Test
3:21
Просмотров 19 тыс.
Learn GODOT 4 Compute Shaders with RAYTRACING!!
12:40
Why Starbound Failed
15:00
Просмотров 723 тыс.
A simple procedural animation technique
8:31
Просмотров 236 тыс.