Тёмный

Simple Wind Shader Effect in Unity! 

Code Monkey
Подписаться 530 тыс.
Просмотров 76 тыс.
50% 1

✅ Get the Project files and Utilities at unitycodemonkey.com/video.php...
Let's learn how to make a simple Wind Shader effect in Unity! 👇
🌍 Get the Complete Builder-Defender Course! ✅ unitycodemonkey.com/coursebui...
👍 Learn to make an awesome game step-by-step from start to finish.
Make Awesome Effects with Shader Graph in Unity!
• Make Awesome Effects w...
Check out the entire Shader Graph Tutorials Playlist
• Unity Shader Graph Tut...
🌍 Get Code Monkey on Steam!
👍 Interactive Tutorials, Complete Games and More!
✅ store.steampowered.com/app/12...
If you have any questions post them in the comments and I'll do my best to answer them.
🔔 Subscribe for more Unity Tutorials / @codemonkeyunity
See you next time!
📍 Support on Patreon / unitycodemonkey
🤖 Join the Community Discord / discord
📦 Grab the Game Bundle at unitycodemonkey.com/gameBundl...
📝 Get the Code Monkey Utilities at unitycodemonkey.com/utils.php
#unitytutorial #unity3d #unity2d
--------------------------------------------------------------------
Hello and welcome, I am your Code Monkey and here you will learn everything about Game Development in Unity 2D using C#.
I've been developing games for several years with 7 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
You can see my games at www.endlessloopstudios.com
--------------------------------------------------------------------
- Website: unitycodemonkey.com/
- Twitter: / unitycodemonkey
- Facebook: / unitycodemonkey

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

 

