Dither Fade in Unity

  Рет қаралды 15,724

PabloMakes

PabloMakes

Күн бұрын

A follow up to the previous tutorial, I show you how to use dithering in Shader Graph to fade out meshes when they are close to the camera.
Previous Tutorial
• Dissolve effect in Sha...
(づ ̄ ³ ̄)づ ~(˘▾˘~)
TWITCH ( ͡° ͜ʖ ͡°)
/ pablomakes
TWITTER (ಥ﹏ಥ)
/ pablomakes
₪ ₪ Time Stamps ₪ ₪
00:00 - Intro
01:08 - Dithering
04:07 - Distance Dissolve
07:54 - Oops
#unity #tutorial #shadergraph

Пікірлер: 58
@er0s14
@er0s14 Жыл бұрын
Your tutorial is literally a life saver. Been looking for this all over the internet!
@fulongfromthegrave
@fulongfromthegrave Жыл бұрын
Man i love your videos so much!! Please consider posting again if you got the time for it, yours are some of the best explained tutorials out there, really appreciate it 🙏
@straylight08
@straylight08 Жыл бұрын
Superb video, this is something I've been fretting over for ages, solves a key part for the thing I'm trying to build
@Kishy
@Kishy 3 жыл бұрын
I love these!! Thanks so much for making them, love the face and cat cam combo too~!
@PabloMakes
@PabloMakes 3 жыл бұрын
Thanks! This one I recorded while streaming, I think I’ll try doing that going forward I too like having my face there, feel better explaining like that for some reason
@AlCh3mi_MvP
@AlCh3mi_MvP 3 жыл бұрын
Thanks so much Pablo! I'll definitely be giving this a try, im always so excited when I see you release a new vid! Warframe and unity are the 2 things that consume my life and youre in both ^^
@PabloMakes
@PabloMakes 3 жыл бұрын
Two great choices
@MenelikiGaming
@MenelikiGaming 3 жыл бұрын
Nice! Video turned out well. Was interesting to see the recording of it vs. the final product! :P
@PabloMakes
@PabloMakes 3 жыл бұрын
Haha yeah it was harder than I thought to edit, but might be the way going forward
@spikebor
@spikebor Жыл бұрын
Thank you for making this, exactly what I'm looking for!
@themightyajax4796
@themightyajax4796 3 жыл бұрын
Your videos are fantastic!
@PabloMakes
@PabloMakes 3 жыл бұрын
Thanks!
@Vonk47
@Vonk47 Жыл бұрын
Nice guide dude!
@rafa_guitar
@rafa_guitar 2 жыл бұрын
Thank you Pablo!
@benjaminlehmann
@benjaminlehmann 9 ай бұрын
That was very helpful. Thanks.
@MrGooGone
@MrGooGone 2 жыл бұрын
Thanks a bunch for this! I wouldn't have figured out the difference between those two similarly named nodes myself
@PabloMakes
@PabloMakes 2 жыл бұрын
Tricky naming!
@VyvyanTheGreat
@VyvyanTheGreat 11 ай бұрын
Perfect! Thank you!
@WingofTech
@WingofTech 9 ай бұрын
Waifus and cats, you are the best Pablo. ✨😖✨
@user-yn6xr5fd9u
@user-yn6xr5fd9u 3 жыл бұрын
love your tuts keep it up!!!
@user-yn6xr5fd9u
@user-yn6xr5fd9u 3 жыл бұрын
they are incredibly high quality. Touching on many problems that have a lot of concerns but aren't well addressed. Rare to find these days
@PabloMakes
@PabloMakes 3 жыл бұрын
Thanks a lot! I’m glad people find them helpful
@batuhantugrul1966
@batuhantugrul1966 4 ай бұрын
cat camera is awesome
@ozgurgurbuz
@ozgurgurbuz 11 ай бұрын
Hey Pablo this was such a nice tutorial. Also how would you make this effect on any leaf textured materials? I should use the Alpha value from the leaf texture.
@2Spline
@2Spline 3 жыл бұрын
Handy effect! Always a little strange when you can clip your camera into a character and see their eyes and mouth. D: Mildly spooky, and can be avoided with the power of dithering! Glad everything worked out, maybe need a !ditherCats for later.
@PabloMakes
@PabloMakes 3 жыл бұрын
For a moment I thought you were saying it was weird to not see the inside of theyir heads haha disrespecting tradition :P
@2Spline
@2Spline 3 жыл бұрын
@@PabloMakes ahaha exactly! Reject dithering modernity, embrace spooky clipping. 👁👄👁
@thingsofgaming2424
@thingsofgaming2424 2 жыл бұрын
I like this ! 喜欢死这个了 good nice
@mrslake7096
@mrslake7096 2 жыл бұрын
Thanks
@martinmaurer
@martinmaurer Жыл бұрын
For me it worked better connecting the dither node to the materials alpha clip value and then connect the "Dissolve" value to the "X" input of the dither node. That way I could use the texture alpha independently. Seems to be the recommended way in the Unity documentation. Is there a benefit in your approach?
@TheKiwiCoder
@TheKiwiCoder 3 жыл бұрын
Cool :)
@DonEsteban3D
@DonEsteban3D 2 жыл бұрын
Boczek! Ty żyjesz..
@SpaceMango
@SpaceMango 2 жыл бұрын
Hi! This works great :) Just wondering if there's a possibility to have it affect the entire mesh and not just pivot(based on distance)? I'm making a house building game where the pivot is in the corner of a wall so the dither is a bit uneven since the focus is on the pivot itself. I know you mentioned that in the video and was wondering if there's a workaround? I assume you can put the wall itself in an empty gameobject to change pivot but my building system doesn't like that haha
@PabloMakes
@PabloMakes 2 жыл бұрын
You can add a vector parameter and add it to position and that way you can “move” the pivot. You can also compare the distance not to the objects position but to the vertex, which will make parts of your object dither, not the whole thing uniformly, which tend to work well for larger objects like walls, but really depends on what you are making. Hope that helps
@fukukyun78
@fukukyun78 Жыл бұрын
This shader works for small objects, but it's better to use position with large objects... I have a large 2D object for fog, i want it to fade when the player gets close, i got it sorta working, but it fades really weirdly, like it's too sudden, it's just a cutout in the object. Any idea on how i could get it to sorta smoothly fade out with the position, instead of just instantly cutting off?
@stevphiericardo2790
@stevphiericardo2790 Жыл бұрын
now that motionvector and taa added to unity, we can do taa dithering with shadergraph now i think :)
@JackLaPlante18
@JackLaPlante18 3 жыл бұрын
Great tutorial! Do you know if there is a way to not effect the shadow of the object when it fades out? Is it possible to keep the 'normal' shadow even when it's dithered?
@PabloMakes
@PabloMakes 3 жыл бұрын
Glad you liked it! Off the top of my head, mind you I haven’t tested this, I think you could go in meshrenderer component and disable shadow, then make a copy of the whole thing and set that one to shadow only. Hope that helps
@aleksihiltunen7063
@aleksihiltunen7063 2 жыл бұрын
In case someone is interested. In shader graph everything you do (change vertex position, alpha clip pixels etc.) applies to shadow pass as well. You can avoid that by using Custom Function that handles the shadow pass the way you want. So before you put your node to Alpha Clip Threshold block, you can add custom function that takes in float, lets call it In, and outputs float, lets call that Out. In that function you can use #ifdef UNITY_PASS_SHADOWCASTER to output whatever you want for the shadows (if you want the shadows to be always rendered, you can do Out = 2; so no ”shadow pixel” exceeds that threshold) and in #else you can just return the In value by doing Out = In; . I think you have to put #endif after that to indicate end of the if chain. Hope this helps
@travislee6988
@travislee6988 2 жыл бұрын
I follow the same node and got little confuse 😂,Why when the dither node Value=1 and connect to alpha node,the object have already transparent🥲🥲do you know how to fix this problem?
@noname-te2gx
@noname-te2gx Жыл бұрын
hey, I tried to do exactly what you did but mine didn't disappear when zoomed in, I know this is a lot to ask for but it would be great if you could just let people download the shader, thanks!
@brunopinheirobrazil5352
@brunopinheirobrazil5352 Жыл бұрын
I have a character that have more than 1 material/mesh, 1 for the body and other for the eyes, Is there any way I can apply this dither and mask for example the eyes of my character? So it don´t looks like they are popping out when she fades?
@VykxTre
@VykxTre 3 ай бұрын
I think for that you need to do 2 things: 1 have the same pivot point(You can expose a vector position and set it manually via c# script) 2 Use stencil buffer to discard alphas behind
@papercrease7308
@papercrease7308 3 жыл бұрын
Do you have to apply this to everything individually by hands?
@PabloMakes
@PabloMakes 3 жыл бұрын
The material needs to be applied to any object you want to fade. Generally you wouldn’t do all, for example, I think Genshin only does it for characters and tree tops
@magrin1497
@magrin1497 3 жыл бұрын
So Pablo is a Ganyu simp? haha Saludos y que bonitos gatos
@PabloMakes
@PabloMakes 3 жыл бұрын
Can’t deny it anymore!
@twelveminusone
@twelveminusone 3 жыл бұрын
Is it possible to use this same approach with sprites? I've got a lit sprite shader that's already handling a lot of other functionality and this would be wonderful to add to it. However, when I add Alpha and/or Alpha Clip Threshold nodes it completely borks the shader. Like, grays out all the other nodes and nothing gets shown in scene or game mode. Obvious shader noob here, any guidance is appreciated! Love your vids.
@PabloMakes
@PabloMakes 3 жыл бұрын
Hey Evan, Sprite lit shaders don't use alpha clipping, the reason we use alpha clipping in 3D is to avoid using trnasparency which can be really complicated in 3D. Buuut on 2D transparency is super easy, so we use it all the time. You cna use this dither shader on a sprite, just do the exact one form the video and then on the ALbedo property change it's refrence to _MainTex which is the name that sprites expect. That bieng said, you probably should use transparency since you are in 2D land. Hope this helps o/
@twelveminusone
@twelveminusone 3 жыл бұрын
@@PabloMakes Man thank you for responding and I promise I'm not trying to turn your comment section into my personal helpdesk but I'm trying to follow what you said here but I'm unsure where to plug in the output of the remap node to have it control the alpha of the sprite. I tried pumping it into the alpha channel of a combine node but that didn't seem to work. I checked the docs and it looks like remap node returns a float between the x and y values of the InMinMax so it should be doing *something* but instead my sprite is just empty. Thoughts?
@PabloMakes
@PabloMakes 3 жыл бұрын
So under graph settings, you changed it to Sprite Lit? If so, then you should have Alpha on the fragment, you can go from the remap to a One Minus node, because Alpha 1 is full visibility but Alpha Threshold 1 is no visibility. and the result of that you can hook to the alpha. An easy wya to see alpha works is you cna hook a float node to it and jsut input some variables and see if it is fading.
@twelveminusone
@twelveminusone 3 жыл бұрын
@@PabloMakes I tried all of that and just can't get it to work. Certainly user error. I really appreciate you trying to help though! Edit: literally after I typed that I figured it out. Thanks for sticking with me!
@nik9094
@nik9094 3 жыл бұрын
This was just an excuse to showoff your Ganyu wasn't it u.u Jokes aside, nice stuff! Good tutorial.
@PabloMakes
@PabloMakes 3 жыл бұрын
Damn, was it that obvious?
@nik9094
@nik9094 3 жыл бұрын
@@PabloMakes might be just because I don't have her, but yes! Probably...
@Maxime66410
@Maxime66410 11 ай бұрын
idk why Dither don't work for me.
@fast07hzmc401
@fast07hzmc401 2 жыл бұрын
The best reason "It has waifus" (;
@PabloMakes
@PabloMakes 2 жыл бұрын
Am I right or am I right?
Dissolve effect in Shader Graph
19:23
PabloMakes
Рет қаралды 30 М.
Make 'Fake' Transparency Using Dithering | Unity Shader Graph
5:42
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 13 МЛН
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 84 МЛН
Despicable Me Fart Blaster
00:51
_vector_
Рет қаралды 27 МЛН
Twitch integration with Unity Tutorial
10:48
PabloMakes
Рет қаралды 14 М.
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,5 МЛН
DISSOLVE using Unity Shader Graph
10:33
Brackeys
Рет қаралды 670 М.
Flow Map tutorial with Unity Shader Graph
28:52
PolyToots
Рет қаралды 52 М.
Refraction ShaderGraph tutorial for Unity
16:46
PabloMakes
Рет қаралды 11 М.
URP Near Camera Fade Materials - Dither Effect in Unity
6:12
Info Gamer
Рет қаралды 11 М.
The Best Unity Assets (according to this one guy)
6:39
PabloMakes
Рет қаралды 6 М.
Fade Objects Near the Camera in Unity using Shader Graph
15:15
OpenAI's New SearchGPT Shakes Up the Industry, Google Stock CRASHES!
10:10
Look, this is the 97th generation of the phone?
0:13
Edcers
Рет қаралды 6 МЛН
Зарядка-брелок для Apple Watch
0:39
Rozetked
Рет қаралды 263 М.
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
VA-PC
Рет қаралды 2,4 МЛН
Как бесплатно замутить iphone 15 pro max
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 6 МЛН