Learning VULKAN by Rendering a GALAXY

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024
  • In this video, I showcase my process learning Vulkan by walking through an implementation to render a galaxy.
    Codebase:
    github.com/fro...
    Resources:
    vulkan-tutoria...
    vkguide.dev/
    beltoforion.de...
    Check out my Game:
    store.steampow...
    Music (in order):
    Madison James Smith - And The Press of a Key (Terra Toy OST): • Terra Toy OST - And Th...
    C418 - Preliminary Art Form: • Preliminary Art Form

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

  • @namef
    @namef หลายเดือนก่อน +15

    Bro really doxed all of us with in a single thumbnail…

  • @TheScreamingFedora
    @TheScreamingFedora 8 หลายเดือนก่อน +89

    I made a pretty similar tutorial in Three.js, but I did not know about the concentric ellipse bit, or that the red spots were called H2 regions. Yours is a lot more scientifically accurate!

  • @BalintCsala
    @BalintCsala 8 หลายเดือนก่อน +92

    Since you want to continue using Vulkan, I have a couple of recommendations:
    - Assuming you use C++: Use the official c++ headers, they make most parts of the API at least bearable (e.g. No more double query memes, the enumerate functions return a vector, no sType, etc.)
    - Look into the extensions that make Vulkan easier to use (e.g. Dynamic rendering). They are usually free to use on PCs (only tiled mobile gpus might suffer from them a bit), have great support and make the experience a lot better.

    • @frozein
      @frozein  8 หลายเดือนก่อน +28

      Thanks for the advice! Though I plan to do most of my work in C so I wont use vulkan.hpp

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

      Hello master Balint !

    • @MrEnsiferum77
      @MrEnsiferum77 8 หลายเดือนก่อน +1

      That's the problem with today developers, instead of doing it, they trying to look smart, hey why don't u do it in React?

    • @BalintCsala
      @BalintCsala 8 หลายเดือนก่อน +4

      @@MrEnsiferum77 Not sure what you mean, none of those extensions make vulkan easier, they just reduce the amount of bullshit you have to deal with. If you want to write a ton of boilerplate code to get to the exact same point as someone who did it in the smart way (even in terms of performance) then that's a you problem.

    • @MrEnsiferum77
      @MrEnsiferum77 8 หลายเดือนก่อน +1

      @@BalintCsala tha'ts called npm, and u will call it smart way, until u find similar one and than u will say now this is what i was looking for...

  • @nocivofrank
    @nocivofrank 17 วันที่ผ่านมา +1

    I've recently tried doing this in OpenGL and i though it was a challenging task but this this is on a different level I'll give this a try later in the future when i get better.

  • @nite_owl_was_here
    @nite_owl_was_here 6 หลายเดือนก่อน +4

    i followed the vulkan-tutorial the past week. apart from the single file structure and some modern c++ not working, it was a great thing to see that triangle on screen. tough experience, but one that I'll take with me for the rest of my life.

  • @Finding_Fortune
    @Finding_Fortune 8 หลายเดือนก่อน +22

    Loved it, what a way to start learning Vulkan!

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

    Easiest way to learn Vulkan:

  • @JoeTheis
    @JoeTheis 6 หลายเดือนก่อน +5

    Hats off to you, sir. I hear vulkan is quite the beast, so congratulations on conquering it! Sometimes I wish I had the patience for this kind of low-level technical wizardry. But I think at my heart I'm a higher-level gameplay guy. Still, seeing this kind of thing gives me inspiration and motivation to keep ploughing ahead on my own projects. Can't wait to see what you do with this!

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

      I'm a mid level type of guy. I don't have the grit to learn stuff like vulkan but I also don't just go into the higher level where you actually see progress and can make games.

  • @rmt3589
    @rmt3589 8 หลายเดือนก่อน +5

    This is amazing! I needed a tutorial like this so bad. Thank you!
    Now to implement it in OpenGL! Eventually...

  • @fah1007
    @fah1007 8 หลายเดือนก่อน +5

    This is amazing bro . Good job . I wish u a amazing journey this year (:

  • @ChipboardDev
    @ChipboardDev 8 หลายเดือนก่อน +6

    This is really cool! The info on the ellipse will help me in my own project!!

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

    This is awesome man! I've been thinking about trying vulkan for a while. I think this video finally convinced me. Great job!

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

    So.. I see you've decided to become a legend.

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

    This is amazing! Nice job! I am no where near your capibilities yet... Very inspiring.

  • @kr1sso
    @kr1sso 8 หลายเดือนก่อน +1

    Best thing about this is reading the comments while your eyes adjust and everything is rotating like those galaxies :D

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

    god tutorial in creating the universe

  • @PatrickFrom
    @PatrickFrom 8 หลายเดือนก่อน +3

    The new spore lookin' fresh.

  • @jacksaenz2591
    @jacksaenz2591 8 หลายเดือนก่อน +1

    Super cool video! I love the style you've got going on!

  • @sehzadeselim863
    @sehzadeselim863 8 หลายเดือนก่อน +4

    Im going to implement my own galaxy system right after finishing the current project, so im lucky to find your video 😊 (actually, i didn't find your yt channel, it found me itself)

  • @FREAKBAlT
    @FREAKBAlT 3 หลายเดือนก่อน

    I bought the vulkan programming guide book, I’ve just read through the physical and logical devices bit, and enumerating them. I like the book and I’d definitely recommend it if you’re looking to learn vulkan.

  • @dottedboxguy
    @dottedboxguy 8 หลายเดือนก่อน +4

    new vid, pog

  • @streetware-games
    @streetware-games 8 หลายเดือนก่อน +1

    Very nice. Will steal this technique

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

      Check the article in the description, it goes a little more into the details!

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

    Didn’t think I’d hear this c418 song here

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

    I have the impression that it was harder to code the triangle from scratch than do the galaxy from the triangle bit

  • @slava_in3757
    @slava_in3757 8 หลายเดือนก่อน +1

    Beautiful

  • @4D_Bug
    @4D_Bug 8 หลายเดือนก่อน +1

    live long and prosper 🖖

  • @George-bc7ej
    @George-bc7ej 8 หลายเดือนก่อน +3

    Coool!

  • @MisterCallox
    @MisterCallox 4 หลายเดือนก่อน +1

    Hey nice video I'm really looking forward on reading how you implemented it!
    But I wanted to talk about the build of your code on windows 11; I almost never used visual studio and mostly build things on the cli with .bat files or makefiles, so I'm probably doing something wrong.
    I did use Cmake and I managed to get the .sln file to open on visual studio -> Problem is that the shader won't compile properly and prevents the .exe to launch and sometimes even using your .bat or .sh files would'nt work.
    So I found the solution by compiling these shaders myself using glsl provided by the vulkan SDK and then I had to manually move the whole "assets" folder to put it next to the .exe (which is buried in build\bin\debug, thx VS) because the only way to compile it on windows is through this mess of a software with this config !!!
    Cmake is supposed to be "easy" and just makes things worse. Ok I stop it with the rant and I'll add that checking the return value of "fopen_s" with perror in vkh.c:350 would have made this easier somehow.. (I ended up adding it to be sure if that was one of the problems, and it was because it would dereference a NULL pointer later!)
    Sorry for this big text lol I really enjoy your videos and am grateful that you provide the source code !!! Hope to see more from you in the future

    • @frozein
      @frozein  4 หลายเดือนก่อน +1

      Sorry you ran into so many issues :(
      I dual boot windows 11 and ubuntu, so I tested the build scripts for both throughout development, and never experienced any issues myself. Not sure what could be different about your setup. CMake does tend to make a mess of things lol.

  • @minetomek
    @minetomek 8 หลายเดือนก่อน +5

    "With just some magic we have some particles. Now some movement, bigger particles aaannd... we have a galaxy!"

    • @frozein
      @frozein  8 หลายเดือนก่อน +1

      I didn't want to dive too much into the implementation details as they aren't too interesting. You can read the referenced article for more info: beltoforion.de/en/spiral_galaxy_renderer/?a=spiral_galaxy_renderer

  • @vilian9185
    @vilian9185 8 หลายเดือนก่อน +1

    1:55 the operational system don't have any APi to tell you what graphic card to use?

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

      No, you have to pick it yourself in Vulkan!

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

    damn. vulkan's hard

  • @art_cg
    @art_cg 8 หลายเดือนก่อน +1

    That's awesome bro! Loved how smooth the dust cloud looked.
    I am starting to study computer graphics rn, where did you start learning all this general graphics stuff? Do you have any material recommendations? thanks!

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

      If you want to learn Vulkan, there are some tutorials in the description. However I would recommend starting with OpenGL as it is easier, here's a great tutorial: learnopengl.com/ Once you've learned one of these APIs just pick a project to attempt and learn as you go!

    • @art_cg
      @art_cg 8 หลายเดือนก่อน +1

      @@frozein nice, thanks man!

  • @LineOfThy
    @LineOfThy 8 หลายเดือนก่อน +1

    Very cool :D

  • @adamrushford
    @adamrushford 27 วันที่ผ่านมา

    3:20 because it's low level control and meant to be spread amongst your code... imgui docking example is 2000 lines as an example.... but any good application will be after 2024

  • @lelordiii8702
    @lelordiii8702 8 หลายเดือนก่อน +1

    Nice

  • @diamondore9643
    @diamondore9643 8 หลายเดือนก่อน +1

    I want to make a simulation of the universe with ascii graphics, and the way you implemented scaling is very similar to what I want to do. I hope your project will help me

  • @arl-t8d
    @arl-t8d 8 หลายเดือนก่อน +1

    No way 😲

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

    Great video! (what is happening)

  • @PP-ss3zf
    @PP-ss3zf 28 วันที่ผ่านมา

    Why do we use a compute shader and not another type of shader?

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

    I've been trying to learn vulkan for a while, but man does it miss tutorials.

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

      Yeah, there really aren't any tutorials that go beyond just a triangle.

  • @carlosmanuel7160
    @carlosmanuel7160 8 หลายเดือนก่อน +3

    Almost as much code as a Java "Hello world!"

    • @frozein
      @frozein  8 หลายเดือนก่อน +1

      Haha

  • @karanahlawat9106
    @karanahlawat9106 8 หลายเดือนก่อน +1

    Hoooooly shit my guy.

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

    good video, next time maybe 1440p or 4K for higher bitrate

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

      Yeah TH-cam compression didn't play well with this video haha

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

    I have just one question: How hard was debugging non-errors?
    e.g. too slow/too much cpu when zooming into the galaxy or a random graphical glitch when looking at a specific angle

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

      I didn't really run into any issues aside from Vulkan-specific ones, but I assume fixing this issues wouldn't be much harder in Vulkan than in other APIs.

  • @adamrushford
    @adamrushford 27 วันที่ผ่านมา

    how much has terra toy made? is it worth doing smaller projects along my INSANE pathway?

    • @frozein
      @frozein  25 วันที่ผ่านมา

      I won't disclose the exact amount, but Terra Toy has only made a few hundred dollars. I didn't make it for the money, just enjoyed the process. I would say making smaller projects is absolutely worth it! I wouldn't have been able to finish Terra Toy had I not previously made 5+ smaller games (they were so bad I never posted them on yt haha) and gained valuable experience.

    • @adamrushford
      @adamrushford 25 วันที่ผ่านมา

      @@frozein thank you I just wanted to get an idea of the success rate because I know that some games are not much more than terra toy in the long run and make a lot more money than that so I just want to get an idea and a feel for what people actually want and what I can actually get away with along the way because you know money makes the world go round and without that it's hard to develop anything so

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

    yo, what vs code theme are u using? It looks sick

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

      It's called gruvbox

  • @gustavojoaquin_arch
    @gustavojoaquin_arch 6 วันที่ผ่านมา

    impressive very nice

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

    Bro did some building off camera 💀

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

    I Wonder What Game Engine is "Space Engine" Game is Created in

  • @Voidptr0403
    @Voidptr0403 8 หลายเดือนก่อน +1

    are you the gigachad?

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

      he is

  • @sjoerdev
    @sjoerdev 6 หลายเดือนก่อน +1

    which linux distro are you using and how do you make sure it runs on windows too?

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

      I'm dual-booting Ubuntu 22 and Windows 11. I do most of my development on Ubuntu but I occasionally switch to Windows to make sure it works there too.

    • @sjoerdev
      @sjoerdev 6 หลายเดือนก่อน +1

      @@frozein is there a reason you choose ubuntu over debian?

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

      @@sjoerdev Not particularly, I used ubuntu a bit before so there was some familiarity I guess.

  • @fanzaii
    @fanzaii 8 หลายเดือนก่อน +4

    That's really neat! I really like how refined everything looks.

  • @Biggest-Ounce
    @Biggest-Ounce 8 หลายเดือนก่อน

    Care to share your editor, and configurations? 😮😅

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

      I'm using vscode with the "gruvbox" theme.

    • @Biggest-Ounce
      @Biggest-Ounce 8 หลายเดือนก่อน

      @@frozein I love Gruvbox too, I guess that means we’re kinda basic-but hey 🤷‍♂️ it’s a nice theme

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

    ok zoomer
    just kidding, thats beautiflul :D

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

    Are you using gruvbox for vscode?

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

      Yes, love this theme

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

      @@frozein it is truly beautiful. My entire arch-suckless config is based on it!

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

    I would love to work with Vulkan, but sadly my pc doesnt like it.

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

      same. my gpu has absolutely no clue of what """vulkan""" is

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

      @@eduardoroth8207 mine knows it, but doesnt like it when I want to use it. Idk whats the problem it just doesnt work. It cant compile shaders i think... Cute Cat btw

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

      I read that Vulkan works on graphics cards as old as 2010 (GTX 500 series, "Fermi" architecture).

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

    I basically learned nothing apart from that I don't want to try it out :D

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

      Yes it's quite difficult. This video wasn't meant to be a tutorial as that would take far too long, just an update on what I'm working on.

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

      @@frozein I didn't mean to sound harsh towards you, I basically just brain-farted :D

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

      @@andrewpoison No worries, glad you enjoyed the video!

  • @PK-we6vk
    @PK-we6vk 8 หลายเดือนก่อน

    I thought we'd be learning the language...

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

      Check the description if you want some tutorials, they're quite lengthy unfortunately.

    • @PK-we6vk
      @PK-we6vk 8 หลายเดือนก่อน

      ​@@frozeinI meant the vulkan language from Star Trek lol

    • @frozein
      @frozein  8 หลายเดือนก่อน +1

      @@PK-we6vk Ohhh, makes sense haha

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

      @@PK-we6vk Vulcan and Vulkan are different things.

  • @gustavojoaquin_arch
    @gustavojoaquin_arch 6 วันที่ผ่านมา

    based, btw i use arch

  • @NeroDefogger
    @NeroDefogger 8 หลายเดือนก่อน +1

    I knew before the start that it wouldn't be about the galaxy code and about how to render using vulkan.... yeeet I'm still somehow disappointed, you did in fact not say literally anything about how you are doing that galaxy, it is such a complex topic for physicists right now and you didn't even care to explain how you did your obviously not attempting to be precise version, like you couldn't give me even that, and as I said I knew, but still... I guess I hoped to be wrong...

  • @スペース-o2h
    @スペース-o2h 8 หลายเดือนก่อน

    OpenGL is easier.

    • @frozein
      @frozein  8 หลายเดือนก่อน +3

      Agreed, but Vulkan is much more modern so probably a better choice for the future.

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

      @@frozein and faster too

  • @gloryjaw4327
    @gloryjaw4327 วันที่ผ่านมา

    Now render the observable universe

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

    welcome back, its better to focus on your projects then pumping out content. take your time - we appreciate it

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

    The ellipses are a genius hack! A nice exercise for the future could be to implement an actual gravity simulation in vulkan

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

    now you just need some small creatures and then you have spore

  • @taishi-sama-tfc
    @taishi-sama-tfc 8 หลายเดือนก่อน

    Awesome video! Have you looked on alternative modern graphical APIs such as WGPU(not to be confused with WebGPU)?

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

      No, so far I only know Vulkan and OpenGL, but I'd like to try the others in the future.

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

    can you do a tutorial on the 3d infinite grid? not the vulkan part more the shaders and transforms magic

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

      I likely won't do a tutorial, but the codebase is open source if you want to take a look: github.com/frozein/VkGalaxy

  • @MAKiTHappen
    @MAKiTHappen 8 หลายเดือนก่อน +1

    THIS IS INCREDIBLE
    I have done quite a lot of things in vulkan myself but never even gotten close to this level. You are not only skilled, but also extremely talented, and it's really refreshing to finally hear someone use vulkan and appreciate the fact that it's low-levelness is an upside not a downside
    And so even though I am fully aware that I'll sound completely childish, I have to ask, would you like to work on a project together?

    • @frozein
      @frozein  8 หลายเดือนก่อน +1

      Thank you so much! I've always found it more enjoyable to work at a lower level. And I appreciate the offer, but I already have a few projects I'm working on myself so I don't have time for anything new.

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

      @@frozein Reasonable, thanks for considering and I really would like to reiterate just how talented and skilled you are.
      Keep doing what you're doing because it's outstanding