3 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 185   
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
🌐 Have you found the videos Helpful and Valuable? ❤️ Get my Course unitycodemonkey.com/coursebuilderdefender.php or Support on Patreon www.patreon.com/unitycodemonkey
@zakisellami8899
@zakisellami8899 3 года назад
Can you teach us how to make a horse or a bike that you can climb over and use to increase your speed pls
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
@@zakisellami8899 I've covered several character controllers previously, they all use a simple float to manage the moveSpeed ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Bf_5qIt9Gr8.html
@zakisellami8899
@zakisellami8899 3 года назад
I meant something like riding a horse in 2d games
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
@@zakisellami8899 The character controller doesn't care what visual is applied to it. You can move a Horse or a Character or a Brick.
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
​@PueKio That's a very specific genre, you're better off breaking it down into it's base mechanics and look for tutorials on that. I've covered some Pathfinding you can use, a bunch of UI elements, Tooltips, etc.
@codegnatstudios
@codegnatstudios 3 года назад
This video really blew me away.
@peppidesu
@peppidesu 3 года назад
shut
@CASMANWHAT
@CASMANWHAT 3 года назад
I see what you did there
3 года назад
I will carry this shader with me for the rest of my life
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
💬 Have you ever made a Wind Shader effect? Once you start thinking in terms of textures/gradient/noise everything becomes much easier to do in Shader Graph. Stay tuned for the awesome Construction Shader I made for the course, it really looks awesome and it's quite simple to do!
@zakisellami8899
@zakisellami8899 3 года назад
Can you teach us how to make a horse or a bike that you can climb over and use to increase your speed pls
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
I've covered several character controllers previously, they all use a simple float to manage the moveSpeed ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Bf_5qIt9Gr8.html
@ArmanNobari
@ArmanNobari 3 года назад
This was one of the most useful tutorials I've seen in ~3 years of indie development with Unity. Seriously thank you for making this, for your instruction style, and for offering such a useful guide on YT!!
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Thanks! I'm glad you found it useful!
@zionen01
@zionen01 3 года назад
This was one of the most well-explained video on shaders I've seen yet. I think you went over the details of every single node you added, in a well paced manner. Thanks for the video, I will be checking out your udemy course, I enjoyed your teaching style.
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Thanks! I'm glad you enjoyed it!
@usamakr
@usamakr 2 года назад
Thanks for this video. Not only did I learn shaders, I also learnt a few other important things about unity.
@TheEenlampjebrandt
@TheEenlampjebrandt 2 года назад
Well explained! Short and precise
@shizhencui5469
@shizhencui5469 3 года назад
I can always learn something new from this channel. Thanks a lot.
@DarkMatterVisible
@DarkMatterVisible 3 года назад
Fantastic tutorial, really well explained, and the perfect simple shader for building this effect and many others. Thanks!
@Wishbone_Games
@Wishbone_Games Год назад
I cannot thank you enough, just made my game look 100x better
@matteoscalvini
@matteoscalvini 3 года назад
You are the chosen one. You are the next brackeys. Joking, you are not a replacement, you have been making those wonderful video and more for long time, and for this thank you. Just don't let us alone like brackeys ;)
@WanderyenErin
@WanderyenErin 2 года назад
This is so cool!! Thank you for sharing with us
@simmzzzz
@simmzzzz Год назад
Wow! Exactly what I needed. Absolutely brilliant how you did this. Thanks!!!
@thefrenchdev965
@thefrenchdev965 3 года назад
This shader looks really solid! I will try to make one with your tutorial. Thanks!
@acikgozemre
@acikgozemre 2 года назад
Very helpful Thank you!
@stephenmackenzie9016
@stephenmackenzie9016 3 года назад
Awesome, thanks a million
@GG1440
@GG1440 3 года назад
Very good tutorial. Thank you.
@manolov4074
@manolov4074 3 года назад
That is the same as in the Course !! :) Pretty cool
@dspartan007
@dspartan007 3 года назад
Nice video, as always, very usefull.
@dr.jackshephard4733
@dr.jackshephard4733 3 года назад
Thanks for this excellent and concise explanation! That course of yours is very tempting, I may have to pick it up today :) I'm one month into my Unity dev journey so your work is invaluable, thank you!
@dr.jackshephard4733
@dr.jackshephard4733 3 года назад
Welp, just bought it!
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
I hope you like it!
@Tober_
@Tober_ 3 года назад
If anyone is having trouble with their sprite having a wierd shape, I have a solution. I wanted to apply this effect to my pixel art grass but when I apllied the material, my sprite turned into a wierd blob. To solve this, I went to sprite editor, in the upper left corner, selected "custom outline" and edited the outline of my sprite to my liking (with pixel art, you should turn on the "snap" feature ON as well (upper left corner)) Hope this helps someone, I struggled for quiet some time and it would be a shame not to use such a good shader and a tutorial :DDDD. PS: thanks for the wonderful tutorial, it helped me understand shaders better
@lachlandavies3574
@lachlandavies3574 6 месяцев назад
oh my god thankyou so much
@arcday4281
@arcday4281 3 года назад
Everything is at the highest level! By the way, it would be interesting to look at the mini course on "2D platformer" (slightly similar to the genre of "metroidvania"), if you ever want to do it )
@Soundy777
@Soundy777 3 года назад
Concise & informative! You're a credit to gameDevs everywhere mon ami ^-^
@shadow-sea
@shadow-sea 5 месяцев назад
amazing
@blendanimator6123
@blendanimator6123 3 года назад
Amazing
@voronkovmm
@voronkovmm Год назад
You are best!
@edwardnewtonLA
@edwardnewtonLA Год назад
Fantastic. :)
@mdmarufhowlader7036
@mdmarufhowlader7036 3 года назад
You are Awesome
@nileshkumawat2997
@nileshkumawat2997 Год назад
Thank you.... Thank you.... Thank you very very much... I tryed many shaders but Only by you I understand how object position Stop in x,z pos
@leptir1
@leptir1 3 года назад
Hey, another wonderful tutorial as always. Might want to fiddle some more with the render settings. There's a lot of distortion that happens around anything that's moving. Around your mouse, and around the character.
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Distortion? You mean the Depth of Field effect?
@pozzisoft6155
@pozzisoft6155 3 года назад
I was following so well! Then at 10:30 - Add this, multiply gradient by output of that, then add it up there. *Head explodes* Haha I LOVE your videos though! Keep doing what you are doing it helps in game dev so much to have people like you around!!
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
The tricky thing with making shaders is thinking in terms of number operations. By multiplying you are essentially using the gradient as a mask that is applied to the noise which means the noise only gets applied according to the mask. Then add that output just the same as before. It would be easier to understand if Shader graph showed the Noise as a flat texture rather than a sphere.
@pozzisoft6155
@pozzisoft6155 3 года назад
@@CodeMonkeyUnity Ah that definitely makes sense! And by the way I should mention, to be fair I have not properly tackled shadergraph or tried it in my game yet, so to jump into this tutorial was already not the perfect way to go for me :) If I'm going to be serious about using this, I would do as you advised and start off with your other tutorial on the matter first! Great vid!
@alideveloper6945
@alideveloper6945 3 года назад
you are God Of Unity 2D
@the7ak3
@the7ak3 10 месяцев назад
for some reason this video made my google speaker start listening around the 2:00 mark and it started playing Evanescence - Bring Me To Life lolol. Great vids btw
@CodeMonkeyUnity
@CodeMonkeyUnity 9 месяцев назад
Really? that's odd, great song though!
@deeptiyadav923
@deeptiyadav923 3 года назад
Just 30 min ago brackeys quit youtube are you sad,i cried 😭 But I think I will be fine as I have your tutorials .
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Yeah that was definitely a surprise! He's been doing tutorials for 8 years so it seems like he's ready to try something new.
@keenefx321
@keenefx321 Год назад
Reminds me of Blender, dear me this is like a node bomb!
@TheShelfman
@TheShelfman 10 месяцев назад
Shaders terrify me, but this video was incredible. Thanks!
@CodeMonkeyUnity
@CodeMonkeyUnity 10 месяцев назад
heh they are indeed tricky! Shader Graph is what helped me lose fear of shaders
@williamrosengren3139
@williamrosengren3139 3 года назад
Yes
@NguyenHoangPhuong-qf6xb
@NguyenHoangPhuong-qf6xb 3 года назад
I feel like a superman after this
@hardworkerstudio
@hardworkerstudio Год назад
Thank you very much! I have a question why sometime the wild shaders are moving super slower, so it can't even see ?
@marymarin3506
@marymarin3506 3 года назад
Local multiplayer tutorial pleeeeeaseee)
@leowilbur4024
@leowilbur4024 Год назад
Great job on the video, I've been intimidated by the shader graph for a while now and this helped a lot. I'm going to check out your other shader graph tuts. Also, subbed :)
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
I'm glad the video helped you! Thanks!
@phantomBlurrrr
@phantomBlurrrr 2 года назад
Awesome shader. The only problem I have with it is that as the effect is applied, the pixels in the sprite are being warped. I assume there's a way to line up the vertex movement with the pixel resolution? Any ideas? That way as the sprite is bent the pixels size is kept more intact... Edit: I added a pixelation effect to this same shader and it seems to have helped keep the integrity of the pixels a bit better. My parameters ended up being Windintensity 0.25, Windspeed 1, Pixelation 65. Might help...
@leptir1
@leptir1 3 года назад
I have a question: how do you get the background of your sprite to remain constant? It currently distorts the grass shader underneath. Thanks!
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
What do you mean by background of the sprite? A Sprite itself doesn't have any foreground or background.
@NicoSteiner
@NicoSteiner 3 года назад
These shader nodes are exploding so quickly in numbers. I think that's the price we have to pay for a kind of visual driven programming approach. Anyways - really good tutorial, thanks Code Monkey! I can see in your recording that you somehow managed to apply the Depth Of Field post processing effect to your 2D scene. I tried so too, but failed. Are you showing in your advertised course, how I have to build my whole scene to apply effects like this one? Or you maybe have another tutorial where this is explained? I would really appriciate having someone being able to explain, how to arrange my objects the right way to use such 3D-ish effects also in 2D.
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
My course is pure 2D so it doesn't have that effect, this scene is in 3D with flat sprites so I'm using the normal Depth of Field effect. I covered how to make custom post processing effects in another video and you could use that to make Depth of Field for 2D ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-77Lc43yTREo.html
@pinestark
@pinestark 3 года назад
I have a problem moving the grass around. The shader seems to speed up when moving. any fixes?
@tripplejaz
@tripplejaz Год назад
Hey Code Monkey, great tutorial. Just one question that I think would really add to the life of the plants; how would I create a random variable for the speed/intensity? That way it's not always "on" but the foliage would slow down at times, then pick up again, so the wind in the environment looks like it's actually moving through the space. Thanks in advance!
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
For randomness you use some kind of Noise node, also use a Time node to scroll through it. Then remap that noise to some kind of wind speed value.
@tripplejaz
@tripplejaz Год назад
@@CodeMonkeyUnity Thanks for the quick response. That worked exactly the way I wanted it to. One more question, the UV of some of my sprites (from a sprite sheet) is off, so the mask doesn't affect some of my foliage at the base, but others it does. Any idea how to adjust the UV of specific sprites?
@lyamwills7513
@lyamwills7513 3 года назад
Could you make a tutorial on bolt please because I don’t know what I’m really doing thank you
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
I made a Getting Started video for Bolt here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-8y6akNTUt2Y.html
@AbdAlrahman_Ghanem
@AbdAlrahman_Ghanem Год назад
Thank you very much for the excellent video, I have a question: As a beginner, I have seen people use Animation (Animator component) before. So when to use Shader Effects instead? Which one is better? Again, I am a beginner, so I am sorry if my question is dumb. Thank you very much ❤
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
Animations are static, they always play the exact same animation. Whereas shader effects can use noise to make them more dynamic. They both have their use cases, really depends on the scenario.
@AbdAlrahman_Ghanem
@AbdAlrahman_Ghanem Год назад
@@CodeMonkeyUnity Thank you for the clarifications ❤
@andragon
@andragon 2 года назад
Hi. Followed the tutorial, but when I add this material with shader to more than 1 game object, all stops working. It works/animates fine when attached to 1 object only. In the shader main preview it looks great, but not when attached to more than 1 object. then it just does not animate at all. Suggestions?
@rennylmontuya3796
@rennylmontuya3796 Год назад
Followed the steps correctly and when I apply it to the game object it does what its intended but the position does not show correctly on the scene? Any ideas?
@simonsays142
@simonsays142 Год назад
how make tiling this shader for sprite sheet?
@farn2388
@farn2388 3 года назад
I seem to be getting some warnings on this shader that say "implicit truncation of vector type" D3D 342, 699, 1052. Did I mess up a step or is it normal to have these warnings in the inspector?
@stoopochky
@stoopochky 2 года назад
There is a problem that if my sprite is transparent when the parts move left and right, the opacity stacks. Some parts become different color and it looks a bit ugly. Is there a way to not add the transparency no matter how many layers are on top of each other? Thanks
@chrisheld8463
@chrisheld8463 2 года назад
Hi. Thanks for this video. I was succesful in getting the shader to work in the Shader graph and the editor; however, when I go inot play mode. The bottom is moving. It is almost like that last change of the shadder with the UV/Split/Preview was not added. Any ideas? I did make sure I saved and reloaded the material onto the sprite.
@chrisheld8463
@chrisheld8463 2 года назад
I just realized what the issue was. I was using a sprite from a Sprite Atlas. So I guess the UVs are different when you use an atlas. I tested with a simple stand alone sprite and the effect was consistent between the Shader Graph Preview/Editor and the Player. Thanks again for the video!
@ayushjain1655
@ayushjain1655 3 года назад
When I link the texture to colour in Maintex at the start, some sort of highlighted aura has appeared of the green colour around my sprite. I am using the asset sprite provided in the link in the description. Please Help
@Maurilustrador
@Maurilustrador 3 года назад
How did you achieved that blur at the top like depth of field with sprites? the sprite renderer doesn't write to Z so the depth of field effect doesn't know which sprites are near the camera and which are further away. Thanks, and awesome vids by the way, subscribed!
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
It's the standard Post Processing depth of field. They are 2D sprites but it's a normal 3D scene, they are placed further away from the camera.
@touzimsky
@touzimsky 2 года назад
@@CodeMonkeyUnity This does not seem to work for me. My 3D cubes get more or less blurry depending on their position, but the sprites remain blurry no matter how close or far I place them in the scene. My camera is already set to perspective mode. Any idea what I might be doing wrong?
@touzimsky
@touzimsky 2 года назад
@@CodeMonkeyUnity I think I found the problem - the depth of field effect actually gets applied whenever a 3D object is at a point in 3D space, and that effect in turn also gets applied to the sprites sharing the same screen space as well. Once the plane is not rendered anymore all sprites are equally blurry.
@MarushiaDark316
@MarushiaDark316 3 года назад
I know you can use Bools in Shader Graph, but Is it possible to use a Switch or Enum? For instance, if a wanted a dropdown menu to allow movement on "Only X" or "Only Y" but not having multiple properties that I have to toggle on and off, which can get hectic if there are many options in parallel.
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
I dont think theres any built in support for Switch or Enum, you really have to do complex boolean logic yourself.
@tSogu
@tSogu Год назад
Getting some weird results when adding more than one game object with the same material. Seems to work perfectly fine with one. Googling around seems to indicate this is related to dynamic batching, although I can't find any option to disable it with URP shaders. Any ideas? Unity version 2022.2.18f1.
@JustinFraser314
@JustinFraser314 9 месяцев назад
Do you have an update of this now that Unity has updated the way they do shader graphs? Maybe in your course somewhere?
@CodeMonkeyUnity
@CodeMonkeyUnity 9 месяцев назад
I believe the only difference is the alpha channel now being separate ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-azGMuP9ks8U.html Everything else should work the same
@Maurilustrador
@Maurilustrador 3 года назад
Also I wanted to ask. I have problems with sorting sprites when they overlap having my camera in perspective mode. Unity sorts by the pivot point of the sprite, but when I move my camera sideways they start to overlap each other (example: tree leaves between them in a tree) I can't use sorting layers because layers override the perspective of the camera if a character is behind or in front of another sprite in another layer. In your perspective example with sprites, how do you manage sorting?
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
If you use a perspective camera then you shouldn't touch the Sorting order, it should automatically be sorted based on distance to the camera. If you modify the Sorting order that's when you get those issues.
@thefrenchdev965
@thefrenchdev965 3 года назад
I have a question, do you think it's possible to make the shader react to the player's position? To make a sawing effect for a 2D game. I think I can send this value by script (as a Vector1 value) and maybe increase the amplitude of the oscillation when the distance is shorter but I'm not sure how to make it oscillating more in a direction (opposite to the player's pos). Is it possible to set a kind of offset to the oscillation? Thank you!
@thefrenchdev965
@thefrenchdev965 3 года назад
Quick update: I have made it and it works really well!
@rajatkoparde5224
@rajatkoparde5224 3 года назад
@@thefrenchdev965 can u tell me how u did it, i am trying the same
@thefrenchdev965
@thefrenchdev965 3 года назад
@@rajatkoparde5224 I use the space coordinates as a variable for the shader I have made.
@lashaghotvadze5966
@lashaghotvadze5966 Год назад
Hello, can you give me advice on how to make this grass shader interact with player (character)?
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
Simplest way is add a collider to the grass and identify if the player is near grass, then pass in a parameter to the shader
@redinternet9893
@redinternet9893 2 года назад
can i do the same to the 3D grass?
@CodeMonkeyUnity
@CodeMonkeyUnity 2 года назад
Yup it should work exactly the same, as long as the grass has vertices it should work
@Ziplock9000
@Ziplock9000 11 месяцев назад
Ok I've found an issue at 10:40 the technique you use to 'pin' the bottom when sprites are in an atlas, which they almost always will be for a real-world project. Do you have a fix for this please?
@philip47478
@philip47478 Год назад
Did anyone else encountered this issue: when the sprite (bush, grass etc) is moved around, the animation is sped up significantly? For example, when i apply this shader to an object in the foreground, the speed increases when my character moves, but when it stops, the vegetation's speed returns to the assigned values.
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
That's odd, the shader shouldn't care where the player/camera is, nothing in the shader is based on Screen Position
@philip47478
@philip47478 Год назад
@@CodeMonkeyUnity So, after many tests, this issue appears only on orthographic view and parallax script applied on each layer group. Soon as i switched to perspective and removed the parallax script, the issue disappeared. Still not sure what caused this, since i tried many parallax scripts, and some were even from what unity packages had to offer.
@angat7564
@angat7564 5 месяцев назад
Hi, your tutorial is great, but I have a question when I connect the MainTexture (asset selected) to Sample texture 2D and from Sample texture 2D to Fragment, the Main review does not show the materials that I select for MainTexture 2D. Could I ask where my problem is?
@CodeMonkeyUnity
@CodeMonkeyUnity 5 месяцев назад
Do you see the preview on the Sample Texture node? Where did you assign the texture? On the Inspector or on the Shader Graph itself? The Shader Graph only assigns the defaults, it will be overriden by what is on the inspector
@angat7564
@angat7564 5 месяцев назад
@@CodeMonkeyUnity Thanks so much for the support. I did it.
@ayushjain1655
@ayushjain1655 3 года назад
At the start when you link the texture to the colour (MainTex), I am following along in the same way, but in my preview as well as the scene/game, it is still showing pink colour which started to show as soon as I applied the material. Please Help
@ayushjain1655
@ayushjain1655 3 года назад
Nevermind, fixed it! Didn't add a universal render assest to the project settings in Graph and Quality
@ibpositive757
@ibpositive757 2 года назад
@@ayushjain1655 I'm having a similar issue, but I don't even see the Graph and Quality section in project settings. What Unity version were you using?
@Cash_Online
@Cash_Online 3 года назад
can I use that with URP
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
I am using URP in the video.
@AnkitPatel04
@AnkitPatel04 7 месяцев назад
Its not connecting and showing "argument Null emExepsion: Value cannot be null " help
@CodeMonkeyUnity
@CodeMonkeyUnity 7 месяцев назад
Use Debug.Log to find out what is null unitycodemonkey.com/video.php?v=5irv30-bTJw
@georgehelms6332
@georgehelms6332 3 года назад
Hi
@smirkinmerkin4997
@smirkinmerkin4997 Год назад
Could this work for grass on a tilemap as well?
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
Hmm if you use the Tilemap renderer then I don't think so since that one merges all the tiles into one mesh which means you can't use the mesh position to move the vertices
@smirkinmerkin4997
@smirkinmerkin4997 Год назад
@@CodeMonkeyUnity That makes sense. I think I'm having a similar issue with using a texture atlas as well. The effect itself works great, but it looks like it's manipulating the vertices in relation to the entire atlas, not the individual slices. If that is the case, maybe this works best with individual textures? I'm new to Unity, so maybe I just need more experience with it, but it feels like it's better to not use texture atlases at all. There are cases where I can't select a slice as a texture, or (like with this) Unity doesn't treat slices as their own textures, even though I'm pretty sure it saves them as separate png files. Either way, I learned a lot from this. Your Ultimate Unity Overview has been very helpful too.
@ayushjain1655
@ayushjain1655 3 года назад
The 2d renderer doesn't appear in the shader menu, and I have everything necessary installed, including all the 2D packages and Universal RP. I'm using Unity 2020.3.4f1. Please help.
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
If you're using Unity 2020 then it simply shows up as Sprite Lit or Sprite Unlit
@FortbloxNET
@FortbloxNET 2 года назад
Don't know if i am wrong, could it be, if the sprite is not a single file but from a tilesheet file, that it doesnt work as intended? i have the feeling the bottom is moving but in your shader you made it so the bottom should stay on its position, but you work with a single sprite file. could that be a problem when using a tilesheet? If yes, how would you fix that instead of making every sprite into one single file? thank you
@FortbloxNET
@FortbloxNET 2 года назад
i added my test sprite to a single png file and it worked, so i assume, tilesheet makes the problem :-/ how could that be fixed? :-)
@CodeMonkeyUnity
@CodeMonkeyUnity 2 года назад
Yes since the shader uses the texture position if you use a tilesheet it does break it One solution would be to have another tilesheet texture just in black and white gradient for each tile, then use that second texture as the position input instead of the uv position
@FortbloxNET
@FortbloxNET 2 года назад
@@CodeMonkeyUnity i just tested out of fun, to make the sprite a single file, but then add to a sprite atlas which is literally the same as the spritesheet and it moves on X again :-/ i read about FLIPBOOK node but that would of course only work with the original spritesheet itself i assume? because on sprite atlas you dont know where the position of your sprite will be etc.... :-/ so only solution would be to make single png files and NOT add them to a sprite atlas, lol :)
@VIT3Z
@VIT3Z 2 года назад
Hi, I'm having a few problems with this. For some reason, it doesn't work with some of the sprites I have (which is very odd). I was able to get it working on some grass and tree sprites I have, but not on others. The second problem I'm facing is that I'm getting texture popping while moving the camera. The sprites appear when they're in the centre of the camera, but if they're on the edges they pop out. Is there a way to fix these problems?
@arnaudbistel5011
@arnaudbistel5011 Год назад
@@EFileTahi hi, I've got the same problem. Did you managed to solve it?
@thewar4yourmind356
@thewar4yourmind356 2 года назад
I am having an issue using this tutorial, when i move the camera around the sprite does glitch. Not sure why, i'm using the object position but somehow when moving around the "trees" start glitching like if it reset it's position or something.
@thewar4yourmind356
@thewar4yourmind356 2 года назад
Enabling GPU instancing fixed it for me.
@lack_05
@lack_05 Год назад
@@thewar4yourmind356 I don't see the option on my material
@Dannyxv8
@Dannyxv8 3 года назад
The 2d renderer doesn't appear in the shader menu, and I have everything necessary installed. I'm using Unity 2020.2.0f1
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Do you have the Universal RP installed?
@Dannyxv8
@Dannyxv8 3 года назад
@@CodeMonkeyUnity Like I said, I have everything installed
@ayushjain1655
@ayushjain1655 3 года назад
@@Dannyxv8 did you get the soltuion?
@manolov4074
@manolov4074 3 года назад
will you make more udemy courses . I loooove the game that you created it is simply amaziiiing!!!!! U are awesome developer!
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
The response has been great so yup definitely planning on doing more. It's great to be able to make some full length projects rather than just quick videos.
@manolov4074
@manolov4074 3 года назад
@@CodeMonkeyUnity I loved it . It is not only amazingly well explained but also the game is ACTUALLY NICE !!!! A great idea and well executed. I would love another course on showing more with shaders and some VFX for example like a mini rpg magic game (since those are very rough to make) But I trust that whatever you make will be excellent content with much to learn and of course , WORTH IT !!!! I highly appreciate you . Keep Crushing CODE monkey!
@MasterofFire-sc3yn
@MasterofFire-sc3yn 3 года назад
How can I increase the UV effect so that I can use the effect for trees?
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
What do you mean by increase the UV effect? The UV of the texture isn't used for anything here.
@MasterofFire-sc3yn
@MasterofFire-sc3yn 3 года назад
@@CodeMonkeyUnity The UV that is set to Channel0 at 10:13 that is used to make the effect only happen on the top.
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
​@@MasterofFire-sc3yn What do you mean by increase the UV? If you don't apply that gradient mask then the effect is applied to the whole sprite. If you want to apply only to a specific part of a tree sprite you can make a custom texture mask instead of a simple gradient.
@Jaypordy
@Jaypordy 3 года назад
Shader is working fine on 'Scene' mode but the color is black on the 'Game' mode. Any ideas?
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Did you make a Sprite Lit shader? Do you have 2D lights?
@Jaypordy
@Jaypordy 3 года назад
@@CodeMonkeyUnity Set up the 2D lights. It is working perfectly now. Thanks.
@juliaalder2007
@juliaalder2007 Месяц назад
How does it work in 3d? There is no 2d texture and as 3d texture Unity finds nothing. :(
@LePetit2
@LePetit2 3 года назад
For any reason, the 2d renderer menu doesn't appear in Create>Shader. Any idea why?
@LePetit2
@LePetit2 3 года назад
Loved your tuto, btw!
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Do you have the Universal RP installed and the 2D Packages?
@LePetit2
@LePetit2 3 года назад
@@CodeMonkeyUnity Universal RP, 2d Animation, 2D Pixel Perfect, 2D PSD Importer, 2D Sprite, 2D SpriteShape and 2D Tilemap Editor. Just installed them and it doesn't appear yet.
@Zamoksva
@Zamoksva 3 года назад
@@LePetit2 i didnt have it, then i installed universal RP and now its showing. try to instal it again maybe
@ayushjain1655
@ayushjain1655 3 года назад
did you get the solution?
@nanomantube
@nanomantube 3 года назад
I'm following the steps but I'm getting the error "material does not have _MainTex texture property" in the sprite renderer. I have _MainTex in the reference field in the shader. Therefore my object is just blacked out. Anyone know why?
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Did you click Save on the Shader Graph? Is the reference name exactly right?
@nanomantube
@nanomantube 3 года назад
@@CodeMonkeyUnity Ah that was it! I feel like a dummy. Thanks so much.
@svetlanasygiainen5339
@svetlanasygiainen5339 10 месяцев назад
I followed this to the dot, but alas for some reason game and scene do not render the Y vertex lock, so it's just a waving flag. Honestly, at a loss what is wrong here. Been trying to check my camera and settings, but it's just puzzling.
@CodeMonkeyUnity
@CodeMonkeyUnity 10 месяцев назад
Are you using a spritesheet? Make sure you apply it to a simple solo sprite, otherwise the bottom won't match and everything will wave. The shader shouldn't have anything to do with the camera, the Y position is the base of the sprite and not screen space
@svetlanasygiainen5339
@svetlanasygiainen5339 9 месяцев назад
@@CodeMonkeyUnity You're correct! Hooray, they were in an atlas. But It seems like I've also sneakily added them to another atlas. So when I was removing them in and out of first one, they didn't work correctly XD. Dunno if this should be used sparingly tho, considering they will need to be drawn induvidually now? But, it looks cool! Although in the light of the recent news, it's a small win. Either way, thank you for this awesome shader! It was a great learning experience :D
@DarkEspeon40K
@DarkEspeon40K 3 года назад
Do you think this would work in a 2D environment with a tileset? :thinking:
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
This just moves the vertices so yes it's applicable to 2D Sprites as well as 3D Meshes
@DarkEspeon40K
@DarkEspeon40K 3 года назад
@@CodeMonkeyUnity Lovely~
@derpenz5376
@derpenz5376 3 года назад
i am at 5:00 and my matirial is ony violet no matter what i do. Can anyone help me?
@derpenz5376
@derpenz5376 3 года назад
On the Sprite is wirtten: _MainTex property needed, but i made that reference. Why is is not working?
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
Are you using URP or HDRP? Did you name the Reference _MainTex? Reference is different from the name
@derpenz5376
@derpenz5376 3 года назад
@@CodeMonkeyUnity I have the Universal RP 10.3.1 Installed.
@derpenz5376
@derpenz5376 3 года назад
@@CodeMonkeyUnity If I create a new material on the shader it is automatically violet.
@50Gameplay
@50Gameplay 2 года назад
@@derpenz5376 same to me, have no solution
@zakisellami8899
@zakisellami8899 3 года назад
Can you teach us how to make a horse or a bike that you can climb over and use to increase your speed pls
@CodeMonkeyUnity
@CodeMonkeyUnity 3 года назад
I've covered several character controllers previously, they all use a simple float to manage the moveSpeed ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Bf_5qIt9Gr8.html
@zakisellami8899
@zakisellami8899 3 года назад
@@CodeMonkeyUnity I meant something like riding a horse in 2d games
@rxn7
@rxn7 3 года назад
@@zakisellami8899 you can just increase player movent speed when player rides a horse
@nocultist7050
@nocultist7050 3 года назад
Will you join Odysee?
@gower1973
@gower1973 3 года назад
The algorithm that tessellates the mesh is pretty terrible that’s why it look ugly as sin, moving in z direction
@semithegamedeveloper6995
@semithegamedeveloper6995 3 года назад
Hey Code Monkey, Brackeys leaved in RU-vid Press like(for users) for Respect Press Love button(For Code Monkey) for Respect
@sagrgywejhxcvx
@sagrgywejhxcvx Год назад
shaders are your worst side
@CodeMonkeyUnity
@CodeMonkeyUnity Год назад
How so?
Далее
Рыбачка
00:14
Просмотров 15 тыс.
Penalty: Portugal - Slovenia
02:03
Просмотров 1,3 млн
Creating Simple Grass Shader in Unity URP
8:09
Просмотров 21 тыс.
I Made the Same Game in 8 Engines
12:34
Просмотров 3,9 млн
How to Make a Good 2D Camera
11:38
Просмотров 388 тыс.
6 Years of Learning Game Development
9:02
Просмотров 2,3 млн
Get STARTED With Shadergraph in Unity
16:28
Просмотров 9 тыс.
The Trick I Used to Make Combat Fun! | Devlog
8:12
Просмотров 1,6 млн
Рыбачка
00:14
Просмотров 15 тыс.