I Made Sebastian Lague's Procedural Planet In Godot 4

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ธ.ค. 2024

ความคิดเห็น • 104

  • @athillion
    @athillion  2 ปีที่แล้ว +83

    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 2 ปีที่แล้ว +8

      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 ปีที่แล้ว +12

      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 ปีที่แล้ว

      how can i do that in shader
      or gdscript

    • @davidzaydullin
      @davidzaydullin 9 หลายเดือนก่อน

      thing i dont like about it is that i cant have some variable for objects that i can read while post processing

  • @forthfora
    @forthfora 2 ปีที่แล้ว +102

    Great work!! I always wanted a Sebastian Lague-like video on Godot, you nailed it!!

  • @Chevifier
    @Chevifier 2 ปีที่แล้ว +61

    Me: "Im getting good and comfortable making fragment/vertex Shaders"
    Compute Shaders: "Well Hello There!"😂

  • @HZ_Sai
    @HZ_Sai 2 หลายเดือนก่อน +2

    this is beautiful. i really feel like i want to understand this . i love nature i think about it all the time and i think understanding this will make me enjoy thinking about it even more . thanks .

  • @mikenone5902
    @mikenone5902 9 หลายเดือนก่อน +1

    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!

  • @TommyLikeTom
    @TommyLikeTom 2 ปีที่แล้ว +11

    I love Sebastian Lague. Great job! I noticed you also implemented his style and tone in your video project

  • @natcracken
    @natcracken ปีที่แล้ว +2

    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

  • @jimmio3727
    @jimmio3727 2 ปีที่แล้ว +5

    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 2 ปีที่แล้ว +11

    I love how you explain it!

    • @athillion
      @athillion  2 ปีที่แล้ว +3

      Thanks! ❤

  • @shubhamjawale8900
    @shubhamjawale8900 4 หลายเดือนก่อน

    You inspired me bro!! I have been following Sebastian for a long time but you gave me hope again nice work...

  • @dunyakilavuz
    @dunyakilavuz 2 ปีที่แล้ว +2

    Always happy to see works like this made in Godot, keep up the good work!

  • @stayathomedev
    @stayathomedev 2 ปีที่แล้ว +6

    Awesome job! Been wanting to do this myself.

  • @NiklasAndersson7
    @NiklasAndersson7 ปีที่แล้ว

    Very interesting material. Many thanks for all your work and this valuable contribution to the Godot community!

  • @wojciechbem8661
    @wojciechbem8661 2 ปีที่แล้ว +3

    Very inspiring. Keep going 💪

  • @HypeLozerInc
    @HypeLozerInc 2 ปีที่แล้ว +1

    Thank you, this is what I've been curious about love seeing experimenting with engines

  • @theotherquou
    @theotherquou 2 ปีที่แล้ว +1

    Beautiful project and beautifully put together video :)

  • @Shack263
    @Shack263 2 ปีที่แล้ว +3

    This is incredible! Good work. I hope one day I can make stuff like this too.

  • @owenlloyd2528
    @owenlloyd2528 ปีที่แล้ว +1

    Thank you. This was very interesting!

  • @LaSandWitch
    @LaSandWitch 2 ปีที่แล้ว +3

    Quality, informative, thorough video! Loved it! Very Sebastian-esque, but definitely doesn't feel like a copy cat or anything!

  • @ZylannMP3
    @ZylannMP3 2 ปีที่แล้ว +45

    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 th-cam.com/video/Cq_dHmgcc7U/w-d-xo.html

    • @athillion
      @athillion  2 ปีที่แล้ว +7

      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 2 ปีที่แล้ว +2

      @@athillion (not sure what's going on with TH-cam, I attempted to answer 3 times already but each time the comment goes away in limbo Oo)

    • @ZylannMP3
      @ZylannMP3 2 ปีที่แล้ว +9

      6th attempt....... my voxel engine and the demo project are both available on my Github. Sorry no links in this comment, I feel like TH-cam has an auto-mod which deletes comments way too aggressively or something

    • @Sk4lli
      @Sk4lli 2 ปีที่แล้ว +1

      @@ZylannMP3 Yeah, for some reason often comments with links are aggressively deleted. Even links to other TH-cam videos.
      But it's an interesting approach. How does ist compare performance wise?

    • @ZylannMP3
      @ZylannMP3 2 ปีที่แล้ว +5

      @@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

  • @ZZKJ396
    @ZZKJ396 2 ปีที่แล้ว +1

    Really well explained, subbed! 👍

  • @emoneydev8684
    @emoneydev8684 2 ปีที่แล้ว +3

    Amazing 👏👏👏

  • @UberSpaceCow
    @UberSpaceCow 2 ปีที่แล้ว

    Wow! What an awesome video. Thanks for this :)

  • @Steveplays28
    @Steveplays28 2 ปีที่แล้ว +1

    Great work, looks phenomenal!

  • @99JasonKim
    @99JasonKim 2 ปีที่แล้ว +3

    impressive

  • @kallelfiori9767
    @kallelfiori9767 ปีที่แล้ว

    this have a Sebastian Lague vibe but in Godot, love it

  • @Sk4lli
    @Sk4lli 2 ปีที่แล้ว

    Very nice and informative video! I really hope these gaps in Godot capabilities get fixed, then it would definitely become a more powerful engine.

  • @pedroforesterdasilva
    @pedroforesterdasilva 5 หลายเดือนก่อน

    Incredible!

  • @zacharychristy8928
    @zacharychristy8928 2 ปีที่แล้ว +5

    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.

  • @Mark_Rober
    @Mark_Rober ปีที่แล้ว

    This is amazing!

  • @saibadam
    @saibadam 2 ปีที่แล้ว

    Me: Learning how to move a cube.
    Athillion: Compute shaders

  • @__yunusey
    @__yunusey ปีที่แล้ว

    Great content!

  • @stanleesiele6028
    @stanleesiele6028 8 หลายเดือนก่อน

    If only people would make videos this way

  • @addmix
    @addmix 2 ปีที่แล้ว +1

    I was planning on doing this eventually, but it looks like you've beat me to it.

  •  2 ปีที่แล้ว +9

    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  2 ปีที่แล้ว +9

      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.

  • @NeilRoy
    @NeilRoy 2 ปีที่แล้ว

    Very nicely done.

  • @rrtt_2323
    @rrtt_2323 2 ปีที่แล้ว

    Very inspiring. I wanted to try that before.

  • @BastiaanOlij
    @BastiaanOlij ปีที่แล้ว +3

    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 ปีที่แล้ว

      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?

    • @dfunited1
      @dfunited1 2 หลายเดือนก่อน

      I don't think that would be in the spirit of the original Sebastian Lague project that he's recreating.

  • @RobertoMaurizzi
    @RobertoMaurizzi 2 ปีที่แล้ว

    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 2 ปีที่แล้ว

      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... 🤔)

  • @marc.lepage
    @marc.lepage ปีที่แล้ว

    Nice!

  • @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.

  • @zzmz1670
    @zzmz1670 2 ปีที่แล้ว

    awesome!

  • @johanngambolputty5351
    @johanngambolputty5351 2 ปีที่แล้ว +7

    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 2 ปีที่แล้ว +1

      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 2 ปีที่แล้ว +1

      @@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.

  • @SnowyFoxFox
    @SnowyFoxFox 2 ปีที่แล้ว

    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.

  • @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.

  • @Chevifier
    @Chevifier 2 ปีที่แล้ว +2

    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  2 ปีที่แล้ว +3

      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.

  • @SeleDreams
    @SeleDreams 2 ปีที่แล้ว

    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

  • @RedDread_
    @RedDread_ 2 ปีที่แล้ว +5

    Great work.... Mind if I use this to create a Kerbal Space program clone?

    • @athillion
      @athillion  2 ปีที่แล้ว +5

      Sure, go ahead!

  • @cholasimmons
    @cholasimmons 10 หลายเดือนก่อน

    Sebastian is King!
    I could do with that starfield in the back, is that procedural?

  • @Galomortalbr
    @Galomortalbr 2 หลายเดือนก่อน

    I would merge all the shaders together, not pretty solution, but it works if it works

  • @luisernestodeltoropena6606
    @luisernestodeltoropena6606 2 ปีที่แล้ว

    Really amazing, congrats! Can you give me some tips about where and how to learn more about computer graphics, to get to that level?

  • @theneonbop
    @theneonbop 2 ปีที่แล้ว

    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.

  • @neozoid7009
    @neozoid7009 2 ปีที่แล้ว

    Awesome

  • @kaihenthe
    @kaihenthe 2 ปีที่แล้ว

    good video, could help alot with my prototype.

  • @haybail7618
    @haybail7618 2 ปีที่แล้ว

    this video is very sebastian-like

  • @RENhoekLOUD
    @RENhoekLOUD 2 ปีที่แล้ว +1

    cuando llega Godot 4 Stable/Oficial (no Beta)? y si habra problemas con inportar proyectos de las verciones 3?

  • @user-es6wn6pz3e
    @user-es6wn6pz3e หลายเดือนก่อน

    I'm not sure if I completely understand why you had to use multiple cameras, as I'm not too familiar with godot, but do you need to run those shaders as post-processing effects like you did in unity? Couldn't you just put a slightly oversized sphere around the planet, and run water and atmosphere as a frag shader on that? Or, to also have it work when inside, just put like a small quad right in front of the camera, and run the shaders as frag shaders on that?

  • @TriviaQuizocity
    @TriviaQuizocity 6 หลายเดือนก่อน

    Bro did everything in the most difficult way you could😂

  • @kaileh57
    @kaileh57 2 ปีที่แล้ว +2

    what beta of godot 4 did you use for this?
    (also great vid)

    • @athillion
      @athillion  2 ปีที่แล้ว +3

      Thanks! I used beta 3, then 4, then 5 🙂

  • @KillahMate
    @KillahMate 2 ปีที่แล้ว +2

    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.

  • @grilleFire
    @grilleFire ปีที่แล้ว

    Any chance in making phsycis gravity and collisions ?

  • @and-there-it-goes
    @and-there-it-goes 3 หลายเดือนก่อน

    thx

  • @maniksharma9736
    @maniksharma9736 ปีที่แล้ว

    Can u create a motion blur shader ?

  • @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.

  • @vediamocosa2876
    @vediamocosa2876 ปีที่แล้ว

    Is there will be a videogame?

  • @oracuda
    @oracuda ปีที่แล้ว

    what is the unity project's performance without post processing compared to godot's?

  • @yefersonramirez9585
    @yefersonramirez9585 ปีที่แล้ว

    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 2 ปีที่แล้ว +1

    It reminds me of Spore

  • @GoatedDeveloper
    @GoatedDeveloper 11 หลายเดือนก่อน +2

    I'm going to try this in the roblox game engine wish me luck

  • @ptkstefano
    @ptkstefano ปีที่แล้ว

    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.

  • @feedmind4669
    @feedmind4669 2 ปีที่แล้ว +1

    subd

  • @tawandagamedevs
    @tawandagamedevs ปีที่แล้ว

    Why is your local thread count 512 its suppose to be between 0-31

  • @HZ_Sai
    @HZ_Sai 2 หลายเดือนก่อน

    it's been already a year for me learning godot and am still stupid as f* . i can make character controllers and inventory and levels and stuff but goddamnit i still feel like i haven't learned anything

  • @markcorrigan3930
    @markcorrigan3930 2 ปีที่แล้ว

    So when Daggerfall godot??? 😃

  • @hiperfx892
    @hiperfx892 7 หลายเดือนก่อน

    Finally! Sebastian from Walmart 😂

  • @1piece-nftmarket
    @1piece-nftmarket 7 หลายเดือนก่อน

    i cant even work on shaders from sabestian league.

  • @reddragon_2002
    @reddragon_2002 ปีที่แล้ว

    Как сделать космос в Godot? Сделай видео)

  • @carroteish3289
    @carroteish3289 2 ปีที่แล้ว

    Svensk?

  • @scififan698
    @scififan698 ปีที่แล้ว

    you even learned to talk a bit like Sebastian Lague. lol

  • @JakubSK
    @JakubSK 6 หลายเดือนก่อน

    I made this in a much easier way in Godot and it runs at 60fps.

  • @gibarel
    @gibarel 2 ปีที่แล้ว

    doesnt godot 4 support vulkan? why use opengl then?

  • @mattlegge8538
    @mattlegge8538 ปีที่แล้ว +6

    I bet you're not wanting to go back to Unity now..

  • @themax2go
    @themax2go ปีที่แล้ว

    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

  • @lazi21
    @lazi21 2 ปีที่แล้ว +1

    snake_case