No video

Distance Fields (Part 1) | 5-Minute Materials [UE4/UE5]

  Рет қаралды 108,622

PrismaticaDev

PrismaticaDev

3 жыл бұрын

-- UE5 FIX for blocky Distance Fields (IF NOT USING LUMEN) --
Go to your DefaultEngine.ini file and put the following 2 line in [/Script/Engine.RendererSettings]
r.AOGlobalDistanceField.NumClipmaps=1
r.AOGlobalDFClipmapDistanceExponent=1
Hopefully this will be fixed in a future version - since Lumen uses very sparse DFs for Global Illumination across large distances, the material node got messed up and doesn't counteract it.
--------------------------------------------
Today we're looking at an amazing property that can be accessed within materials in Unreal Engine called Distance Fields!
Distance Fields can be used to create ripples in your water, blend surfaces together and to create SLIMES! There are some limitations with distance fields and you need to be careful about what emits distance fields and what doesn't, especially when you're using Dynamic Skylight/Distance Field Ambient Occlusion.
Enjoy!
----------------------------------------
Patreon: / prismaticadev
Discord: / discord
Twitch: / prismaticadev
Twitter: / prismaticadev
KZfaq: / prismaticadev
----------------------------------------
Computer Specs:
Ryzen 3900x 12-core CPU
MSI Geforce RTX 2080 Super
64GB Corsair RAM
One of those fancy nvme m.2 SSD's
Programs of choice:
Unreal Engine 4 - (Game Dev)
Blender 2.8 - (Animation and Modelling)
OBS - (Video/screen capture)
Davinci Resolve - (Video editing)
Adobe Photoshop - (Graphics and Texturing)
Quixel Mixer - (Texturing)
ProTools 11 - (Compositions and mixing)
OldSchool Runescape - (Chillax time)
Filmed using:
Sony A7s2 body
Sony 24-70mm f/2.8 GM lens
Yonguo YN360 LED's for colour
Yongnuo YN760 chip LED w/ Godox softbox for key
My lovely cats names are Boycat, Girlcat and Ladycat :)

