Learning VULKAN by Rendering a GALAXY

  Рет қаралды 25,555

frozein

frozein

4 ай бұрын

In this video, I showcase my process learning Vulkan by walking through an implementation to render a galaxy.
Codebase:
github.com/frozein/VkGalaxy
Resources:
vulkan-tutorial.com/
vkguide.dev/
beltoforion.de/en/spiral_gala...
Check out my Game:
store.steampowered.com/app/24...
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

Пікірлер: 103
@TheScreamingFedora
@TheScreamingFedora 4 ай бұрын
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 4 ай бұрын
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 4 ай бұрын
Thanks for the advice! Though I plan to do most of my work in C so I wont use vulkan.hpp
@ShocooYT
@ShocooYT 4 ай бұрын
Hello master Balint !
@MrEnsiferum77
@MrEnsiferum77 3 ай бұрын
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 3 ай бұрын
@@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 3 ай бұрын
@@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...
@fanzaii
@fanzaii 4 ай бұрын
That's really neat! I really like how refined everything looks.
@Finding_Fortune
@Finding_Fortune 4 ай бұрын
Loved it, what a way to start learning Vulkan!
@fah1007
@fah1007 4 ай бұрын
This is amazing bro . Good job . I wish u a amazing journey this year (:
@ChipboardDev
@ChipboardDev 4 ай бұрын
This is really cool! The info on the ellipse will help me in my own project!!
@rmt3589
@rmt3589 4 ай бұрын
This is amazing! I needed a tutorial like this so bad. Thank you! Now to implement it in OpenGL! Eventually...
@jacksaenz2591
@jacksaenz2591 3 ай бұрын
Super cool video! I love the style you've got going on!
@trashman7072
@trashman7072 4 ай бұрын
welcome back, its better to focus on your projects then pumping out content. take your time - we appreciate it
@sehzadeselim863
@sehzadeselim863 3 ай бұрын
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)
@nite_owl_was_here
@nite_owl_was_here 2 ай бұрын
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.
@dottormaelstrom
@dottormaelstrom 4 ай бұрын
The ellipses are a genius hack! A nice exercise for the future could be to implement an actual gravity simulation in vulkan
@JoeTheis
@JoeTheis Ай бұрын
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 Ай бұрын
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.
@minetomek
@minetomek 4 ай бұрын
"With just some magic we have some particles. Now some movement, bigger particles aaannd... we have a galaxy!"
@frozein
@frozein 4 ай бұрын
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
@publicalias8172
@publicalias8172 4 ай бұрын
So.. I see you've decided to become a legend.
@slava_in3757
@slava_in3757 4 ай бұрын
Beautiful
@PatrickFrom
@PatrickFrom 4 ай бұрын
The new spore lookin' fresh.
@kr1sso
@kr1sso 3 ай бұрын
Best thing about this is reading the comments while your eyes adjust and everything is rotating like those galaxies :D
@vilian9185
@vilian9185 4 ай бұрын
god tutorial in creating the universe
@streetware-games
@streetware-games 4 ай бұрын
Very nice. Will steal this technique
@frozein
@frozein 4 ай бұрын
Check the article in the description, it goes a little more into the details!
@dottedboxguy
@dottedboxguy 4 ай бұрын
new vid, pog
@LineOfThy
@LineOfThy 4 ай бұрын
Very cool :D
@kerch00
@kerch00 4 ай бұрын
Didn’t think I’d hear this c418 song here
@George-bc7ej
@George-bc7ej 4 ай бұрын
Coool!
@bug7593
@bug7593 4 ай бұрын
live long and prosper 🖖
@diamondore9643
@diamondore9643 3 ай бұрын
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
@lelordiii8702
@lelordiii8702 4 ай бұрын
Nice
@art_cg
@art_cg 4 ай бұрын
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 4 ай бұрын
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 4 ай бұрын
@@frozein nice, thanks man!
@MisterCallox
@MisterCallox 3 күн бұрын
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 Күн бұрын
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.
@taishi-sama-tfc
@taishi-sama-tfc 4 ай бұрын
Awesome video! Have you looked on alternative modern graphical APIs such as WGPU(not to be confused with WebGPU)?
@frozein
@frozein 4 ай бұрын
No, so far I only know Vulkan and OpenGL, but I'd like to try the others in the future.
@vilian9185
@vilian9185 4 ай бұрын
1:55 the operational system don't have any APi to tell you what graphic card to use?
@frozein
@frozein 4 ай бұрын
No, you have to pick it yourself in Vulkan!
@cxx.enjoyer
@cxx.enjoyer 4 ай бұрын
No way 😲
@carlosmanuel7160
@carlosmanuel7160 4 ай бұрын
Almost as much code as a Java "Hello world!"
@frozein
@frozein 4 ай бұрын
Haha
@blacklistnr1
@blacklistnr1 4 ай бұрын
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 3 ай бұрын
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.
@cyanuranus6456
@cyanuranus6456 4 ай бұрын
I Wonder What Game Engine is "Space Engine" Game is Created in
@DaminGamerMC
@DaminGamerMC 4 ай бұрын
can you do a tutorial on the 3d infinite grid? not the vulkan part more the shaders and transforms magic
@frozein
@frozein 4 ай бұрын
I likely won't do a tutorial, but the codebase is open source if you want to take a look: github.com/frozein/VkGalaxy
@sjoerdev
@sjoerdev Ай бұрын
which linux distro are you using and how do you make sure it runs on windows too?
@frozein
@frozein Ай бұрын
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 Ай бұрын
@@frozein is there a reason you choose ubuntu over debian?
@frozein
@frozein Ай бұрын
@@sjoerdev Not particularly, I used ubuntu a bit before so there was some familiarity I guess.
@MAKiTHappen
@MAKiTHappen 4 ай бұрын
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 4 ай бұрын
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 4 ай бұрын
@@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
@mldy1
@mldy1 4 ай бұрын
good video, next time maybe 1440p or 4K for higher bitrate
@frozein
@frozein 4 ай бұрын
Yeah KZbin compression didn't play well with this video haha
@myrmatta1
@myrmatta1 4 ай бұрын
Great video! (what is happening)
@karanahlawat9106
@karanahlawat9106 4 ай бұрын
Hoooooly shit my guy.
@TheMiniatureRobot
@TheMiniatureRobot 3 ай бұрын
yo, what vs code theme are u using? It looks sick
@frozein
@frozein 3 ай бұрын
It's called gruvbox
@Fuscao_Preto
@Fuscao_Preto 4 ай бұрын
I've been trying to learn vulkan for a while, but man does it miss tutorials.
@frozein
@frozein 4 ай бұрын
Yeah, there really aren't any tutorials that go beyond just a triangle.
@Biggest-Ounce
@Biggest-Ounce 4 ай бұрын
Care to share your editor, and configurations? 😮😅
@frozein
@frozein 4 ай бұрын
I'm using vscode with the "gruvbox" theme.
@Biggest-Ounce
@Biggest-Ounce 4 ай бұрын
@@frozein I love Gruvbox too, I guess that means we’re kinda basic-but hey 🤷‍♂️ it’s a nice theme
@wlockuz4467
@wlockuz4467 4 ай бұрын
Bro did some building off camera 💀
@10bokaj
@10bokaj 3 ай бұрын
now you just need some small creatures and then you have spore
@luigidabro
@luigidabro 4 ай бұрын
Are you using gruvbox for vscode?
@frozein
@frozein 4 ай бұрын
Yes, love this theme
@luigidabro
@luigidabro 4 ай бұрын
@@frozein it is truly beautiful. My entire arch-suckless config is based on it!
@first9279
@first9279 4 ай бұрын
I would love to work with Vulkan, but sadly my pc doesnt like it.
@eduardoroth8207
@eduardoroth8207 4 ай бұрын
same. my gpu has absolutely no clue of what """vulkan""" is
@first9279
@first9279 4 ай бұрын
@@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 4 ай бұрын
I read that Vulkan works on graphics cards as old as 2010 (GTX 500 series, "Fermi" architecture).
@Voidptr0403
@Voidptr0403 4 ай бұрын
are you the gigachad?
@FUTURE_XD
@FUTURE_XD 4 ай бұрын
he is
@andrewpoison
@andrewpoison 4 ай бұрын
I basically learned nothing apart from that I don't want to try it out :D
@frozein
@frozein 4 ай бұрын
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 4 ай бұрын
@@frozein I didn't mean to sound harsh towards you, I basically just brain-farted :D
@frozein
@frozein 4 ай бұрын
@@andrewpoison No worries, glad you enjoyed the video!
@PK-we6vk
@PK-we6vk 4 ай бұрын
I thought we'd be learning the language...
@frozein
@frozein 4 ай бұрын
Check the description if you want some tutorials, they're quite lengthy unfortunately.
@PK-we6vk
@PK-we6vk 4 ай бұрын
​@@frozeinI meant the vulkan language from Star Trek lol
@frozein
@frozein 4 ай бұрын
@@PK-we6vk Ohhh, makes sense haha
@zdspider6778
@zdspider6778 4 ай бұрын
@@PK-we6vk Vulcan and Vulkan are different things.
@user-hd8tg4em2n
@user-hd8tg4em2n 4 ай бұрын
OpenGL is easier.
@frozein
@frozein 4 ай бұрын
Agreed, but Vulkan is much more modern so probably a better choice for the future.
@vilian9185
@vilian9185 4 ай бұрын
@@frozein and faster too
@NeroDefogger
@NeroDefogger 3 ай бұрын
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...
Coding Adventure: Simulating Fluids
47:52
Sebastian Lague
Рет қаралды 1,6 МЛН
An introduction to Raymarching
34:03
kishimisu
Рет қаралды 107 М.
Who enjoyed seeing the solar eclipse
00:13
Zach King
Рет қаралды 136 МЛН
How to train simple AIs
12:59
Pezzza's Work
Рет қаралды 39 М.
Vulkan is HARD
8:26
lolzdev
Рет қаралды 57 М.
Vulkan vs. OpenGL
1:33
ForceofPhoenix
Рет қаралды 15 М.
Teaching myself C so I can build a particle simulation
11:52
Gradience
Рет қаралды 98 М.
I Optimised My Game Engine Up To 12000 FPS
11:58
Vercidium
Рет қаралды 444 М.
How long does it take to learn Vulkan?
6:16
GetIntoGameDev
Рет қаралды 9 М.
GPT-4o Deep Dive: the AI that CRUSHES everything
28:11
AI Search
Рет қаралды 37 М.
Blazingly Fast Greedy Mesher - Voxel Engine Optimizations
23:35
Real-time 2D shadows | HUGE improvements!
9:32
Barney Codes
Рет қаралды 32 М.
Better Mountain Generators That Aren't Perlin Noise or Erosion
18:09
Josh's Channel
Рет қаралды 238 М.
🤯Самая КРУТАЯ Функция #shorts
0:58
YOLODROID
Рет қаралды 3,4 МЛН
Я Создал Новый Айфон!
0:59
FLV
Рет қаралды 3 МЛН
phone charge game #viral #tranding #new #reels
0:18
YODHA GAMING RAAS
Рет қаралды 12 МЛН
How Neuralink Works 🧠
0:28
Zack D. Films
Рет қаралды 27 МЛН
Дени против умной колонки😁
0:40
Deni & Mani
Рет қаралды 314 М.