Cloth Shading - UE4 Materials 101 - Episode 10

  Рет қаралды 52,560

Ben Cloward

Ben Cloward

Күн бұрын

This video demonstrates a method for doing cloth shading in Epic Games' Unreal Engin 4 based on a technique developed by John Hable for Uncharted 2. We cover the use of Fresnel terms and using exponents and multipliers to adjust the effect. This shader can be used to imitate the appearance of denim, cotton, satin, silk, etc. This technique is not physically accurate, but mimics the appearance of cloth without needing to re-write the lighting model.
Download the textures used in this video:
www.bencloward...
www.bencloward...
www.bencloward...
www.bencloward...
www.bencloward...
www.bencloward...
------------------------------
Learn more!!
Other videos like this one:
• Gold Cloth Material .....
• unreal engine 4- How t...
• UE4 Tutorial: Cloth Si...
Web Resources
advances.realti...
www.artstation...
docs.unrealeng...
Shader Book Recommendations
www.bencloward...
------------------------------
Learn to write shaders in HLSL:
• HLSL Shader Creation 1...
• HLSL Shader Creation 2...
• HLSL Shader Creation 3...
------------------------------
Theme Music
Peace in the Circuitry - Glitch Hop
teknoaxe.com/Li...
Background Music
Speo - Reminiscent
• Speo - Reminiscent [Ta...

Пікірлер: 98
@perfectionist724
@perfectionist724 Жыл бұрын
Thank you Ben. I like watching your tutorials. I think your one of the most knowledgeable shader teachers on yt
@draganarrow
@draganarrow Жыл бұрын
As always, a clear and concise breakdown of the subject. Thank you.
@froggyworld
@froggyworld 4 жыл бұрын
The best tutorials on shaders out there. Thank you!
@DuncanHewitt70
@DuncanHewitt70 4 жыл бұрын
Brilliant tutorial and brilliant delivery, so clear and wonderfully explained. Bonus, you didn't start off by saying "Wassup guys" - thank you!
@SirHeineken1
@SirHeineken1 4 жыл бұрын
FINALLY. a ue4 fresnel tutorial not regarding emissive. thanks a LOT !!!!
@warezz1743
@warezz1743 2 жыл бұрын
Oh this helped so much! I just started using Ue5 yesterday and I needed arcade carpet so I was floundering but then I found you! Thank you very much!
@Alyson7924
@Alyson7924 Жыл бұрын
I'm with my notebook taking notes like I was in a classroom 😄 Except for the fact I'm pretty sure I'll use this eventually 😂
@SalaKin3DS
@SalaKin3DS 4 жыл бұрын
Thank you SO MUCH! This is AMAZING!!!! Exactly what I needed for my projecty. I really wish Epic will implement a more robust cloth shader later on (and while they're at it, a retroreflective shader) Subbed! 👍
@BenCloward
@BenCloward 4 жыл бұрын
You're welcome. I'm glad it was helpful!
@Pseudocue
@Pseudocue 4 жыл бұрын
You can simulate a retroreflective effect by plugging camera vector * -1 into your normals, if you disable tangent space normals in your material
@Pseudocue
@Pseudocue 4 жыл бұрын
I found plugging a fresnel into your base colour to get the black rim, and a roughness of 0.3 sells the effect a lot
@The_Dean_91
@The_Dean_91 4 жыл бұрын
Great channel, great tutorials, keep them coming!
@EarringPranksStudios
@EarringPranksStudios 5 жыл бұрын
Love this channel.
@brahimkhalilkaak6230
@brahimkhalilkaak6230 4 жыл бұрын
Thank u very much for this series , it helped me a lot to understand shader in ue4 ,keep it up !
@jack_jazz
@jack_jazz 3 жыл бұрын
Amazing simple tutorial, great result! Thanks, keep it up!
@ObilloFitz
@ObilloFitz 7 ай бұрын
You, Sir, are a good teacher
@fracturedfantasy
@fracturedfantasy 2 жыл бұрын
This was great. I've always been fascinated by the work done on the Metahumans, but looking at some of the shader spaghetti has been difficult. I just went back and looked at the cloth material they have constructed, and while it's still quite complex, each individual section of the code uses many of the same techniques described in these first 10 tutorials. Much easier to break down what was done in those complex shaders. Thanks!
@rogueentitydev
@rogueentitydev Жыл бұрын
Somebody help I cant stop watching these
@BenCloward
@BenCloward Жыл бұрын
Hah! Look out everyone, we've got a shader junkie! "Y'all got any more of them shader videos?"
@l_t_m_f
@l_t_m_f Жыл бұрын
Always the best!
@azagoruyko
@azagoruyko 2 жыл бұрын
Ben is the best!
@AadamKhor2507
@AadamKhor2507 3 жыл бұрын
Lovely Hope to se more shader tutorials
@Niveel3d
@Niveel3d 4 жыл бұрын
Thanks Ben, this is an amazing tutorial!
@MomenElwan
@MomenElwan Жыл бұрын
Man.... thank you very much for the info , really helped me aloooooooooooot!!!!
@mariiazatorska
@mariiazatorska 3 жыл бұрын
pure magic! Thank you very much for your tutorials!
@evgeniismirnov655
@evgeniismirnov655 3 жыл бұрын
Stunning!
@МиколаТовкмак
@МиколаТовкмак Жыл бұрын
Very useful!Thanks!
@wagq1689110
@wagq1689110 4 жыл бұрын
Thanks so much for the great tutorial! pls keep it up :)
@antoniosuarez7881
@antoniosuarez7881 Жыл бұрын
Thanks, grate tutorial
@BIGTTSNORLAX
@BIGTTSNORLAX 4 жыл бұрын
Awesome stuff!
@pandaidesu1322
@pandaidesu1322 3 жыл бұрын
Very interesting series! I was wondering what the difference between using a normalmap vs the PixelNormalWS would be. I thought the PixelNormalWS already takes the normalmap-input into consideration (unlike the VertexNormalWS).
@Winged4Ever
@Winged4Ever 3 жыл бұрын
I checked this out and in fact, using PixelNormalWS instead of transformed normal map vector from tangent to world space yields the same result, and in addition with two instructions less.
@turalmemmedov3648
@turalmemmedov3648 5 жыл бұрын
I never fully understood Dot Product node before but now this node is totally clear for me. Thank you as always Ben Cloward. I have one question. What does Cloth shading model do in UE4 material editor? Do I still need to use that shading model if i do what you said in this video?
@BenCloward
@BenCloward 5 жыл бұрын
That's a really good question, Tural - I'm glad you asked. In this video I mention that this cloth technique that I'm sharing isn't physically correct - it's just an imitation of the appearance of cloth rather than being physically correct. The core reason that it's not accurate is that it's using the camera vector instead of the light vector. The light vector isn't available in the shader graph. You need to modify the core lighting model in order to use it, and that's not something you can do in the graph. You need to create a custom lighting/shading model for that. And that's what the Cloth shading model is. The Cloth shading model in UE4 IS a physically correct shading model. However, it's only correct for one specific type of cloth. That's the challenging thing about cloth - there are so many different types. So the Unreal cloth shading model is only good for one cloth type. While the cloth shader that I presented in this video isn't accurate, it does allow you to imitate lots of different types of cloth - like silk, satin, denim, cotton, etc - so there's more control and flexibility.
@turalmemmedov3648
@turalmemmedov3648 5 жыл бұрын
@@BenCloward Ohh, thanks for answer)) Every new tutorial teaches me more things. You really need more subs )) Right now quixel guys doing amazing live stream about mesh blending metods with terrain material and RVT materials, so another in depth RVT tutorial would be amazing by you too in a feature videos. )) Thanks again, Ben. ))
@shakaama
@shakaama 3 жыл бұрын
isn't satin/silk supposed to be super tightly woven, so you DON'T see individual loops? are we just too close in to really see the satiny sheen, or is it going to be fixed later, more in depth material shader?
@re5128
@re5128 3 жыл бұрын
Very Helpfull!
@emanuelecelli4451
@emanuelecelli4451 4 жыл бұрын
Thanks Ben, your is one of the best channels for Unreal tutorials. May I ask a question? what if we want that the shader react in a correct way with lights, I mean when the light pass trough, do we need to add just a subsurface node and work with opacity or it require more a complex structure? Many Thanks
@Pseudocue
@Pseudocue 4 жыл бұрын
Interacting correctly requires writing a new shader model, which is a pain. A halfway solution is to do it solely for your direction light, which you can get by setting your directional light as "sun/atmospheric light" and using the atmosphericlightvector node in your material
@Pseudocue
@Pseudocue 4 жыл бұрын
though granted you won't get correct shadowing
@emanuelecelli4451
@emanuelecelli4451 4 жыл бұрын
@@Pseudocue Thanks for reply, I've never used that node before definitely I'll look up the UE4 documentation. I'm searching a not too expensive material, do you have any advice? thanks a lot
@fatemekamali8204
@fatemekamali8204 Жыл бұрын
amazing
@grigorescustelian6012
@grigorescustelian6012 4 жыл бұрын
Right what I needed!
@ecstetika4467
@ecstetika4467 9 ай бұрын
Hello Ben, what a great channel! i just love it! thank you! Do you think i can use this technique to create an atmosphere around the earth globe? at minute 7:16 it looks like if you add a blue color and make it a bit transparent it would make a great atmosphere material
@cmds.learning7426
@cmds.learning7426 4 жыл бұрын
great work!
@Scarlov87
@Scarlov87 2 жыл бұрын
Thank you so much for the info :D
@thanoszag6563
@thanoszag6563 3 жыл бұрын
Hi, very nice tutorial! I am wondering if this material could work with the Lerp node too. For example, if we have a texture with different fabrics and we want to give different effects to each.
@BenCloward
@BenCloward 3 жыл бұрын
Yes, you can do several different types of fabric if you use a mask to designate the different areas in the UV layout. We used that method on my last project - Anthem - and it worked really well.
@thanoszag6563
@thanoszag6563 3 жыл бұрын
@@BenCloward I have modelled and textured this model. And I used the fabric shader that you show us on your tut. What do you think? kzbin.info/www/bejne/sHXRfJKuf8pgfrc
@edoakutagawa9099
@edoakutagawa9099 4 жыл бұрын
Hi, Ben, thank you so much for the tutorials. I'm just newly getting into texturing and shaders and your tutorials are so helpful. I have a quick question. What is the difference between adding 2 textures together versus multiplying 2 textures together?
@BenCloward
@BenCloward 4 жыл бұрын
Thanks! I'm really glad these are useful for you. Textures store values in the range of zero to one. When you add two values together that are between zero and one, the result is a higher value - so adding two textures together brightens them. When you multiply two values together that are between zero and one, the result is a smaller value - so multiplying two textures together darkens them. For example, let's say you're two textures are both medium gray - so the values in both textures are 0.5. If you multiply 0.5 x 0.5, you get 0.25. If you add 0.5 + 0.5 - you get 1. See what I mean?
@edoakutagawa9099
@edoakutagawa9099 4 жыл бұрын
@@BenCloward Got it!Thank you for explaining!
@mahmoudskafi5425
@mahmoudskafi5425 4 жыл бұрын
very helpful tut, I was wondering why didnt you go for the ue4 fresnel functions ?
@BenCloward
@BenCloward 4 жыл бұрын
There are two reasons. The first is that the Unreal fresnel node does a few extra things that I didn't need to do - so using it would have been slightly more expensive. And the second is that I wanted to show the viewers what the math inside the fresnel node does so they would understand it better. This is something that I do often on the channel - show a node that does some fancy math, and then show how the math works.
@mahmoudskafi5425
@mahmoudskafi5425 4 жыл бұрын
@@BenCloward thanks alot ! your tuts are beyond helpful
@justinkringstad4167
@justinkringstad4167 2 жыл бұрын
where would you add a Constant 3, so you can change the color of the cloth?
@liquaard2824
@liquaard2824 2 жыл бұрын
i am a bit cofused on the Trasnform vector part on Normal maps ,, is it converting the tangent vectors on normal maps to Normal Vectors ?
@yuanzuika3587
@yuanzuika3587 4 жыл бұрын
thanks for your video it helps alot
@VX3LS_UA
@VX3LS_UA 4 жыл бұрын
Awesome 😊
@maxgordon3194
@maxgordon3194 6 ай бұрын
a question for the same shader but in unity, which node will be suitable to use for pixelNormalWS
@martin.lukacka
@martin.lukacka 4 жыл бұрын
Hey, this is very nice, thank you. I was wondering if there is possiblity to make nice Translucent Curtain. Is it somehow possible? Do you have an advice? Thanks a lot
@abilalp9104
@abilalp9104 4 жыл бұрын
thank you
@mehmetbaspinar25
@mehmetbaspinar25 Жыл бұрын
hi ben , can u make a sail animation material ?
@Foxqin
@Foxqin 10 ай бұрын
very cool
@torbjornkallstrom2316
@torbjornkallstrom2316 3 жыл бұрын
Would be nice with a tutorial on how to add translucency and transparency to the fabric as well
@liquaard2824
@liquaard2824 2 жыл бұрын
i think its possible ,
@baconeta
@baconeta 3 жыл бұрын
I feel like I'm both learning a lot, and also not really getting anywhere at the same time by going through these tutorials. I intend to go through all of your series slowly and eventually, but I think I need some hands on stuff to get somewhere meaningful. I have a degree in mathematics and computer science and I've just started working as a junior game dev training into technical art (through shaders and vfx path). Besides your tutorials, do you (or any viewers) know where I could spend more time to get somewhere meaningful? I'm not an artistic person, generally, and haven't been known to be visually creative but i'm logical and very good at problem solving. Basically I just want to learn and absorb as much as I can and I guess maybe one thing I could do is follow along with these videos and experiment, but beyond that? Cheers!
@BenCloward
@BenCloward 3 жыл бұрын
The answer to your questions depends a lot on what you mean by hands-on and meaningful. What are you hoping to create? I learn best when I have an end goal in mind. I break the goal down into steps and then go out and look for learning resources that teach me how to achieve each of the steps. So perhaps it would help you to decide on something you want to make and then go about learning how to make it. It's not possible for me to guess what each of my viewers will want to create and make tutorials for all of those things, so instead, I try to cover all of the basics and hope that the viewers will be able to take what I've shared and put the ideas together in new ways to create what they're looking for. In addition to the series you're watching now, I also have a series that shows how to create environments as well as my most recent series that goes through each of the basic nodes in the graph and explains what it does and gives example of what it can be used for.
@baconeta
@baconeta 3 жыл бұрын
@@BenCloward thank you Ben, and that makes perfect sense. I completely agree with the end goal. My end goal is to take the knowledge and skills here you teach and be able to apply them to creating visually appealing shaders and vfx systems. I just started a role 2 weeks ago and I know the (roughly) sorts of things I might need in this role, so perhaps I should make a list of the best elements I could try and build and practise with. Beyond that I want to have good general skills potentially usable across the industry, so I suppose it then depends on my interests and what's common/popularly required to know at the moment. I am most interested in environments and I love open-world, adventure and rpg game development most of all. Popularity wise (what the industry looks for) is another question. My end goal is a broad but strong foundation for roles that use these skills- such as graphical and technical artists. I will make a list tonight and see where I can go from there in building up a repotoire of practise tasks and skills and take it a step at a time.
@AnaCarolinaEstaritaGuerrero
@AnaCarolinaEstaritaGuerrero 4 жыл бұрын
Hi Ben, thank you for this great tutorial. I have a question for you, what's the difference between building the shader all from scratch as you are doing and just using the Fresnel function using one minus to create the inverse?
@Pseudocue
@Pseudocue 4 жыл бұрын
the fresnel function follows the equation for schlicks fresnel. A dot product is just a simpler version.
@AnaCarolinaEstaritaGuerrero
@AnaCarolinaEstaritaGuerrero 4 жыл бұрын
@@Pseudocue Thank you for your answer! Do you know if, in terms of instructions to render the shader, using a dot product vs a Fresnel function has any performance advantages?
@BenCloward
@BenCloward 4 жыл бұрын
It will be slightly cheaper to just use a dot product.
@AnaCarolinaEstaritaGuerrero
@AnaCarolinaEstaritaGuerrero 4 жыл бұрын
@@BenCloward Thank you, Ben!
@7kGreen
@7kGreen 3 жыл бұрын
Do Material Dot Operation always return positive values? Does it clamped between 0 and 1? Cause regular dot operation from -1 to 1.
@anhtranngoc7205
@anhtranngoc7205 3 жыл бұрын
thank u
@travisnguyen1475
@travisnguyen1475 3 жыл бұрын
Hi Ben Cloward, I google creating velvet material in UE but lack of document. Could you make tutorial about velvet material in UE. Thank
@Neki2K1
@Neki2K1 2 жыл бұрын
Respect +++++
@timothypipkin386
@timothypipkin386 3 жыл бұрын
Why does the power node seem to control how soft or sharp a line is. I still don't seem to understand why that happens with that specific node. As well as why does a constant change the amount of white on the WS normals node in one of your previous videos?
@BenCloward
@BenCloward 3 жыл бұрын
This video explains what the power node is doing: kzbin.info/www/bejne/Z3bMdp2vo9Kaf7s
@timothypipkin386
@timothypipkin386 3 жыл бұрын
@@BenCloward Thank you! I think I might have been going through these series in the wrong order. I have been doing shader creation. I see now I probably needed to start off with this series first instead.
@fracturedfantasy
@fracturedfantasy 2 жыл бұрын
Question: You mentioned you scanned cloth material to use in this video. What are you using to scan the material and then create the normal maps etc? Do you have a process you can share, sound like a fun thing to experiment with..
@BenCloward
@BenCloward 2 жыл бұрын
I could create a series of dozens of videos describing the process of capturing materials, but it's a little off topic for my channel. Not sure how much overall interest there would be - but it's a topic I might consider for a future series.
@fracturedfantasy
@fracturedfantasy 2 жыл бұрын
​@@BenCloward ​ understood! I'll see if I can google around a bit and find a method that might work for me.
@MattyJBayBay
@MattyJBayBay 3 жыл бұрын
Is there any way to add opacity and color?
@michaelsulesky7221
@michaelsulesky7221 3 жыл бұрын
Is it possible to mask this shading effect and leave the rest of a texture unaffected by this, for example, if a cape was a part of the same texture set as non cloth objects, could I mask this effect to only the cape?
@단비-w8n
@단비-w8n 4 жыл бұрын
thx sooo much!!
@BenCloward
@BenCloward 4 жыл бұрын
You're welcome! I'm glad you like the video.
@UnrealEngine_Master
@UnrealEngine_Master 3 жыл бұрын
Looks like the UE4 material function FuzzyShading works quite similarly.
@angel_luis
@angel_luis Жыл бұрын
I think this isn't working with Lumen.
@mrcxx8694
@mrcxx8694 4 жыл бұрын
denim_d is actually missing in your links to the textures. It links to denim_n instead.
@BenCloward
@BenCloward 4 жыл бұрын
Woah, that is super weird. I have no idea why that's happening. Try right clicking on the link and choose "save target as" instead. That worked for me.
@mrcxx8694
@mrcxx8694 4 жыл бұрын
@@BenCloward Yes the right click trick works. But I think it was a browser issue. Had problems with Firefox yesterday and so switched to Chrome. Who knows? Anyway, thanks for a great series. Am learning heaps of stuff.
@zaichenhu679
@zaichenhu679 4 жыл бұрын
thanks Ben, but the texture link doesn't work, could you help to fix?
@BenCloward
@BenCloward 4 жыл бұрын
Right click on it and choose save target as.
@looniper3551
@looniper3551 3 жыл бұрын
I ... just can't! Dude. I'm 4 and a half minutes in and you Just Now got to actually explaining Anything. I'll be sure to avoid your "tutorials" going forward. Because it should have taken less than 40 seconds to say "here is an image of cloth to show sometimes it can have X property, and here is another piece that shows some cloth has a 1-X property" Now lets start building a shader that exhiits these qualities using the Cloth type.
@BenCloward
@BenCloward 3 жыл бұрын
Thanks for taking the time to share your expectations and feedback. That’s really helpful and I appreciate it. Hopefully in my more recent videos I’ve gotten better at being more to-the-point, but I’ll let you be the judge.
@YASIR.K
@YASIR.K 3 жыл бұрын
Thank You
Volumetric Ice Shader - UE4 Materials 101 - Episode 11
12:21
Ben Cloward
Рет қаралды 44 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Foliage Translucency - UE4 Materials 101 - Episode 30
11:18
Ben Cloward
Рет қаралды 34 М.
World-Aligned Textures - UE4 Materials 101 - Episode 22
14:44
Ben Cloward
Рет қаралды 37 М.
Rain Drops Shader - UE4 Materials 101 - Episode 14
16:42
Ben Cloward
Рет қаралды 49 М.
What if Old Minecraft Mobs were Created Today?
28:05
KazooCat
Рет қаралды 821 М.
10 Minutes vs. 10 Years of Animation
19:29
Isto Inc.
Рет қаралды 1,6 МЛН
Basics of PBR - UE4 Materials 101 - Episode 2
29:12
Ben Cloward
Рет қаралды 55 М.
Height Lerp Node | 5-Minute Materials [UE4]
6:06
PrismaticaDev
Рет қаралды 49 М.
7 Topology Tips Every 3D Artist Should Know
9:27
MLT Studios
Рет қаралды 823 М.
Rain Drip Shader - UE4 Materials 101 - Episode 15
32:09
Ben Cloward
Рет қаралды 47 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.