Тёмный

GODOT TUTORIAL: Shockwave shader for noobs 

Nolkaloid
Подписаться 2,6 тыс.
Просмотров 50 тыс.
50% 1

Hey, here is a new in depth tutorial on how to make a shockwave shader in the Godot engine. Don't be scared, shaders aren't black magic :).
Sorry for the inconsistent audio, I recorded the audio on my phone and rearranged it in post.
Music: www.audiotool.com/user/tocka/
Godot Emote: / mauriciogamedev
Twitter: / noegamedev
00:00 Intro
00:37 Animation
02:04 Creating the Shader
02:46 UV - The Basics
04:23 Distortion
06:41 Screen Shader
09:57 Donut Shape

Наука

Опубликовано:

 

15 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 187   
@uheartbeast
@uheartbeast 4 года назад
Great tutorial! Subbed.
@Nolkaloid
@Nolkaloid 4 года назад
Thanks! I got into Godot thanks to Happie Cat's video, and the first tutorials I watched were yours, about 4 years ago^^
@daniridao
@daniridao Год назад
HeartBeast subbing means I sub as well. Everything Benjamin touches with his eyes is GOLD!!
@getaproductions1415
@getaproductions1415 2 года назад
For anyone wondering how to set the chromatic effect you can do that by: first making a uniform called offset and offseting the r and b value by that offset: heres the code for that uniform float offset; void fragment(){ # paste this after you define your color COLOR.r = texture(SCREEN_TEXTURE,vec2(SCREEN_UV.x + offset, SCREEN_UV.y) - display).r; COLOR.g = texture(SCREEN_TEXTURE,SCREEN_UV - display).g; COLOR.b = texture(SCREEN_TEXTURE,vec2(SCREEN_UV.x - offset, SCREEN_UV.y) - display).b; } then you can animate it by animating the offset value using a animationplayer node... note: if your having problemes with the effect not showing up try using a low offset value like 0.002
@me551
@me551 10 месяцев назад
how do i define the color?
@herrlehrer1479
@herrlehrer1479 2 месяца назад
@@me551did you even watch. The video?
@me551
@me551 2 месяца назад
@@herrlehrer1479 ya. I am just a noob at coding especially shaders so it will make sense if I would understand
@averagemilffan
@averagemilffan 25 дней назад
@@herrlehrer1479 how would one go about disabling the offset everywhere except the shockwave? I followed the code and it works just the chromatic abberation applies to the whole screen
@Sk4lli
@Sk4lli 3 года назад
Well done! You don't just explain what you do, as many other there, but WHY. That's much more important in my opinion. And then you explain how you reach that goal. Nicely broken down in easy to understand steps. A really great tutorial.
@Pengoony
@Pengoony 4 года назад
Man, shaders are crazy. I understand all the little individual bits, but I never have any clue how to begin making my own original shader. Like, if I wanted to make a shockwave on my own, I would be stuck figuring out how to get the distortion a donut shape.
@volatus2354
@volatus2354 2 года назад
It's been a year, but keep in mind shaders are basically maths applied to visuals, and although many people have lost this view because of bad teachers and the failure of schools, mathematics is just as artistic as drawing is. It has to do with understanding numerical relationships in the same way one needs to understand the interaction between colours, and has to do with creativity in the same way. But what I want you to get from this is that no drawing artist ever begun their career knowing how to draw. They tried, and failed, and learned, and repeated this process in an infinite effort to achieve perfection. You'll get there, as long as you try enough and hard enough. And if anything, failure is an opportunity to become capable of not failing anymore.
@tschichpich
@tschichpich Год назад
@@volatus2354 I have to disagree Math is not artistic in it self. It's a language for science. But I agree that school often fails to show how math is used in the real word and how to express with it. I had a good education with math in school but when it came to vectors/matrixes I feel like my teacher really lost the connection and we only learned a bit about the operations and no usecases. To this day I calculating with vectors and matrixes is very magical to me. And I hope I will get a better feeling for them. (I mean vectors alone are not the big problem but yeah). Similar but still different is CSS. When I learned I loved css sucks. And css was just this strange thing that doesn't make sense. But after more intense working with it for month and having to press the html to look like the image I got, I learned more than just how to write css but also to understand it and have a feeling for it that's not explainable.
@volatus2354
@volatus2354 Год назад
​@@tschichpich I'll make a correction. Mathematics is much more than a language. Part of mathematics is mathematical language. But mathematics is also concepts and the human efforts to reach and expand the boundaries of our understanding. The concept of permutations or the concept of higher-than-three dimensions are not linguistic, but the attempt to confine these into symbols is, and mathematics is the two, not just the second, of these. Is mathematics not artistic? You can observe patterns to find solutions, there are hundreds of ways of reaching the same goal and each person finds their own, creativity is an important aspect of being a good mathematician, someone's ability to visualize in a simpler manner that which they read or think about is another. Different people find out different things and then find out different ways to share that with other people. Things which were seemingly invisible are suddenly visible and you figure out they were never hidden, you now see them because you changed the way you see things, therefore perspective is fundamental. You can tell me, as others have, that mathematics is too objective to be artistic, but I argue that drawing is also objective. I can look at a drawing and tell whether or not it looks like a door. The artist can succeed or fail at expressing it is a door. And although there are many ways to express "a door", some of these do so to a very little degree of success, consequently making me not see it as a door. From what I see drawing is about representing things and ideas and finding ways for others to see it as well as you do. So, I keep my statement. Mathematics, for me, is as artistic as drawing is.
@yacoobsc.m3269
@yacoobsc.m3269 2 месяца назад
Sabes es de los pocos tutoriales, que sin escuchar tu voz, entiendo perfectamente lo que estas haciendo en todo momento. Es una perfecta forma de explicar, hasta para una persona sorda. Felicidades gran tutorial 😅 saludos
@MrNybbles
@MrNybbles 4 года назад
This is a very nice tutorial. Because we can skip the inner circle part this actually gives us two useful effects.
@beebster7
@beebster7 3 года назад
Great stuff, thanks for sharing and the level of detail. One of the few examples on this subject that make sense to me :)
@gauravdubey2765
@gauravdubey2765 3 года назад
Best shader tutorial I have looked till now. You explain well
@jena_thornwyrd
@jena_thornwyrd 3 года назад
First time I feel like I grasped how shaders work ! Subbed !
@BramwellWilliams
@BramwellWilliams 4 года назад
Really great stuff! Very diligent explanations c:
@robertmeyer5985
@robertmeyer5985 2 месяца назад
Absolutely phenomenal, thank you.
@FencerDevLog
@FencerDevLog 9 месяцев назад
Very nice video. I especially like the way you explain everything from the basics. I'm looking forward to more tutorials. 😎
@NeZversSounds
@NeZversSounds 4 года назад
The thing I've been waiting for.
@delqyrus2619
@delqyrus2619 3 года назад
Rarely seen a tutorial of that quality. Great work!
@pinggouproductions
@pinggouproductions 3 года назад
You explain nicely what we do need to do and how everything works, really nice, please continue makeing tutorials👍👍👍👍😘
@naruto3zo
@naruto3zo Год назад
This tutorial is just great! I'm trying to replicate everything with visual shaders and it's working
@jessejburton
@jessejburton 2 года назад
Super great tutorial! Thanks, excited to try it out and do my homework haha :)
@srijanpaul
@srijanpaul 4 года назад
Amazing video ! Just what I needed.
@CarbsCode
@CarbsCode 4 года назад
Lot's of great info! Awesome video :)
@Nolkaloid
@Nolkaloid 4 года назад
Thanks!
@nsrosenqvist
@nsrosenqvist 3 года назад
Thanks for putting this up, it helped a lot!
@RyanScottForReal
@RyanScottForReal 4 года назад
One of best tutorials yet
@FelipeOliveira-ph2uq
@FelipeOliveira-ph2uq 4 года назад
What a nice video! Watched the whole thing! You just got a sub!!
@luketyler5728
@luketyler5728 4 года назад
Great tutorial! Also I loved your game for GWJ 21!
@Nolkaloid
@Nolkaloid 4 года назад
Thanks ! I really appreciate it.
@jackmakmorn
@jackmakmorn 3 года назад
Cool stuff, funny that I found it now, cause I thought I need somewhen later and had no idea how to do this; after watching your tutorial I think I have to do it tomorrow - subscribed today 😁
@tschichpich
@tschichpich Год назад
I like that you don't just made the tutorial, but also gave some homework for us :)
@IngresaElNombreDelCanal
@IngresaElNombreDelCanal 2 года назад
Extraño tus videos, me siguen ayudando...
@kagof2354
@kagof2354 2 года назад
Fantastic tutorial!
@ViniCavin
@ViniCavin 4 года назад
This is awesome! Thank you!
@musiquemaker1207
@musiquemaker1207 3 года назад
wow this is super cool !!!! Really cool video :)
@richardlongshaw8079
@richardlongshaw8079 3 года назад
Great Tutorial. Any more Shader tutorials would be appreciated. Subscribed too!
@fatihs.solmaz5645
@fatihs.solmaz5645 4 года назад
Thank you, this is a awsome tutorial. I like to see more shader tutorial for godot, it helps a lot. I am looking for fisheye shader tutorial...
@michaelneumair
@michaelneumair 3 года назад
Super well explained!!!
@neilwalker4277
@neilwalker4277 3 года назад
thanks, it's in the game :) there a lot of fine tuning required for those parameters. A hundredth out seems to drastically change it from a doughnut to a solid to nothing.
@bitbraindev
@bitbraindev 3 года назад
This is so cool! Could you maybe do a similar one but for fire/heat distortion?
@SaiponathGames
@SaiponathGames 3 года назад
Subscribed! Cool tutorial!
@lemonine907
@lemonine907 3 года назад
3rd day of learning shaders and I translated it to HLSL and it works!
@cmds.learning7426
@cmds.learning7426 4 года назад
really cool! easy to understand for tecah art . can use it for any engine
@Dark_Peace
@Dark_Peace 4 года назад
Thanks for the tutorial ! It's gonna be useful for the GMTK jam !
@ron0studios
@ron0studios 3 года назад
what game did you make?
@Dark_Peace
@Dark_Peace 3 года назад
@@ron0studios Spleen. A game about a héro who gas panic attacks It's still on Itch.io ;)
@ron0studios
@ron0studios 3 года назад
Oh wait, I remember that game XD! You can find my comment on the second page of the comment section lol. 76 ratings is awesome, congrats!
@Dark_Peace
@Dark_Peace 3 года назад
@@ron0studios thx ! I probably played your game too then 😁
@Rai2M
@Rai2M 9 месяцев назад
Very well explained.
@snarkbucham4077
@snarkbucham4077 3 года назад
Very good, thanks.
@Playburger1337
@Playburger1337 10 месяцев назад
Cool that u coded this shader effect by urself :)!
@rafaelgpontes
@rafaelgpontes 4 года назад
Superb!!!!
@drac8854
@drac8854 3 года назад
Thanks for making this
@taoliu7312
@taoliu7312 3 года назад
Awesome! ! !
@danielhaup599
@danielhaup599 2 года назад
this is epic
@vohoff
@vohoff 28 дней назад
VERY good video !
@VolpeJosesk
@VolpeJosesk 3 года назад
Managed to make my own wich will increase a pixelated circle mask (circle transition that will increase to show a Sprite while it grows), with a little distortion, from this. Thanks ❤❤❤
@PattleBass
@PattleBass 3 года назад
Thank you!
@june_rain_video_game_company
@june_rain_video_game_company 4 года назад
Dude. This is very good video. Dont Stop making Godot videos. The godot community needs people like you.
@sigitsatriap6505
@sigitsatriap6505 4 года назад
Subscribed !! your tutorial is easy to understand for beginner like me please do more shader tutorial for Godot ! like water , fog or other would like to see that
@Nolkaloid
@Nolkaloid 4 года назад
Thanks! Reflective 2D water comes next!
@davidosaro6818
@davidosaro6818 3 года назад
Just what i needed thanks
@davidosaro6818
@davidosaro6818 3 года назад
@Nolkaloid how do you make it respond to mouse position
@Nolkaloid
@Nolkaloid 3 года назад
gist.github.com/Nolkaloid/62d6960279ce9c8fda555bca9603751b
@davidosaro6818
@davidosaro6818 3 года назад
Thanks 😊
@Gabondalf
@Gabondalf 2 года назад
really cool
@OLIV3R_YT
@OLIV3R_YT Год назад
Thanks!
@bigboss7292
@bigboss7292 3 года назад
Sir, may I ask what skills you have acquired to be able to program shaders so masterfully?
@user-og6hl6lv7p
@user-og6hl6lv7p 3 года назад
When you are drawing the circle using length(scaledUV-center), it's using a square root calculation. In this one instance it's fine however if you start adding more and more circles it can become quite expensive. You can use "dot(scaledUV - centre, scaledUV - centre) * 4.0" for better performance.
@Nolkaloid
@Nolkaloid 3 года назад
Hey! Of course we can use the dot product, but you see, it's a beginner tutorial and using length is much more intuitive. Furthermore modern GPUs are optimized for such operations, so I wouldn't worry about it so much :)
@Nolkaloid
@Nolkaloid 3 года назад
In the end it really depends on what you want to achieve, using the dot product is much faster because it involves only multiplications, but it's not precise as we end up with the squared length that you multiply by 4 for an approximation.
@piratesephiroth
@piratesephiroth Год назад
That doesn't look right though. If you don't want square root and divisions then maybe you could use this to normalize instead: vec2 normalize_alt(vec2 vec) { return vec * inversesqrt(vec.x * vec.x + vec.y * vec.y); }
@quinndepatten4442
@quinndepatten4442 Год назад
lowkey a cracked tutorial.
@Nolkaloid
@Nolkaloid Год назад
downloading tutorials from piratebay
@chocolatecoveredgummybears
@chocolatecoveredgummybears Год назад
great tutorial. would love more skill based shaders, think of diablo and poe! i have created some skills like frozen orb and whatnot, but warcry is pretty hard. not just in shaders, but for the effect. i use other nodes as well
@us3s
@us3s Год назад
Hi i'm super new to shaders. Is there a way to make this spawn on specific objects and have it be relative to that object instead of the screen? Or how woul dI have the shader follow an object?
@cenullum
@cenullum 4 года назад
I used backbuffer node for making multiple explosion effect
@Nolkaloid
@Nolkaloid 4 года назад
Nice!
@bonbonpony
@bonbonpony 2 года назад
My guess is that for the chromatic aberration, one just needs to use different scales for the offsets of each R,G,B channel? But this way of doing it doesn't produce the full rainbow, just the three components, as if we looked at a picture on a TV screen which uses only red, green and blue light for pixels, not a real-life image in sunlight. Is there any way to produce something more sunlight-like?
@DaveAlexKD
@DaveAlexKD 4 года назад
More shaders tutorials please!
@budihartanto4222
@budihartanto4222 3 года назад
terima kasih
@FromNewRadius
@FromNewRadius 3 года назад
Is there any way to make it transparent white-transparent so it can be seen in backgrounds without details?
@websterferro4025
@websterferro4025 3 года назад
How do you do the chromatic aberration
@RivenbladeS
@RivenbladeS 2 месяца назад
Can you do a tutorial on space distortion with physics maybe just like in geometry wars game where you throw a projectile and the lines behind warps?
@WhalesState
@WhalesState 3 года назад
it's been a long time since your last video , missing the great content you make :) hope you are fine
@Nolkaloid
@Nolkaloid 3 года назад
Hey! That's very kind of you. I have a lot of work to do at university and to be honest I struggle with motivation.
@monaime
@monaime 4 года назад
Thanks for the excellent tutorial, i'm really interested in how you approached the chromatic aberration, a tutorial would be greatly appreciated.
@Nolkaloid
@Nolkaloid 4 года назад
It's pretty simple, you see when you sample the texture it returns the RGBA channels as a vec4. But you can easily isolate each channel and thus offset each channel. COLOR = vec4( texture(SCREEN_TEXTURE, SCREEN_UV + offset).r, texture(SCREEN_TEXTURE, SCREEN_UV).g, texture(SCREEN_TEXTURE, SCREEN_UV - offset).b, 1.0);
@monaime
@monaime 4 года назад
@@Nolkaloid Thanks!
@chris_gamedev
@chris_gamedev 4 года назад
@@Nolkaloid thank you for your tutorials :) I have a question, how do we get the chromatic aberration to only show where the effect / mask are? right now my whole screen is affected from the chromatic aberration :P
@Nolkaloid
@Nolkaloid 4 года назад
@@chris_gamedev Use the mask to multiply the offset : offset * 0.0 (black) will not offset the channel. Buth when it will be on white : offset * 1.0 (white)
@chris_gamedev
@chris_gamedev 4 года назад
@@Nolkaloid thanks ! Very nice 😁
@gronko_chug_butter
@gronko_chug_butter 2 года назад
How did you make it so you can view both the shader code and the inspector for the texturw? Whenever I have shader code open the inspector will only show me the shader itself so i cant edit any of the uniforms from the inspector without closing the shader code.
@Chevifier
@Chevifier 2 года назад
Shaders are so freaking cool and scary at the same time😭😭
@loot6
@loot6 Год назад
One of very few videos I really wish I could give more than one upvote, like add on a few hundred or something.
@totalcasino3597
@totalcasino3597 4 года назад
Your tutorials about shaders are glourios, where did you learn it? can you recommend some resources about shaders 2d?
@Nolkaloid
@Nolkaloid 4 года назад
I recommend the book of shaders. Otherwise once you get a basic understanding of how shaders work, it's pretty straight forward to create your own shaders while still learning techniques to add to your skill set. And that's what I'm trying to do with my tutorials. Of course I could just give the shader code or project file and leave. But that's not my goal. I want more people to actually know what's happening and thus gain in creativity.
@renji-hjk
@renji-hjk Год назад
yes yes yes yes the perfect shader to make dios the world just need a simple one to make black and white after the efect and perfect
@IustinNitza
@IustinNitza 3 года назад
I've just added this to my game. Thanks a lot !
@JuanUys
@JuanUys Год назад
Not sure if this is only me, but if I set center's x component to 0 or 1, then the shockwave doesn't originate on the edge of the screen. Has this something to do with the ratio calculation?
@JuanUys
@JuanUys Год назад
workaround: vec2 center2 = center; center2.x = (center2.x - 0.5) / ratio + 0.5; // and use center2 throughout... (I can't modify center directly, as it's a uniform)
@that_guyu_know6019
@that_guyu_know6019 3 года назад
Is there anyway I could anchor the center of the shockwave to a specific node? instead of it being anchored the the screen's UV?
@Nolkaloid
@Nolkaloid 3 года назад
Yup: I have made a guide for this gist.github.com/Nolkaloid/62d6960279ce9c8fda555bca9603751b
@that_guyu_know6019
@that_guyu_know6019 3 года назад
@@Nolkaloid I got it working! >:0 Thank you, I've been reading the Godot docs all night last night and couldn't find anything helpful! Your a genius
@timandersen8030
@timandersen8030 2 года назад
Why does UV - vec2(0.5, 1.0) shift the texture to the right? Shouldn't it shift it to the left because the farthest x is 1 and 1 - 0.5 = 0.5 and the smallest x is 0 and 0 - 0.5 = -0.5. So shouldn't the new texture be placed from x=-0.5 to x=0.5 ? Instead it seemed to have shifted to the right between x=0.5 and x=1.5.
@longuemire748
@longuemire748 2 года назад
How can we manage the pixels per line? In all the examples I've seen, I don't see a way to split a (line, cube, etc) and then manage them independently. It's very confusing I think.
@rix0r222
@rix0r222 Год назад
I watched the whole thing to see how you did the chromatic aberration. Tease!
@Nolkaloid
@Nolkaloid Год назад
To do the chromatic aberration you have to read the r g b channels separately with a slight UV offset (different for each) and then recombine them.
@WoYoSenseiPL
@WoYoSenseiPL 4 года назад
Great tutorial, really! I just have one question. Currently the shockwave appears at the middle of the screen, no matter what. What if I want it to appear as node (i.e. add_child(shockwave)) at some specific position, like, lets say, end of a barrel of a gun of my 2D character (using position2D). How can I achive that? I will be very grateful for the answer. And again, great video. Subbed!
@Nolkaloid
@Nolkaloid 4 года назад
Hey! In the tutorial I showed how you can change the position of the shockwave, in scaled UV coordinates). In your script you need to change the center uniform accordingly to where is your Position2D.
@WoYoSenseiPL
@WoYoSenseiPL 4 года назад
@@Nolkaloid Thank you very much for your answer. I will give it a try! Please, more Godot tutorials! You're great! :)
@ca3ca377
@ca3ca377 4 года назад
@@Nolkaloid Doesnt seem to work, when I change the position2D (using by example mouse coordinates) the circle makes an arc between the top left corner and bottom right corner, but only moves in a circular position, so I can't use it as an effect on a smaller node.
@measurableharmstudio1064
@measurableharmstudio1064 4 года назад
Did anyone get this working correctly? I'm trying to "deploy" a shockwave at my player position by instancing it with a key press and just can't get the position right. It's usually following my camera (which is always scrolling) and at the bottom of the screen.
@Nolkaloid
@Nolkaloid 4 года назад
@@measurableharmstudio1064 For anyone struggling to get this working, the position property of you Node is in local coordinates, what we want is the its position on screen, normalized {0.0, 1.0}, and scaled according to some aspect ratio. This should work, you may need to adjust it according to your scene setup : ___ var transformed_position = (get_global_transform_with_canvas().origin/ get_viewport_rect().size) var aspect_ratio = get_viewport_rect().size.aspect() transformed_position.x = (transformed_position.x - 0.5) * aspect_ratio + 0.5 $ShockwaveEffect/ColorRect.material.set_shader_param("center", Vector2(transformed_position.x,1.0-transformed_position.y)) ___
@willirittmann1917
@willirittmann1917 8 месяцев назад
Newbie question: I wanna create a collision for this, to make it I need to create a collision that changes it's shape (e.g: radius) over the time, or shaders also support smt like it? I believe that they only support "visual" stuffs
@Nolkaloid
@Nolkaloid 8 месяцев назад
Hi, short answer : shaders are only for visual stuff. If you want to add a collision to the shockwave you'll need to use a collision shape and change it's size in sync with the shader.
@noureddinealjazairi6063
@noureddinealjazairi6063 11 месяцев назад
Thnx so much this tutorial was exactly what i was trying to find for a long while but for some reason its not in the center and its elliptical idk why?
@Nolkaloid
@Nolkaloid 11 месяцев назад
It should be explained around 8:20
@noureddinealjazairi6063
@noureddinealjazairi6063 11 месяцев назад
@@Nolkaloid yeah I got it. It seems that I just forgot to put scaleuv instead of screenuv. Thanks. Also is there a way to exclude an object from getting affected by this shader?
@Nolkaloid
@Nolkaloid 11 месяцев назад
@@noureddinealjazairi6063 Put your node over the node that has the screen shader : deeper in the scene tree or with a higher z-index.
@noureddinealjazairi6063
@noureddinealjazairi6063 11 месяцев назад
@@Nolkaloid I think with a higher z index will work because my node is global. Thank you so much!
@noureddinealjazairi6063
@noureddinealjazairi6063 11 месяцев назад
@@Nolkaloid but for some reason I tried it and it didn't work. Is that related to it being a global node
@thomasrodriguez3107
@thomasrodriguez3107 3 года назад
Looks awsome
@cenullum
@cenullum 4 года назад
Does using a circle texture instead of creating circle in shader give better performance or opposite?
@Nolkaloid
@Nolkaloid 4 года назад
I don't think it makes much of a difference. The advantage of making the circle procedural is that you can change it's parameters on the fly.
@bugseater1
@bugseater1 3 года назад
Is there a way to make the center be offset to position rather than a ratio? (Like 500, 500, being in the center of a 1000, 1000 screen)
@Nolkaloid
@Nolkaloid 3 года назад
Here you go: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-SCHdglr35pk.html&lc=UgwjbM8MwdXcK9qPAqx4AaABAg.99pZ5vU3O9U9D-CrAMI1U-
@Nolkaloid
@Nolkaloid 3 года назад
Seems that the link doesn't work very well, so here is my explanation again: gist.github.com/Nolkaloid/62d6960279ce9c8fda555bca9603751b
@rafaelgpontes
@rafaelgpontes 4 года назад
Hey, have you tried this shader code in the latest 3.2.2beta4? I set up the exact same code as you did and the result was a bit messed up here in my machine. I was wondering if it's related to that GLES2 modifications made in this version. Could you test it in the newer version?
@Nolkaloid
@Nolkaloid 4 года назад
That's weird... I tested it on beta4 and it worked alright.
@Saiklohit
@Saiklohit 4 года назад
Are you getting a black screen? I had that issue and had to switch my project settings>rendering>quality>framebuffer allocation from 2D Without Effects to 2D and it fixed it
@websterferro4025
@websterferro4025 3 года назад
Can you help me, put chromatic abberation? It's been weeks and I still don't how to do it :(
@tavenolsson9395
@tavenolsson9395 3 года назад
Look at Abel's comment
@websterferro4025
@websterferro4025 3 года назад
@@tavenolsson9395 thanks bro!
@yPhil
@yPhil 3 месяца назад
Can it be added to a 3d scene? Apparently not, I've been trying for days now.
@Nolkaloid
@Nolkaloid 3 месяца назад
Of course it can, you need to use a full screen quad, see docs.godotengine.org/en/stable/tutorials/shaders/advanced_postprocessing.html#full-screen-quad
@gamingworld8564
@gamingworld8564 3 года назад
its Me That I Gave 1K Subs
@halobread
@halobread 3 года назад
i have no idea to make the chromatic effect, u didn't teach anything about that
@Nolkaloid
@Nolkaloid 3 года назад
Well the goal was to give you an insight on how shaders work by using the shock-wave as an example. If you have understood what was going on, you have technically the ability to make a chromatic aberration effect. Basically the idea is to offset the R G B channels so they don't overlap perfectly.
@danielaguirre5078
@danielaguirre5078 Год назад
Thanks, i use individual nodes to make multiples ripples on screen (explosions), not the optimal way but it works for me.
@marcosadrian65
@marcosadrian65 3 года назад
Amazing! How we can attach this to the player?
@marcosadrian65
@marcosadrian65 3 года назад
Fixed already! Thanks
@mrtopaz
@mrtopaz 3 года назад
@@marcosadrian65 How did you do it? I cant get it to center on my character when he moves, but also I think i'm adding it wrong in the animationplayer.. I go add track > property track > modulate and pick it from there. but it wont allow me to animate the values at all, it doesnt really show up.
@marcosadrian65
@marcosadrian65 3 года назад
@@mrtopaz I did it creating a dedicated scene using a colorect whyt the shader then an animation player for animate the shader param and free the resource at the end
@marcosadrian65
@marcosadrian65 3 года назад
@@mrtopaz you must go to material - bellow "visibility" and then to shader param to allow animate keys.
@marcosadrian65
@marcosadrian65 3 года назад
@@mrtopaz ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-wX365br511U.html here I attached to my player when it started dashing.
@adriankohres5623
@adriankohres5623 2 года назад
How would I go on? How would I create multiple ripples on multiple clicks at the clicks destination that then animate until the ripples are gone?
@Nolkaloid
@Nolkaloid 2 года назад
This is a bit complicated in Godot 3.x : - you could either use multiple full screen objects and the BackBufferCopy node to apply the shader multiple times. But this is clunky and hits performance pretty quickly. - you could create some kind of coordinate texture in a script and pass it to the shader. The shader would read from it and compute the distortion according to the different points. I'm prettytty hyped for Godot 4 where uniform arrays are available : github.com/godotengine/godot/pull/49485
@adriankohres5623
@adriankohres5623 2 года назад
@@Nolkaloid could i not do a queue? where I record the times of clicks and the shader takes that variable and chews through it? and the queues variable controls the number of for loops the shader has to run and for every for loop the shader animates the ripple from 0 to number for the size value over time? or is this not going to work?
@adriankohres5623
@adriankohres5623 2 года назад
Think of a water cavern where drops fall from the ceiling. So I need some way to trigger a shockwave that goes from 0 to some amount of size. however, if there are multiple droplets incoming delayed I need to create multiple shockwaves that all get triggered at different points in time
@Nolkaloid
@Nolkaloid 2 года назад
@@adriankohres5623 what do you mean by queue ? Like a queue data structure? How would you use it?
@adriankohres5623
@adriankohres5623 2 года назад
@@Nolkaloid A drop drops onto the texture. The shaders shockwave code is triggered. 3 sequentially drops are dropping onto the texture. now the shader has to create 3 shockwaves. so the code for the mask needs to run now 3 times but with different size values as the drops reach the texture with a time offset. So my idea was to use a queue but no idea how. I bet there is an easier way...
@eruaiokoyomoh3177
@eruaiokoyomoh3177 4 года назад
I am making a mobile game and my SCREEN_PIXEL_SIZE does not match my viewpoint so this shockwave shader effect doesn't work as well for me, please make a video for projects with different viewports, please respond
@eruaiokoyomoh3177
@eruaiokoyomoh3177 4 года назад
Note: I can't use my position to UV, so if there's a way you can help with that it would be amazing
@Nolkaloid
@Nolkaloid 4 года назад
I'm not quite sure I understand your issue... could you please give more details and maybe screenshots ?
@eruaiokoyomoh3177
@eruaiokoyomoh3177 4 года назад
@@Nolkaloid do you have a discord or social media handle or a way we could communicate better, or a way I could send you a screenshot?
@celsladroma8048
@celsladroma8048 2 месяца назад
this thing work on godot 4?
@Nolkaloid
@Nolkaloid 2 месяца назад
Yes, but you will have to modify it a bit.
@deadeagle-archived
@deadeagle-archived 2 года назад
Me: ah yes hole punch easy ill wait for chromatic aberration Tutorial: homework figure it out Me: :(
@user-fv8uv2us9r
@user-fv8uv2us9r Год назад
Жаль, что это для 2д( Да, база для 3д та же, но.. Как бы, сложнее Интересно как делать такое в 3д-пространстве вокруг бегущего персонажа..
@sanders296
@sanders296 4 года назад
How could you change the colors of the mask for example instead of white I want it to be transparent I just saw your yt music player that shader is exactly what I want I will look at that. Thanks
@Nolkaloid
@Nolkaloid 4 года назад
Hey! The mask is only a value that is between 0.0 and 1.0, so you can pass it to the alpha.
@daniridao
@daniridao Год назад
Any chance you could explain how to make this shader work on any part of the screen despite where our camera is? I've tried doing something like taking get_global_transform_with_canvas().origin / get_viewport_rect().size in a colorect (no canvas layer) and setting that as the center (also playing with the rect_size to adjust it) but it doesn't seem to work so I'm a bit lost.
@daniridao
@daniridao Год назад
Actually, to answer myself no trickery is needed. Changing the SCREEN_UV we used to set the scaled uv for UV will do the trick. But the SCREEN_UV in the last line needs to remain to grab the colour of the screen. That should do the trick!
Далее
You're not using Godot to its potential
6:12
Просмотров 81 тыс.
GODOT TUTORIAL : 2D Reflective water shader
18:43
Просмотров 20 тыс.
[RU] Winline EPIC Standoff 2 Major | LAN | Final Day
9:48:47
The Strange Graphics Of LETHAL COMPANY
15:59
Просмотров 762 тыс.
Common VFX Shader Techniques ft. Godot
7:07
Просмотров 41 тыс.
10 Minutes vs. 10 Years of Animation
19:29
Просмотров 655 тыс.
Fix Particles Lag/Stutter in The Godot Engine
8:31
Просмотров 8 тыс.
Color Quantization and Dithering
11:55
Просмотров 414 тыс.
3 Hours vs. 3 Years of Blender
17:44
Просмотров 4,2 млн
Creating shock-wave ripple effects in Godot 3 3D.
10:57
Godot Shader Tutorial [Basics] in 7 minutes
7:47
Просмотров 88 тыс.