Unity Shader Graph VFX - Bubble Shield (Tutorial)

preview_player
Показать описание
A shield effect using Unity Shader Graph and a bit of c# code.
Implements the hit effect distortion.

Unity Version: 2020.3.15f

Timestamps:

0:00 Intro
0:12 URP Setup
0:22 Sphere Model Setup
0:46 Full Shader Preview
0:54 Twirl Distortion Shader
3:25 Zoom Shader
5:46 Sphere Mask
7:08 Fresnel and Depth Outline Shader
8:18 Vertex Displacement Shader
9:51 Dissolve Shader
13:39 Final Combined Shader
17:16 Shield Script
18:20 Bonus (Projectile Setup)
19:07 Outro

#unity #shader #gamedevelopment #vfx #shield #sci-fi #fantasy #spell #spellcast #magic #space #effect #particles
Рекомендации по теме
Комментарии
Автор

This is one of the best shader tutorials I've ever seen. Clear and the inclusion of the "mistakes" as an iterative process was very helpful for exploring the problem solving aspect of developing your own shaders.
Bravo

TheVonWeasel
Автор

FOR ANYONE USING HDRP on the TWIRL DISTORTION 1:00 Create a NODE called "Exposure" put it under "Scene Color and "Multiply" "Scene Color" and "Exposure" Then the NODE "Multiply" put it on the "Base Color" as you would normally

explosivo
Автор

The best tutorial of the decade. Not only the final effect but going step by step! Each step can be used as a separate cool shader. And I learned more useful nodes here than ever before.

gregkornev
Автор

I've been using Unity 2021.3.8f1 and I was following this tutorial, for some reason the zoom effect only works when the position that's tied to the sphere mask is set to object space instead of world, but I'm not entirely sure why that is, it didn't seem to affect anything going forward but I thought I would mention it. Great video! This was very helpful in helping me understand how shader effects can be used in tandem with code :)

EDIT: I also had to change the vertex displacement shader so that the sphere mask was tied to the object space position, like the zoom effect, and multiplied that with the world space normal vector. I also also had to do the same thing for the dissolve, and I didn't have to do any funky math with the dissolve start height, which remained at 0, so that part was omitted.

I also very much appreciate how each piece of the shader is made into its own graph with their own materials so that we can see how each piece looks, that is golden

sebastianking
Автор

Thanks for separating the tutorial into independent chapters! Excellent work!

mak_attakks
Автор

Thanks, cool effect and very good tutorial. I like the idea of split every element into separate shader to demonstrate effect.

WhiteWolfIron
Автор

Holy shit shader. Been trying to achieve something like this for some time. I always struggled on the "hit and react" part. You also added distortion and zoom. Just take my like and subscribe and make another video, please hahaha

albertgarcia
Автор

Brilliant stuff, thank you for this. Democratization of information is one of the greatest virtues.

One thing to note here though: line 20 of the projectile script: transform.position += delta; should be after everything else, otherwise the projectile will go blindly forward without checking anything about the collision first! This will lead in the projectile occasionally going through the shield/whatever is being hit.

Cheers and have a good day!

alppih
Автор

2:00 there is a camera direction node in shader graph, few tweaks could be done so that script is not needed

tnti
Автор

so much helpful with the zoom out screen, can see whats going on

VFORVICTORY
Автор

Yesterday I added shields to my top down game, Hah this video would be great if I making 3D space game.

branidev
Автор

what is error "use of potentially uninitialized variable Shadows.hsl:325"? I just created a shader. Added noise and colored it. It seems nothing complicated, but this error appeared.

hagwe
Автор

Are you trying to speedrun it or what?

Awlorein
Автор

Hey, why not using shader to make the effect facing the camera? Shoulmd be more smooth, and efficient.

LollyPoppi
Автор

WOW. Will you make tutorial for those bullets (hit particle effect)

EnchikO
Автор

This was an incredible tutorial, although the video was extremely fast for every step. Of course I could just keep pausing, but damn. I would suggest you slow down a little bit every time you type, create or add some new component. Other than that, thanks a lot for this video.

CloudyNebula
Автор

0:46 is it always this complex? aren't there any easy ways to achieve it?

nexgen.graphics
Автор

I love the tutorial but I have to say the background music is really distracting. Makes it difficult to concentrate. Other than that, really well done!

MarcelRuland
Автор

Hello everyone!
After I set my material to transparent, my sphere does not look transparent in the game, It still looks gray.
I'm using URP by the way.
Any ideas on what could it be?

henriqueam
Автор

If I wanted to make this a trigger when a player walks through something how would I type this line of code in?

So I wanna make it when a player steps on a tile the shield forms around that area they stepped on. Please help

Rzyrito
visit shbcf.ru