How to make a Gradient Skybox with Stars in Unity | Shader Graph Unity

Consider donating to help me keep this channel and website alive using :
paypal.me/supportTheGameGuy 💖
or
Support me on patreon : www.patreon.com/the_game_guy 💖
I have been learning about shader graph and its kind of amazing and we can do whole lot of stuff using shader graph and I started with a simple gradient shader for my skybox with stars in it and it looks amazing. We can also change it to match the look that we want for our game and also suggest some other cool shaders that I should try out.
Note : If you notice some sort of stretched out stars at either sides of your screen, use the tiling values to reduce it to a minimal amount.
DONT FORGET TO HIT THAT SUBSCRIBE BUTTON and Happy New Year to You all!
-------------------- Skip-to-Parts -----------------------
00:00 - Intro
00:50 - Setting up the scene
01:35 - Gradient Shader
07:55 - Adding Stars
12:30 - Testing out
--------------------------------------------------------------------
Also check out these awesome videos :
How to play test your Game by Brackeys :
• HOW TO PLAYTEST!
Adding new weapons to my game by Dani :
• Adding New Weapons to ...
Wierdest Mobile game ads by Dani :
• The WEIRDEST Mobile Ga...
Making a lowpoly 3d car race game in unity by Imphenzia :
• Low Poly Racing - Maki...
Understand your AI Tensorboard :
• Understand your Unity ...
Music: www.bensound.com 🎵