Пікірлер: 221
@wackcrewpeeps
@wackcrewpeeps 2 жыл бұрын
Make sure to enable "generate distance fields" in your project settings or else this won't work in 4.27
@user-li9ep5cb6n
@user-li9ep5cb6n 2 жыл бұрын
This thing tormented me for 3 hours. I always thought I did something wrong. Thank you for saving me
@wackcrewpeeps
@wackcrewpeeps 2 жыл бұрын
@@user-li9ep5cb6n You're welcome!
@cyqry
@cyqry 2 жыл бұрын
Absolute legend.
@lucasflamein9080
@lucasflamein9080 2 жыл бұрын
merci monsieur macron..... juste merci...
@cloudandwind
@cloudandwind 2 жыл бұрын
is really important thank you so much
@staror890
@staror890 3 жыл бұрын
Wow, Seriously good tutorial. Like A+ . Most tutorials just hold your hand while showing you how to make one narrow thing (i.e. How to make a water ripple effect) But in your one you really explained the foundation of the effect and left the creativity up to us. I really like that approach !
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Cheers Rory! I definitely prefer to learn that way, hence why I teach that way haha. I'd prefer people to learn how to do something, not just learn how to follow instructions!
@gamecreator7214
@gamecreator7214 2 жыл бұрын
@@PrismaticaDev Love the style, now I actually start to understand what is happening and why. This is education.
@lacouture3
@lacouture3 Жыл бұрын
This has been the clearest explanation of distance fields in Unreal I've seen. Thank you!
@steliosstavropoulos499
@steliosstavropoulos499 3 жыл бұрын
tutorial king of youtube!!!!
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Haha you're the king of my comment section
@vulgaria4795
@vulgaria4795 Жыл бұрын
ok,.... guy,.... this is amazing!, you solved my 2 year long question. Fyi i opened this tab and didn't watch this video for weeks and finally got around to it,.. so extremely glad I did!
@Dapier
@Dapier Жыл бұрын
For UE5 users, if you want the blob thing to work, you have to use absolute world position node, and then you wanna plug in only the z axis to the position node link in DistanceToNearestSurface node.
@baronlanteigne
@baronlanteigne Жыл бұрын
it's the other way around for me.. but I got some weird lighting issues whenever I use the 1-x or try to remap the mask value after the saturate node...
@RmaNYouTube
@RmaNYouTube 2 жыл бұрын
I never understood mesh disntance fields up until now, you're really a good teacher.
@davidmettetaljr6461
@davidmettetaljr6461 2 жыл бұрын
The last bit for metaballs and simulated mesh deformation will be great for blending the base of large rocks or trees into the landscape. Just have to figure out how to make sure it only reacts to landscape and not other objects and it should work.
@Max_Stupa
@Max_Stupa Жыл бұрын
Dude, this is so useful. You saved me a lot of time. Many thanks to you! Disabling affecting distance field solved all my issues.
@SrSKaTiZSrS
@SrSKaTiZSrS 8 күн бұрын
That river looks awesome. Would love to learn more about how to do that.
@realyoyoweb
@realyoyoweb Жыл бұрын
Wow thanks man this is crazy the amount of things i just unlock in my project just with THIS video. I was struggling with poor foliage effect just because of a "substract" instead of a "divide"
@StevenDiLeo
@StevenDiLeo Жыл бұрын
This looks like a blast to play with. Thank you for the informative vid ❤
@AdelaideBen1
@AdelaideBen1 2 жыл бұрын
Great vid... would be good to talk about the costs of these nodes as well.
@buddelexperte5956
@buddelexperte5956 3 жыл бұрын
All your little videos help me so much understand materials in UE4
@DerClaudius
@DerClaudius 2 жыл бұрын
This is the first video I found of you. Unity dev here. Great tutorial, thanks! Subbed.
@Baleur
@Baleur Жыл бұрын
I cant get this to generate properly at all. In 5.1 project, have the distance field generation in project settings, have all meshes set to generate, have rebuilt level several times, saved all, rebooted, no difference.
@bento_th
@bento_th Жыл бұрын
did u find a solution?
@NickFromPlanetEarth
@NickFromPlanetEarth 4 ай бұрын
I know this is an older video, but I was wondering if this would work in a lava material to create a blue emissive when objects interact with said lava? Great video! thanks!
@PrismaticaDev
@PrismaticaDev 4 ай бұрын
Sure could! However keep in mind you won't get any "trailing" effects, only the effect where the object currently is
@pto2k
@pto2k Жыл бұрын
04:41 for me with UE5, there is pixelation glitches bewteen the bandings and the solid color . I read somewhere that Distance Field in UE5 is broken. Is that still the case, or am I missing something?
@fuglong
@fuglong 11 ай бұрын
I can't even get distance fields to generate in 5.3
@rauljaramillo923
@rauljaramillo923 3 жыл бұрын
Thank you Charlie!!!! I'll try to find a way to make foliage cull when near a distance field :)
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Good idea! I actually have a video about Grass Culling using RVT, but this would also work as long as the Landscape wasn't emitting distance fields :)
@clorent
@clorent Жыл бұрын
epic pro gamer tip; if yer fuckin around with dynamic meshes (which don't automatically generate distance fields) for procedural and random landscapes etc., you can allocate a static mesh file to save it to which it will generate distance field for. be careful as this will overwrite the file for whatever mesh you have referenced, but will keep tags and settings. I wasn't able to find any official documentation on how to do DF's for dynamic shit so I thought i'd leave this here (hectic tutorial btw very good!)
@xabunoxx2850
@xabunoxx2850 3 жыл бұрын
Another fantastic video, distracting me from my project with dozens of new ideas. Keep up the great work!
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Cheers Xab haha. It's not a distraction if it makes it in to the final game! ;)
@mariobros2867
@mariobros2867 2 жыл бұрын
Thanks for keeping this tutorials short and sweet. You got a new subscriber!
@jtm6186
@jtm6186 2 жыл бұрын
Extremely useful tutorial! Great job!
@IllyasArt
@IllyasArt 3 жыл бұрын
Holyshit I just got like 100+ different ideas with this video. Please make more of these videos I beg you!
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Glad to hear it!! Would love to see what you come up with :)
@psy237
@psy237 2 жыл бұрын
haha great usecase :'D blob the sidekick who melts with anything surrounding him. attach two eyes and u got a character :'D :'D perfect explanation and demonstration how distance fields look/what they exactly are, my imagination looked a bit different, thanks!!
@saskia9934
@saskia9934 Жыл бұрын
prismaticaDev? more like the G.O.A.T Dev
@eligijuspranskunas3509
@eligijuspranskunas3509 Жыл бұрын
how to make ripples to react to the character?
@lorryburger8165
@lorryburger8165 3 жыл бұрын
Awesome! I didn't know i needed to know this!
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Haha that's me every single day when I find out something cool and do that instead of work on the game :))
@JumboTTV
@JumboTTV 3 жыл бұрын
Love you bro! haven't manage to catch your twitch stream over the last week hope you are doing as good as ever :)
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Thanks Snake
@JumboTTV
@JumboTTV 3 жыл бұрын
@@PrismaticaDev thats cool! I udnerstand probably more than anyone, I probably ask the most slightly off topic questions xD excited to catch the next one :)
@NordBearHard
@NordBearHard 3 жыл бұрын
Hell yeah my dude, keep it up, that's so cool
@melpeslier
@melpeslier 3 ай бұрын
For the distance field, you need scalability to be set to medium at least, in low it does not work
@Maniac-Design
@Maniac-Design 3 жыл бұрын
It's awesome ! I want to see how you made the turbulence waves with the rock
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
I'll be covering it in the future when I do a full run-down of my water system (once it's complete)
@Maniac-Design
@Maniac-Design 3 жыл бұрын
@@PrismaticaDev Perfect, thank you ! :)
@beaver_stealer
@beaver_stealer 2 жыл бұрын
your knowledge astounds me
@enriquemunoz6148
@enriquemunoz6148 3 ай бұрын
Great explanation!
@ZahhibbDev
@ZahhibbDev 3 жыл бұрын
As always Charlie, great and informative video! ps: give Boycat, Girlcat and Ladycat some snuggles since you took _their_ seat! ;)
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
No problemo Zahhibb :) Haha I'll give them some extra cuddles... As if I wouldn't anyway :P
@AhriCRose
@AhriCRose 7 ай бұрын
The Runescape music xD
@buddelexperte5956
@buddelexperte5956 3 жыл бұрын
This doesn't sound nice but I think it's nice that you aren't that big of a YTer, so we have your content all for us
@travisadkin5782
@travisadkin5782 2 жыл бұрын
Hi Charlie, could you show the decal aspect at the start of the vid maybe in a decals breakdown?
@KryyssTV
@KryyssTV Жыл бұрын
This reminds me of when you see shows revealing how magic tricks are done. All this time I though that "sticky" meshes must be really complicated to produce and then I find it's actually very basic stuff lol
@Fokkusu
@Fokkusu 3 жыл бұрын
wow this is really really interesting, I'm going to make some good use of this knowledge thanks a lot ^^
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Keen to see what you do with it! :)
@mjesensky2760
@mjesensky2760 2 жыл бұрын
Amazing! This looks like so much fun. Thank you very much for your tutorial. Liked and subscribed.
@ricardovega1407
@ricardovega1407 3 жыл бұрын
Majestic! How about going from solid to liquid to gas? Have a blobby day!
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
I actually have an interesting idea to do that! Hahaha all within 1 material. Would be interesting
@tehsimo
@tehsimo 3 жыл бұрын
This is very interesting!
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Thanks Simo! I love distance fields haha there's so much possibility. The DF algorithm also got a makeover in UE5 so it should be more efficient and more accurate as well!
@Deck_Dynasty
@Deck_Dynasty 3 жыл бұрын
I loved this video.
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
I loved you.
@crakatinni
@crakatinni Жыл бұрын
Hey mate great content! Do you use world position offset to create ripples too or just create the illusion with refraction and emissive color?
@PrismaticaDev
@PrismaticaDev Жыл бұрын
All of them, actually! Haha
@crakatinni
@crakatinni Жыл бұрын
@@PrismaticaDev brilliant! I find that the emissive color and WPO don't sync up exactly if I plug the same material function containing the distance field sine function into their respective result nodes 🤔
@radosawzaremba7963
@radosawzaremba7963 2 жыл бұрын
Ok, that seems great and working in UE4, but I got problem in UE5 to achieve it, as as soon as I add distance field node(DistanceToNearestSurface) there is pitch black base additional geometry that stays still and other one following all the world position offset as should. So duplicated geometry in addition to offset one.
@grahambeaumont7172
@grahambeaumont7172 2 жыл бұрын
Awesome!
@TY_Blender
@TY_Blender Жыл бұрын
so simple so easy so nice
@jhebadiasprunklefunk9243
@jhebadiasprunklefunk9243 2 жыл бұрын
Hey Charlie, on distance fields I was wondering if you know any way to improve the quality of the fall off? Like if you divide it by too high a number then it becomes jagged the further away from the object casting the DF is.
@RainsalotProductions
@RainsalotProductions 2 жыл бұрын
The same thing with me... I need this effect to stay consistent within any distance from the camera. Have u figured out a way to get this to work?
@Supernaturalcloak
@Supernaturalcloak 3 ай бұрын
I was looking for a way to pass through a force field with some glow around the character. I think this is just the thing. Only day 3 since downloading unreal, so... we'll see if this is too advanced for me or if I can pull it off. 🤣
@PrismaticaDev
@PrismaticaDev 3 ай бұрын
Keep in mind that skeletal meshes don’t emit distance fields, however you can use a dummy mesh over the top of your character with a masked material set to 0 opacity which will still emit a distance field
@danbellian5617
@danbellian5617 2 жыл бұрын
Hey all, that awesome blob effect at 6:40 appears to not work in Unreal Engine 5 official release. Position offset referencing distance fields causes bizarre ghost-like rendering bugs. Tested by copy-pasted nodes from UE5 to UE4 blank projects, works properly in UE4, does not in UE5. Influence distance field set to false on the static mesh. Can anyone else confirm this?
@DerPolee
@DerPolee 2 жыл бұрын
i tried to create this blob effect right now and i can confirm that its not working in ue5.
@Supernaturalcloak
@Supernaturalcloak 2 ай бұрын
Can you make a video making a clear wall (forcefield) that glows blue when an object goes through it? Its for a spaceships forcefield that separates space and the ships hanger. Allowing ships to go through with a glowing blue (or any color) light that outlines the ships as they enter. I keep trying and can't seem to get it to look cool. And I cant get the glow to be a color other then white or black. And... I can't get the forcefield to be clear in the middle. It would be ok for it to glow around the edges, where it meets the ships distances field, but I want the middle to be clear... Ok, enough crying from me. Thanks for your content, I'm making my way through your videos and they are a great source of knowledge!
@sbwhity
@sbwhity 2 жыл бұрын
Could it be that this doesn't work with UE5? My distance fields look all messed up in the viewport when I turn it on the visualize. It's mostly white and kinda looks like a bad AO bake. Also i tried doing the edges with the sine wave and for me the whole object just blinks on and off. hmm...
@subrootsound
@subrootsound 3 жыл бұрын
This is amazing stuff, thank you so much!
@HiChunTaChen
@HiChunTaChen 11 ай бұрын
still dont know what distance filed is. what is the field, distance between each point to what?
@thesystemera
@thesystemera 3 жыл бұрын
Legend! Thanks from NZ
@slothsarecool
@slothsarecool 6 ай бұрын
I wish the documentation described what these nodes actually return numerically. I'm a bit confused why dividing it feathers out the effect, if a particular pixel is some distance away, wouldn't multiplying it increase its influence?
@PrismaticaDev
@PrismaticaDev 6 ай бұрын
The node is returning the Distance to nearest surface, so when the mesh is 100 units from a surface it will return 100, and towards the mesh it will be 0. Since we want to operate within 0-1 space, we divide it by 100, which turns 100 in to 1, 50 in to 0.5, and 0 stays at 0. Now that we're in the 0-1 range, we can flip it over (OneMinus) and now the white part is near the mesh, and the black part it away from the mesh. Hope that helped! It might be worth checking out my Math Nodes video as well
@PrismaticaDev
@PrismaticaDev 6 ай бұрын
Oh and to clarify, 1 unit in worldspace = 1cm
@slothsarecool
@slothsarecool 6 ай бұрын
@@PrismaticaDev ahh ok that makes sense, thanks! Also I subscribed on Patreon, really appreciate all your videos! 😎
@alf3977
@alf3977 3 жыл бұрын
Always Pog!
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Cheers Alf
@auaukiko.oficial
@auaukiko.oficial 3 жыл бұрын
That is so cool thank you
@itanshi
@itanshi 3 жыл бұрын
what might prevent the gradient from being applied to the ball and the blob animations? I have a white squashed ball that is retaining its shape. ty At 2:55 its just a black sphere for me.
@Effet666
@Effet666 3 жыл бұрын
As I got, you need to activate "Generate Mesh Distance Field" into the project settings
@logan_paul
@logan_paul 2 жыл бұрын
unfortunately I did not understand, but how to make the coloring effect like in 4-8 seconds?
@SanthoshKumarfojoheartthrobe
@SanthoshKumarfojoheartthrobe 2 жыл бұрын
i'm working on it too bro. Any luck getting it to work? I think it uses render targets. but not sure how to pass information to the render target
@DELTA4785
@DELTA4785 3 жыл бұрын
Awesome tutorial! Funny, in-depth and inspiring! Can you increase the max distance of a distance field? (ex. when you are dividing at 2:50 resulting in a much wider gradient)
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
It seems like there is SOME limit, not 100% sure what it is though or if it can be broadened. If you go into the DistanceField viewer you can get a rough idea how far they go
@Qwert_Zuiop
@Qwert_Zuiop 2 жыл бұрын
I love these tutorials! Explained in such a great way and also short enough to bring yourself to actually watch the whole thing BEFORE you get stuck somewhere ;) Just one question, is there a way to make the effect last longer, even when the mesh is already somewhere else, like as an "afterglow" (like in the video of yours with the grass that glows when you step on it)?
@PrismaticaDev
@PrismaticaDev 2 жыл бұрын
Hey Linda! Unfortunately I can’t think of a way to do an afterglow effect without the use of Render Targets, or a non distance field approach like an array of sphere masks generated by the character
@travisadkin5782
@travisadkin5782 2 жыл бұрын
Hi Charlie, really am enjoying your format, it is to the point. Quick question I wanted to isolate which objects, cause the distance fx. I do FX so, possibly the shader would only be effected by a character on impact or surface types and lerp in for variation types. If you get a chance, I would appreciate it and I will certainly let you know if I get the setup working. Keep up the Fab shaders tutorials.
@PrismaticaDev
@PrismaticaDev 2 жыл бұрын
Hey hey Travis! You can disable a mesh from affecting distance fields by disabling the "affects distance field lighting" tickbox in the world viewport. Unfortunately this is global, so the mesh in question would also not recieve distance field lighting information etc
@travisadkin5782
@travisadkin5782 2 жыл бұрын
@@PrismaticaDev Charlie thanks for the quick reply. I may be able to use this for a cinematic shot so, that's good but, it would preclude functionality in gameplay if, i isolate to just a character . I will follow your stuff you delineate the functions very well.
@jairdeoliveiraneto605
@jairdeoliveiraneto605 Жыл бұрын
Very nice!
@youth20003
@youth20003 3 жыл бұрын
learning the stuff that I don't immediately need but I will for sure need later in my project all thanks to the absolute MAN Charles
@youth20003
@youth20003 3 жыл бұрын
god okay I just finished the video this is so fucking useful wow
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Hahaha embrace the side-tracking :P
@ariiteajuventin3408
@ariiteajuventin3408 2 жыл бұрын
Awesome as always, but I have a problem with my landscape, the distance field doesn't work, Any idea why and how to fix it ?
@coleastaire
@coleastaire 3 жыл бұрын
awesome!
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
You are
@yamasaa
@yamasaa 3 жыл бұрын
Hey, thanks for this video! I love the 5 minute format, most videos are 30+ minutes long and take forever to explain things so this is perfect :) subbed! I'm wondering whether this "distance fields + lerping" wombo combo could be used to blend transitions between different geometry. In my case I want to blend the terrain and elevation of different hexagon tiles at their shared edges, similarly to how Civilization 5/6 manages to have seamless terrain/elevation transitions on their hex-based maps. I'm curious to try it out soon!
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Ooh that’s an interesting one... I think the only issue would be that you can’t have something using DF’s in the shader be emitting distance fields itself. Maybe there is a workaround though!
@3xchris
@3xchris 8 ай бұрын
can you access distance field ao in ue5 to create masks, for like dirt build up?
@dominikgomoka8541
@dominikgomoka8541 7 ай бұрын
Hi! It is all fine and well sir but I have a tiny question :) i've set up those wobbly distance field ripples for my water shader and included them into vertex displacement. And refraction. But - cannot figure out how to derive normals from this displacement and blend it together with other normals (based on gerstner waves or textures) so that I get proper reflection "bending" in the areas where ripples are in effect ;) Got any tips for me? Thank you for your tutorials, great fan of 5 Minutes Material the Show ;)
@fleurbird
@fleurbird 2 жыл бұрын
Very interesting!
@aflyingfuk
@aflyingfuk 7 ай бұрын
I wonder if there is a way to create snow with this effect
@semmert
@semmert 3 жыл бұрын
I subscribed for the cats. Stayed for the tutorials.
@semmert
@semmert 3 жыл бұрын
also PLEASE turn the music down, or off, in these tutorials. It's pretty loud and distracting. Just my $.02
@kidneyaiopm1903
@kidneyaiopm1903 3 ай бұрын
howd you do that slime smudge on the grund in the beginning bro
@ThadeousM
@ThadeousM 6 ай бұрын
I need to extend/scale the ripple effect. but as I divide beyond 100 (e.g 1000) I no longer have control over the radiating effect shown at 4:25 Does anyone have any idea for how to correctly scale this effect to fit larger scenarios? For context I need to see large rippled from far away on a large islandd Thanks all!
@PrismaticaDev
@PrismaticaDev 6 ай бұрын
Hey hey - unfortunately there isn't a solution, since Distance fields on extend so far internally. You might be able to edit engine code to make them generate even further, but it will use a tonne of memory. For something like ripples/waves along a shoreline, I would create an RVT and draw a spline around the island. In the spline's material you'd have a gradient from one side to the other which you could then sample in your water material and create waves/blend between ocean and shore waves.
@wackcrewpeeps
@wackcrewpeeps 2 жыл бұрын
Are you going to create a video talking about how you made that blob paint the grass from the beginning of the video?
@Dhieen
@Dhieen 2 жыл бұрын
wow very interesting, instead of doing a blob you can make moss or snow like this right?
@Sorarox59
@Sorarox59 Жыл бұрын
Am I the only one who got some sharp effect at some distance with the DistanceToNearest node ? From 0-70 it works, but with larger value, my borders juste get sharp with square border instead of smooth one :/ Do you have any idea how to fix this ? Thank you !
@likewahtzup
@likewahtzup Жыл бұрын
I am having the exact same problem! Sorry no idea how to fix though :/ I am a newb, hope you are doing well despite this set back from 7 months ago :)
@taarcks223
@taarcks223 Жыл бұрын
Its not working for me in 5.1..... is there something i miss? Distance Fields are enabled and so on....
@lukebetterton
@lukebetterton 3 жыл бұрын
I was literally looking into distance fields like 2 days ago and after 2-3 hours of googling I learned less than I got from the first minute of this video. I'd also be really intrigued to see how distance field fonts work too.
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
So happy to hear that! Yeah there isn't much info on using them effectively at the moment - I'm hoping to change that haha. That would be something I want to cover - basically using 2D/texture distance fields to make the edges of an Opacity mask silky smooth even at a low resolution.
@lukebetterton
@lukebetterton 3 жыл бұрын
@@PrismaticaDev weirdly I went down this rabbit hole in the first place because I wanted to add glow/soft drop-shadows to text in umg. Turns out that's not a thing unless you're a material wizard.
@juanmilanese
@juanmilanese 3 жыл бұрын
Apparently they rewritten the distance field generation in UE5 cause is used in Lumen, as in... lumen raytraces against distance fields as far as I understand it. So I think the distance field documentation for UE4 might be a little outdated, they implemented distance fields initially to generate AO and far shadows (after the cascaded shadow maps) when they made the open world prototype when the engine went free around... 4.8? something like that. My whole point being that, distance fields might be a lot more useful now than they were before. I think the whole blob-ie thing is a lot better now, they seem to be generated at a higher resolution by default and also lightning fast.
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
@@juanmilanese indeed! I watched the Lumen livestream and I remember them saying DF’s got a whole lot of love haha. Might even be some extended shader functionality!
@user-gu6tw4dn4w
@user-gu6tw4dn4w 3 жыл бұрын
@@juanmilanese Its not exactly DF's. Near camera it uses polygon raytracing (When lumen raytracing is in detail mode), then DF's, and for far objects it uses voxel tracing to save up on memory, because DF's are huge.
@Luke-3D
@Luke-3D 3 ай бұрын
Is there a way to only include one object. for example a stone being thrown in the middle of a lake, but you don't want ripples on the lake edges
@PrismaticaDev
@PrismaticaDev 3 ай бұрын
Unfortunately not, unless you disabled Distance Fields on your landscape etc which can make shadows look quite weird. It would be really great if Distance Fields were a vec4 value instead of scalar so you could essentially have 4 "channels" but that would require some engine work haha
@Luke-3D
@Luke-3D 3 ай бұрын
@@PrismaticaDev That's a shame! Thanks for the reply
@Dhieen
@Dhieen 2 жыл бұрын
if you want 2 objects having the same base material with distance field AO for example, how would you do that? since you have to uncheck "affect distance field lighting on the object that has the material Like a set of modular walls, you want to put AO to them, but it wont work because of that Is there another way?
@ue4learn191
@ue4learn191 2 жыл бұрын
this is my question too .
@LionUnchained
@LionUnchained 9 ай бұрын
The blob was not whack. All hail the blob.
@TheGulperEel
@TheGulperEel 2 жыл бұрын
Thanks!
@dragoonduneman4161
@dragoonduneman4161 3 жыл бұрын
Have you done something like Overlapping itself as like two object interaction with each over and then masking out only on when it overlap itself ... i tried but only info i got is when you got two different object but never itself against two object .
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
I haven't found a solution yet unfortunately :( I know it's possible but might require some custom code
@EvilPainNova
@EvilPainNova 3 жыл бұрын
Can I reverse the mask so the blobb goes inverters and not outverts? like its trying to avoid things that came near it.
@Urammar
@Urammar 3 жыл бұрын
Litterally just a one minus node out of the result of the mask bruh. You gotta think a little bit for yourself
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Yep, definitely doable - you can set the Multiplier value to a negative and it will shrink inwards. You might have some issues with shadows when using WPO/distance fields, so you can plug it into a Shadow Pass switch to use the default shadow.
@RomarioDev
@RomarioDev 3 жыл бұрын
thumbnail is 10/10
@PrismaticaDev
@PrismaticaDev 3 жыл бұрын
Hahaha I need to use the CharlieBall in more thumbnails
@Snafuey
@Snafuey Жыл бұрын
I can’t get this to work with a blueprint that has a static mesh.
@Dorizzdt
@Dorizzdt Жыл бұрын
Could you use this effect to also add curved "bevels" to hard edge shapes?
@mattwright880
@mattwright880 2 жыл бұрын
Is there a way to get this effect working, without disabling the distance field lighting for an object? I was thinking of using distance fields to mask out a wet surface effect when an object is above the surface in question, but I need all objects to use distance field lighting.
@thegreatSalu
@thegreatSalu Жыл бұрын
One question, I'm trying to create a half submerged car in a lake..is it possible to make the merged part of the car wet with this material? Cheers!
@sams_3d_stuff
@sams_3d_stuff 3 жыл бұрын
Amazing!!
@lz4090
@lz4090 2 жыл бұрын
Thanks for this. How do make it meta balls like when you have two spheres? I cant seem to let them interact to each other even if I turn on their own distance lighting. Thanks
@terrydrain
@terrydrain 2 жыл бұрын
Hey! I'm using ue4 - 25. We have added distancefields for our water shader. Everything is getting a weird "darkening", as it seems to apply some AO. It can be turned off in the asset, but I don't want it for any asset. Can you turn it off?
@PrismaticaDev
@PrismaticaDev 2 жыл бұрын
Hey Oliver! Sounds like you might be using a dynamic skylight - try switching "cast shadows" to false on your Skylight so it doesn't create Distance Field Ambient Occlusion :)
@thirdlaxe7048
@thirdlaxe7048 2 жыл бұрын
Is there any way to enable distance field on mesh on spline? I already tried merging it into single actor but it didn't generate a distance field.
@jonlon4406
@jonlon4406 2 жыл бұрын
Hi ,I want to make a material that, when applied to a model, will only render a flat-color cross section of the model as it intersects with other geometry.Can you give me some ideas?
@joeldbenjamin
@joeldbenjamin 2 жыл бұрын
I would love to be able to use the distance field as a mask but include the object itself, so NOT turning off "Affect Distance Field Lighting". Not sure if this is possible... Basically I'm trying to create an AO mask but not have to use precomputed Baked AO, and distance fields seem promising, but if the object itself has to not affect distance field lighting then the effect isn't going to work
@keylight8647
@keylight8647 2 жыл бұрын
Realy Good Turorial your work is juste Insane ! I just have a small problem, I'm trying to do the same thing with the blob sphere but in my case instead to be like a slime ball the sphere stay black like if my base color wasen't there and the form the sphere dosent change. I use Unreal engine 5.0.1 idk if there some setting I forgot to set or this is something else.
@sukritact
@sukritact 2 жыл бұрын
From what I can tell, distance fields seem to have broken when used with world position offset or the opacity channels: though I haven't been able to find documentation about this.
@jorgevalles6835
@jorgevalles6835 Жыл бұрын
Can we say Distance Field are more or less like an Ambien Occlusion?
@PrismaticaDev
@PrismaticaDev Жыл бұрын
Yep - it’s offline ambient occlusion computed through ray-marching
Distance Fields (Part 2) | 5-Minute Materials [UE4/UE5]
10:58
PrismaticaDev
Рет қаралды 38 М.
Single Layer Water | 5-Minute Materials [UE4/UE5]
11:54
PrismaticaDev
Рет қаралды 139 М.
Doing This Instead Of Studying.. 😳
00:12
Jojo Sim
Рет қаралды 33 МЛН
Challenge matching picture with Alfredo Larin family! 😁
00:21
BigSchool
Рет қаралды 35 МЛН
ROLLING DOWN
00:20
Natan por Aí
Рет қаралды 9 МЛН
Making a Game with Java with No Experience
8:41
Goodgis
Рет қаралды 182 М.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,5 МЛН
Physically Based Cel Shading
36:41
Visual Tech Art
Рет қаралды 85 М.
Motion Matching - My Thoughts [UE5]
14:28
PrismaticaDev
Рет қаралды 14 М.
Unreal Engine Materials in 6 Levels of Complexity
44:12
pwnisher
Рет қаралды 210 М.
The Fresnel Node | 5-Minute Materials [UE4]
6:47
PrismaticaDev
Рет қаралды 41 М.
The Most Common Mistake Beginners Make in Unreal Engine | UE5
12:17
Ali Elzoheiry
Рет қаралды 104 М.
3D AI Model Generation is Getting GOOD - UE5.4 Unreal Engine
12:25
Ray Traced Distance Field Shadows | Tips & Tricks | Unreal Engine
6:01
Custom Water System for Prismatica [UE4 WIP 1]
9:34
PrismaticaDev
Рет қаралды 13 М.
Doing This Instead Of Studying.. 😳
00:12
Jojo Sim
Рет қаралды 33 МЛН