Тёмный

Object Blending with Dither Fade, Pixel Depth Offset and Distance Fields 

tharlevfx
Подписаться 15 тыс.
Просмотров 58 тыс.
50% 1

This week I show you how you can use Dither Fading and Pixel Depth Offset to blend solid objects together and then also how you can use Distance Fields to mask this automatically.
If you want to learn more about Materials in Unreal Engine check out my new course here:
tharlevfx.gumr...
If you have any questions about Game Art VFX or the Unreal Engine then email me: tharlevfx@gmail.com
Or you can find more tutorials on my website: www.tharlevfx.com
or check out my work on the Unreal Marketplace:
www.unrealengi...
or follow me on Twitter: @tharlevfx If you'd like to support the channel you can do so on Patreon: www.patreon.com/tharlevfx

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

 

16 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 74   
@davidsawchak4575
@davidsawchak4575 2 года назад
I was about to just give up on this after a day of searching for a way to do it. Cheers!
@S-I-T
@S-I-T 5 месяцев назад
This may not be the place to ask this question but here goes. Embergen renders out really nice depth maps for flipbook renders. Is there a way of using these to essentially "Push and Pull" pixels in screen depth buffer in UE5? Hope the question makes sense. I'm very new to UE5 (propietry engines and whatnot in the past) and your Udemy videos have been a godsend. thank you :)
@tharlevfx
@tharlevfx 5 месяцев назад
What would be the result you’re hoping to get? You could certainly use the depth texture with depth fade for a nicer intersection - check my latest video from yesterday
@divyabaranwal6825
@divyabaranwal6825 4 года назад
Thank you so much. I saw this in another tutorial but you teach it so better.
@AndrewWeirArt
@AndrewWeirArt 5 лет назад
Gods work! great stuff. I found this in the paragon assets, but i dont think it used distance fields. either way. i forget how to use it every time. this vid saved me! :)
@baorichard4345
@baorichard4345 4 года назад
Someone buy this dude a great mic! Nice video though~
@tharlevfx
@tharlevfx 4 года назад
Bao Richard I’ve just got one! Hopefully should be better from now on :)
@AdelaideBen1
@AdelaideBen1 2 года назад
@@tharlevfx I am so grateful for your videos, but at the same time watching them back now makes me want to pull the hair (out of my ears)...I couldn't understand the audio drop-outs and didn't know if it was a RU-vid artefact or from your recording. Anyway, thanks for all your efforts.
@malindurashmika8386
@malindurashmika8386 10 месяцев назад
Great video so far. Thank you
@rendermanpro
@rendermanpro 4 года назад
Nice! (but to show the effect you could use different colors, not white on white :) )
@tharlevfx
@tharlevfx 4 года назад
renderman.pro thanks for the idea, I’ll try and show this sort of thing off better next time!
@xeoncat
@xeoncat Год назад
In the end you connected it to the PDO output, but mine only works in Opacity Mask
@carlvalleray
@carlvalleray 4 года назад
Hi tharlevfx, thank you for the tutorial!
@n1lknarf
@n1lknarf 4 года назад
please, get rid of the noise gate in your mic. sometimes your voice doesn't even come forth
@tharlevfx
@tharlevfx 4 года назад
thanks for the feedback - i've turned it off for now but i live in a busy area so hopefully there's not too much background noise. Hopefully i can upgrade my setup soon and get a better mic!
@Firespectrum122
@Firespectrum122 3 года назад
I'm not sure if you are still doing tutorials but here is a question - imagine two meshes - Mesh A and Mesh B, which intersect. Is there a way to make the area on mesh A transparent based on where Mesh B intersects it?
@tharlevfx
@tharlevfx 3 года назад
Haven’t for a while but will again soon hopefully! And yeah - check out the custom depth buffer - Tom looman has a great article about it iirc. Or possibly just a world space mask depending on your use case. I made a video about them.
@remon563
@remon563 3 года назад
super helpful mate. Your tutorials are the best :)!
@Legomanshorts-c5o
@Legomanshorts-c5o Год назад
whoa distance fields might be quite useful in refraction keeping the water line stable
@tharlevfx
@tharlevfx Год назад
Generally I used depth fade for that but distance fields would totally work too
@Legomanshorts-c5o
@Legomanshorts-c5o Год назад
@@tharlevfx which would be more performant do you think?
@tharlevfx
@tharlevfx Год назад
@@Legomanshorts-c5o I’m not 100% sure - you would have to do some tests. Distance fields are quite cheap to access if you’re happy paying the disc space to enable it. Probably they’re both so cheap it’s unlikely to make a big different in all honesty.
@AllmakeDesigner
@AllmakeDesigner 2 года назад
Hi. How to get smooth edge when i use masked material and ditter temporal AA node. This is good for optimize but i need more smoothest edge because i need smoke
@tharlevfx
@tharlevfx 2 года назад
in that case you would just have to use a transparent shader and pay the extra shader cost. Temporal dither AA is a nice technique for some things, but not suitable for every shader
@caiyan26
@caiyan26 3 года назад
hi! fast forward to year 2021. Is this technique working with Raytracing? Thanks!
@tharlevfx
@tharlevfx 3 года назад
I’ve not tried with raytracing I’m afraid but I believe pixel depth offset should still work. There’s actually better blending techniques using runtime virtual textures - look out for a new video soon!
@suitoha9336
@suitoha9336 3 года назад
I am profiling my game, and stuck with high translucency and lights numbers. Do you have any ideas on how to profile and identify the culprit?
@tharlevfx
@tharlevfx 3 года назад
Check the shader complexity view mode for where you have areas of high overdraw - and the gpu profiler should help identify which lights are expensive
@suitoha9336
@suitoha9336 3 года назад
@@tharlevfx Thank you for the answer! Lights? I thought Translucency was related to materials and not the lights??
@tharlevfx
@tharlevfx 3 года назад
@@suitoha9336 translucency is mateirals - sorry you mentioned lights too.
@suitoha9336
@suitoha9336 3 года назад
@@tharlevfxOh, yeah! I decided to turn off all lights in the particle effects. And, try to add gradually while measuring. Optimization graphics for a newbie is very overwhelming.
@tharlevfx
@tharlevfx 3 года назад
@@suitoha9336 if you check out the reading list on my website : tharlevfx.com there’s some links to articles about optimisation. But yeah, it can get pretty complex!
@norbertswierczek7749
@norbertswierczek7749 3 года назад
Hi! It's all great but unfortunately it doesn't seem to work with geometry that doesn't have any volume (e.g plane or landscape). Even if the object is cube, the effect is different depending on the cube scale (if its too thin it doesnt work at all). Is there any way around it? Maybe some AO based calculation?
@tharlevfx
@tharlevfx 3 года назад
Could you try and use a distance field proxy mesh to add to the distance field, even if the object doesn’t have volume?
@tharlevfx
@tharlevfx 3 года назад
Pixel offset and dither fade should still work no?
@norbertswierczek7749
@norbertswierczek7749 3 года назад
@@tharlevfx Well, offset kinda works when its value is below 0, but what it does it changes the overall color of whole object (in this example sphere). In general I'd like it to be universal setup, so I can't just create proxy mesh for every object I need, It would take ages in some cases :D I ended up with leaving the "Affect Distance Field Lighting" turned on and working with this noisy thing that's generated intsead of smooth gradient - it's still better than dithering all over the object :)
@callandekeijzer4128
@callandekeijzer4128 5 лет назад
Hey Tharle, thanks for the video. would you care to explain what the difference between the Saturate Node is and a regular Clamp?
@tharlevfx
@tharlevfx 5 лет назад
Thanks for the question, I’ve actually just covered that in my latest video - Unreal Shader Math 102. Check that out and let me know if you have any more questions!
@indust64
@indust64 5 лет назад
Thanks brother, this is the clearest guide I could find
@SouthernHunter
@SouthernHunter 4 года назад
Hi I'm new to UE4 and I can't seem to find a node called "Offset", could it be know as anything else?
@tharlevfx
@tharlevfx 4 года назад
Southern Hunter it’s probably a Scalar Parameter that I’ve named Offset. Hold S and click to create one. It’s a value you can name and edit to make your materials
@SouthernHunter
@SouthernHunter 4 года назад
@@tharlevfx thanks so much
@BigfootU
@BigfootU 3 года назад
Sooo helpful! Thank you sir!
@allanportilho
@allanportilho 3 года назад
Thank you so much, very helpfull
4 года назад
Thanks! Amazing tut
@suitoha9336
@suitoha9336 3 года назад
Can this be used with lerp to the alpha value? I've tried it, but I'm getting such a low resolution, pixelized effect :(
@tharlevfx
@tharlevfx 3 года назад
Particles can read from distance fields but not write to them. Generally particles are translucent or additive and you just use a depth fade to deal with blending. There’s also a new technique with Runtime Virtual Textures, I’m just putting together a video on them now.
@suitoha9336
@suitoha9336 3 года назад
@@tharlevfx Thank you for the detailed response! I actually edited my question to ask about "lerp the alpha" instead of using it with particle effects. Do you have any ideas on lerping alpha with Masked blending? I have another question that I put in another comment.
@tharlevfx
@tharlevfx 3 года назад
@@suitoha9336 masked will always just be on or off so you need to use translucent or dither fade to get a nice soft transition
@suitoha9336
@suitoha9336 3 года назад
@@tharlevfx Thank you for the reply! Is there a difference between translucent and dither fade in terms of calculation costs?
@tharlevfx
@tharlevfx 3 года назад
@@suitoha9336 dither fade with masked material will be much cheaper but there's a big visual difference between the two.
@aliceduarte1034
@aliceduarte1034 3 года назад
follow all the steps but my mesh is getting this awful shaddowing :( and when I turn on distance field lighting gets better (??) haha
@SouthernHunter
@SouthernHunter 4 года назад
Do you have a fix for that banding in the z-depth?
@tharlevfx
@tharlevfx 4 года назад
Southern Hunter if you mean the skybox then it shouldn’t be an issue - it’s just the way large numbers are displayed
@Mr_Tea_Rexx
@Mr_Tea_Rexx 3 года назад
know this is old but wish the mic would stop cutting out
@Dhieen
@Dhieen 2 года назад
very good!
@kegssparx8086
@kegssparx8086 3 года назад
Very helpful!! =D
@metekavruk_Alanya
@metekavruk_Alanya 3 года назад
The conclusion is that we should not use this method for many objects. I was looking for a solution for rocks blending nicely with terrain - i mean thousands of them.
@tharlevfx
@tharlevfx 3 года назад
take a look into runtime virtual textures - they work with landscapes and are the best way to do material blending these days - i've not got a video on them yet, but check out Ben Clowards youtube channel, i think he just covered them
@blouko
@blouko 5 лет назад
This is amazing, thank you so much😊
@emranbayati1869
@emranbayati1869 Год назад
Loved your video but the sound was constantly getting on and off
@goldennboy1989
@goldennboy1989 3 года назад
Doesnt work for me. Sphere just stays black o.O
@e2dx
@e2dx 2 года назад
Well well
@misseren
@misseren 2 года назад
Hi Thanks for the useful tutorial, I tried it in UE5 but it didn't work, it had the same behavior until 10:36, but as soon as I set it to Opacity mask, the whole sphere became translucent and it was displayed on the back side. What should I do? Here is the video : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-3YO78BYjU_w.html
@misseren
@misseren 2 года назад
nvm, resolved by changing the version to 5.0.2 :)
@RB-hd4vr
@RB-hd4vr 4 года назад
EH UH EUH EH
Далее
Object Space Gradient in UE4
15:40
Просмотров 61 тыс.
10 FREE DEAD BOXES?! #deadgame
02:26
Просмотров 7 млн
UE4 DF Terrain Blending:  How, why, and why not
20:33
Просмотров 44 тыс.
Dynamic Gradients in Unreal
21:36
Просмотров 27 тыс.
Advanced Vertex Painting Techniques
20:19
Просмотров 47 тыс.
Why Solo Developers Should Use Unreal
9:51
Просмотров 399 тыс.
Building advanced effects in Niagara | Unreal Engine
28:54