Пікірлер: 55

  • @PetersKotstube
    @PetersKotstube3 жыл бұрын

    If you like sparkling stars just add a simple noise node, make it scroll and multiply it with the power node of the stars.

  • @DavidSusic

    @DavidSusic

    2 жыл бұрын

    How do you make it "scroll"?

  • @PetersKotstube

    @PetersKotstube

    2 жыл бұрын

    @@DavidSusic A Noise node has a UV input. Create a Tiling And Offset node and plug its output into the UV input. Now you can move the noise with the Offset parameter. To make it scroll automatically simply add a Time node and plug its Time output into the Offset input. To control the scrolling direction put a Vector2 node between Time and Tiling And Offset.

  • @moonasha

    @moonasha

    10 ай бұрын

    I made a 32x32 pixel color noise png in photoshop and multiplied that against the result too. Makes for a nice white star field where a few are colored, just like real life

  • @Devsplorer
    @Devsplorer3 жыл бұрын

    That's so practical! Thanks for the tutorial 🙌

  • @welcomelittlefellow
    @welcomelittlefellow3 жыл бұрын

    thanks for the clear explanation. Great work!

  • @menotarobo677
    @menotarobo6772 жыл бұрын

    You helped me sooo much, thank you :)

  • @jaimeandres5000
    @jaimeandres5000 Жыл бұрын

    Just to anyone stumbling onto this - doesn't work on latest version of unity for many reasons

  • @razeenbaig4296
    @razeenbaig42962 жыл бұрын

    Thank You Game Guy Very Cool!

  • @cxv43
    @cxv432 жыл бұрын

    thank you! exaсtly what I need

  • @ButWhyLevin
    @ButWhyLevin3 жыл бұрын

    Really great tutorial!

  • @ButWhyLevin

    @ButWhyLevin

    3 жыл бұрын

    @Kendrick Spencer pro tip, shut up

  • @vindajojo
    @vindajojo3 жыл бұрын

    nice idea! thx

  • @Yusuf-rh6sj
    @Yusuf-rh6sj2 жыл бұрын

    you are amazing bro

  • @eddie.z
    @eddie.z3 жыл бұрын

    Great Shader Graph Tutorial!

  • @tabooization123
    @tabooization123 Жыл бұрын

    This is what I need

  • @recriandogames
    @recriandogames2 жыл бұрын

    How would you make a day and night cycle using this method?

  • @denn501
    @denn501 Жыл бұрын

    Neat!!

  • @yahugartsandmedia
    @yahugartsandmedia2 жыл бұрын

    How would you make a day and night cycle using this method?\

  • @turingcode
    @turingcode Жыл бұрын

    If someone still has that unwrapping artifact, do this: First route the G channel of the normalized UV into a Arcsine node. Take the output of this Arcsine into the 'A' of a Divide node, the 'B' of this Divide node will be a PI constant driven into another Divide node. Now for the R & B values of our normalized UV: Drive R into the 'A' of an Arctangent2 node and B into the 'B'. Take the output of this Arctangent2 and Divide by TAU constant. Lastly combine the outputs of the two remaining nodes. That is the proper UV. For the gradient split the RG(2) component and use the G channel. For Voronoi, use the RG(2) out. Hope this helps.

  • @quoctuanlee3544

    @quoctuanlee3544

    Жыл бұрын

    This is hard to follow along

  • @blahchop

    @blahchop

    9 ай бұрын

    lol @@quoctuanlee3544

  • @Deadlyojik

    @Deadlyojik

    7 ай бұрын

    you.. are.. a magician, thank you

  • @xXKimmommiKXx

    @xXKimmommiKXx

    25 күн бұрын

    This is the solution i was looking for. THANKS. You truly are the King of Kings

  • @SanLiuk
    @SanLiuk5 ай бұрын

    what's the solution for hdrp? Ther's no matererial sky box option for it

  • @sheerazali5178
    @sheerazali51783 жыл бұрын

    Very informative !

  • @mrfishgames2715
    @mrfishgames2715 Жыл бұрын

    Hello, I have a problem. I'm trying to put the skybox in unity 2d, but when doing, so it turns black, I have the camera set to skybox and I put the material in lighting, environment.

  • @moisesg9472

    @moisesg9472

    Жыл бұрын

    If you are using a slightly more advanced version of URP, the material created from the shader should be *Unlit* and not *Lit*, as we don't want the material to be affected by any type of light, this can be changed inside the shader in shader configuration or before creating the shader, selecting what type of shader it will be, in this case it is *Unlit*, this worked for me, I hope I have helped you even if it is late :)

  • @mamiechoucroute6345
    @mamiechoucroute63453 жыл бұрын

    Hi The Game Guy, the result is awesome and thanks for the tutorial ! I got some troubles in my project, when i move my TPS camera, the stars on the skybox just shaking around until i stop moving. Did you encounter this issue before ? If someone got an idea, that could be helpful !

  • @robbertdpackerman5652

    @robbertdpackerman5652

    3 жыл бұрын

    Did you find a fix for this?

  • @mikeyoung3519

    @mikeyoung3519

    2 жыл бұрын

    @@robbertdpackerman5652 I had this issue too - no fix yet.

  • @bradley1048

    @bradley1048

    2 жыл бұрын

    Anyone manage to fix this?

  • @alexiserussard2956

    @alexiserussard2956

    2 жыл бұрын

    Same hahaha

  • @jandepaepe4262
    @jandepaepe42623 жыл бұрын

    I like the way you are solving the star texture issue with the voronoi node, but I have stumbled upon an issue. it seams in unity 2020.2.7f1 (idk about other versions), the skydome is unwrapped in a way that creates a nasty aberration in the form of a stretched-out line rotating around the z-axis. Does anybody have a fix for this, or am I just going to have to make my own custom unwrapped skydome?

  • @rockateer2162

    @rockateer2162

    3 жыл бұрын

    I never found a proper fix for it but increasing the tiling makes it barely noticeable, especially if your stars have quite a low alpha.

  • @lost.250

    @lost.250

    2 жыл бұрын

    Remove normalize node

  • @DavidSusic

    @DavidSusic

    2 жыл бұрын

    @@lost.250 Doing this completely ruins the shader. Everything turns black/white, as if the exposure got set extremely high.

  • @lost.250

    @lost.250

    2 жыл бұрын

    @@DavidSusic I think this metod is wrong overall, I modified shader myself and got i hald working

  • @MarcoCaruso

    @MarcoCaruso

    2 жыл бұрын

    @@lost.250 How did you got it working?

  • @FEG_Studio
    @FEG_Studio3 жыл бұрын

    Thank you

  • @paulbunyangonewild7596
    @paulbunyangonewild75962 жыл бұрын

    YOU CAN MAKE A SKYBOX WITH SHADERGRAPH!!!! IM COMING RIGHT OVER

  • @paulmiddleton705
    @paulmiddleton7052 жыл бұрын

    I had an issue with an error "The Current render Pipeline is not compatible with this master node". Which made the preview bright pink. The following resolved it for me. Hope it helps - Right Click in the asset folder and Create -> Rendering -> Universal Render Pipeline -> pipeline asset (forward asset) -> name it anything. Goto Edit -> Project Settings -> Graphics then Drag and drop the Pipeline asset you created onto the Scriptable Render Pipeline Settings (1st item). Worked for me, hope it helps another.

  • @therealrealburger

    @therealrealburger

    6 ай бұрын

    You legend, it helped me a whole year later. Thank you!

  • @EthanWilson473

    @EthanWilson473

    4 ай бұрын

    I have a problem with this, it worked but it has stretching at the top and bottom

  • @navidnavid5826
    @navidnavid58262 жыл бұрын

    I have issues with this in unity 2021 and this shader is not work😶

  • @WasabiJar

    @WasabiJar

    2 жыл бұрын

    Me too, 2022 is the same, idk how to fix :(

  • @F0r3v3rT0m0rr0w
    @F0r3v3rT0m0rr0w Жыл бұрын

    "see this warning, dont worry about it" but i do sir ... i do ...

  • @mnnm1989

    @mnnm1989

    Жыл бұрын

    Set the RenderType to Background to make this warning go away.

  • @elmacanonmoreno6084
    @elmacanonmoreno60848 ай бұрын

    bro please made a 2023 version

  • @hunter7777
    @hunter7777 Жыл бұрын

    In Unity version 2021 it does not have Vector 1.

  • @F0r3v3rT0m0rr0w

    @F0r3v3rT0m0rr0w

    Жыл бұрын

    a Vector 1 is a float.