This technique has visited me in dreams for a year now and I’m excited to finally apply it to a project. I finally understand SDF applications! ❤ Thank you Ben!
It's also usefull to use distance fields on opacity mask textures like you've shown here, general shape is maintained regardless of mip level being viewed, especially important on fencing, chains, foliage :)
Want to add that I tested here on chainlink fences, and it works great! Only thing is that I've used SDF instead of DF and had to change the Mip Settings to Sharp10 instead of the default settings. Also the ScaleMips For Alpha Coverage to 1! :D
One note, using this will lead to Aliasing issues from my experience and mip-mapping making text degrade, so i basically made a shader adjustment where the distance from the object chages how sharp/smooth the text is with limits and mip-mapping with BORDER handles it well afterwards.
Saw Font and thought SDF immediatly - never thought to combine it in a layered shader for fonts though! Shape Burst is incredible usefull for all types of alpha errosion shaders too!
Super useful to see tricks like this. Can you also make a video on shell based materials? I've seen it being used instead of performance-heavy surfaces like fur, grass, etc.
Made a roadsign system using this together with Custom Primitive Data, to use for selection of what text I want to display (from a texture full of texts). Criminally underused and the best thing about it, to my understanding is that even if two objects would have different texts, because of it using Custom Primitive Data, it would just be one Drawcall.
Nicely presented video! It should be possible to replace the 6 nodes creating the SDF with just a single Vector2 exposed parameter, a 'Remap' node, and a saturate node, right?
Hello I wanted to request a tutorial I can’t find anywhere. I’m searching a way to crave/mask blueprint editable texts into static mesh’s parent inside own blueprint. I only found ways to mask boxes or spheres but not editable font silhouettes. Hope you could help.
Isn't it better to use this technique as Decals rather than in a pixel shader? Text area is small but the material still have to sample it at full area. Also, Decals allow you to add multiple text to one object at once. Still, a nice video tho.👍
Hmm, that's an interesting idea. I'm sure there are pros and cons for putting it in the material vs using a decal and which way is better would depend on the specific way it was being used.
Well the base concern is memory. one texture in a small project isn't gonna break the bank. But a bunch of these on a larger project? The full resolution is going to be loaded at all times instead of mipping down to save memory.
This technique has visited me in dreams for a year now and I’m excited to finally apply it to a project. I finally understand SDF applications! ❤ Thank you Ben!
Best tutorials on youtube right here
Ben you are a great teacher. Be prepared that im going to leave this comment under your videos over and over again :D
It's also usefull to use distance fields on opacity mask textures like you've shown here, general shape is maintained regardless of mip level being viewed, especially important on fencing, chains, foliage :)
Want to add that I tested here on chainlink fences, and it works great! Only thing is that I've used SDF instead of DF and had to change the Mip Settings to Sharp10 instead of the default settings. Also the ScaleMips For Alpha Coverage to 1! :D
One note, using this will lead to Aliasing issues from my experience and mip-mapping making text degrade, so i basically made a shader adjustment where the distance from the object chages how sharp/smooth the text is with limits and mip-mapping with BORDER handles it well afterwards.
Cool idea! Thanks for sharing it.
Saw Font and thought SDF immediatly - never thought to combine it in a layered shader for fonts though!
Shape Burst is incredible usefull for all types of alpha errosion shaders too!
Super useful to see tricks like this. Can you also make a video on shell based materials? I've seen it being used instead of performance-heavy surfaces like fur, grass, etc.
Made a roadsign system using this together with Custom Primitive Data, to use for selection of what text I want to display (from a texture full of texts).
Criminally underused and the best thing about it, to my understanding is that even if two objects would have different texts, because of it using Custom Primitive Data, it would just be one Drawcall.
Thanks a lot!!! IT's very usefull!!! Thanks Ben from Colombia
Aaaaaaaaaand stolen, implemented. You, good sir, just improved my workflow. Thank you.
Glad I could help!
In your image editor, you can also multiply, level then sharpen or convert to outlines then stroke if needed, prior to export for engine's.
Nicely presented video! It should be possible to replace the 6 nodes creating the SDF with just a single Vector2 exposed parameter, a 'Remap' node, and a saturate node, right?
I haven't tried it, but you might be able to get the same results with that.
It would be great if you could post a version of this technique using Reality Composer Pro ShaderGraph.
Isn't that the same as using an inverse lerp with a saturate? Great video!
Yes! It is an inverse lerp. Good call out. UE4 doesn't have that node, but UE5 and Unity do - so you could just use that to make it more simple.
nice
Hi Ben.I have a quesion .how we can display a dynamic text im material ? do you have any solution?
Hello I wanted to request a tutorial I can’t find anywhere. I’m searching a way to crave/mask blueprint editable texts into static mesh’s parent inside own blueprint. I only found ways to mask boxes or spheres but not editable font silhouettes. Hope you could help.
i usually just disable compression and use sharp mipmaps.
Isn't it better to use this technique as Decals rather than in a pixel shader?
Text area is small but the material still have to sample it at full area.
Also, Decals allow you to add multiple text to one object at once.
Still, a nice video tho.👍
Hmm, that's an interesting idea. I'm sure there are pros and cons for putting it in the material vs using a decal and which way is better would depend on the specific way it was being used.
But 1280 isn't a power of 2. You can also see that texture doesn't have any MIPS in unreal either because of that.
Yeah, that's true. You could just as easily make it 1024 if you're concerned about that.
Well the base concern is memory. one texture in a small project isn't gonna break the bank. But a bunch of these on a larger project? The full resolution is going to be loaded at all times instead of mipping down to save memory.
Please do a grass shader 🥺🔥