Car Paint Shader - Advanced Materials - Episode 9

Поделиться
HTML-код
  • Опубликовано: 22 дек 2024

Комментарии • 44

  • @DawnBriarDev
    @DawnBriarDev 2 года назад +6

    Hi Ben, I wanted to drop by and apologize for having not contributed any views in a while. Was going through my subscriptions and pruning them, but decided to stay subscribed here for the value you'd given me when I learned from you. Sadly, the nature of an educational channel is that your userbase eventually learns enough from you that they may ultimately lose the need to watch by coming to understand the underlying principles which you have taught quite thoroughly.
    See, where in similar channels or guides, people will explain HOW to make a specific shader, you instead delve into explaining WHY the math works. And after a few tutorials, I found it became easier and easier to use those mathematic principles to design my own shaders without needing to ask someone how to do so. (Coupled with other development work I was doing, this process escalated even more quickly overall.)
    And this is a sign of a great educator: To haven your students to not need your help anymore. So thank you, Ben. I'll stay subscribed and every now and then pull you up in the background for the added metrics, but it's been almost 2 years since I think I've actually needed your help, and I greatly appreciate how much you helped me with getting familiarized in the beginning.

    • @BenCloward
      @BenCloward  2 года назад +4

      Thanks a lot for this! I’m really glad I could help you!

  • @Hristos_Muka
    @Hristos_Muka Месяц назад +1

    Extremely useful lessons for people who are just starting out on shaders, like myself. Thank you Ben, you are awesome!

  • @mridulsarmah5974
    @mridulsarmah5974 2 года назад +3

    One of the most important shader lessons till date. Thanks Ben.

  • @cmitchell6927
    @cmitchell6927 2 года назад +2

    Thank you for this and for including the normal map even!

  • @retronexusnet
    @retronexusnet 2 года назад +1

    This series is just endlessly helpful

  • @vlad.serbanescu
    @vlad.serbanescu 2 года назад +4

    You really need to make a video on why you're making all these videos for free. I almost never comment on YT, but I watched most of your videos over the years and... 10/10 content. Thank you!
    I especially enjoyed the procedural grid and texture tiling break-up series. I'm currently looking for ways to combine your break-up technique with a 3D Voronoi mask (preferably cached) or a seamless Voronoi cube map (preferably from 6 cached projections), but I haven't figured out a way to index the Voronoi cells and edges yet. I thought it was a cool idea to share.

    • @Bl1tzkriegx
      @Bl1tzkriegx 2 года назад +1

      I'd say he puts it out for free to help those interested in technical art achieve what they're looking for. Definitely some fantastic content from him, my one and only gripe is how he grabs a constant variable by searching rather than holding 1 and clicking lol.

  • @LoopSkaify
    @LoopSkaify 2 года назад +3

    This is the pearlescent shader blackbox used for the old need for speed games (this is just in shader but they precalculated some parts in code, but it still works). Here is the pseudocode:
    FVector ViewDir = Normalize(CameraPosition - WorldPosition);
    float VDot = Dot(ViewDir, VertexNormal);
    //Here happens the sRGB conversion for Unreal
    float VDotN = Max(Pow(VDot, 2.2), 0.01);
    FLinearColor DiffuseMin = FLinearColor(0.794, 0.974, 1.01);
    float DiffuseMinLevel = 0.697;
    DiffuseMin *= DiffuseMinLevel ;
    FLinearColor DiffuseMax = FLinearColor(0.142, 0.157, 0.951);
    float DiffuseMaxLevel = 1.798;
    DiffuseMax *=DiffuseMaxLevel ;
    FLInearColor DiffuseRange = DiffuseMax * DiffuseMaxLevel - DiffuseMin * DiffuseMinLevel ;
    FLinearColor DiffuseColor = DiffuseMin + DiffuseRange * VDotN;
    FLinearColor PaintColor = FLinearColor(0.351, 0.045, 0.045);
    FLinearColor FinalColor = PaintColor * DiffuseColor ;
    They did he same thing with specular colors, just influenced the VDotN with a Pow(VDotN, SpecularBlend);
    As Unreal doesnt allow Specular Color you can add this simply on top of the paint color to achieve another layer with the a SpecularBlend value of eg. 2.0;
    Example for the specular ranges that fit here:
    FLinearColor SpecularMin = FLinearColor(1,0, 0,15, 1,7);
    float SpecularMinLevel = 1,476;
    FLinearColor SpecularMax = FLinearColor(0,165, 1,237,1,0);
    float SpecularMaxLevel = 1,273;
    float SpecularBlend = 1.918;
    They also used this range thing to colorize the reflection texture but that is in UE just for reflection captures and i assume barely anyone uses them for performance reason. But that could be another layer for the diffuse color in UE.

    • @LoopSkaify
      @LoopSkaify 2 года назад +1

      Btw., it may be enough depending on the model to move this entirely into the VS like they did it then. A simple 'VertexInterpolator' after that would suffice.

  • @tommygunn2782
    @tommygunn2782 Месяц назад +1

    This was AMAZING!!!

  • @JhebadiaSprunklefunk
    @JhebadiaSprunklefunk 2 года назад +4

    Nice. It's also possible to gradiate the fresnel using a colour curve asset, which acts like a gradient map in Photoshop & SBS. Where as with lerps you are limited to the number of points defined in the shader.

  • @oviniandrade
    @oviniandrade Год назад +2

    Unreal Engine @ 15:00

  • @1MOLNH3
    @1MOLNH3 Год назад +1

    As always, great video master. Thanks a lot. Btw I just wanted to say that Unity have that Coat Normal option too but only in the StackLit shaders.

  • @GherardoMartin
    @GherardoMartin Год назад +1

    Thanks a lot for the great tutorial! Really helpful

  • @MRRadioactivNEx
    @MRRadioactivNEx 2 года назад +1

    I would really like to see 2 tutorials from you:
    1) Blending Normalmaps from different UV Channels (eg the second UV Channel contains a Decal Atlas)
    2) A Fluid in a Bottle. Maybe you know the Bottles from Half Life Alyx, if you move them around, the shader simulates how the fluid react to the movement.
    Thank you for your great Tutorials Ben! I really like them! 😊

  • @Gorongirl
    @Gorongirl Год назад

    Ok I have a lot of questions!! Also, what a great video!!!
    1 - Could you use the voronoi effect to generate a glittery normal map? I guess you would need to seed a new value in each cell across the different normal channels. Is that viable?
    2 - Is it just a real-world physical property of car paint to have a fresnel color effect? Also thank you for giving me a name for the chameleon effect paint.
    3 - Is the effect of adding the clear coat sort of like creating a specular layering effect, adding the specular highlights together instead of overriding them? So that we get both the unique effect of the sparkly specular in the lower layer combined with the specular of the clear coat? I’ve always wondered what this effect was for and how it worked.
    4 - Is the process of converting the carbon fiber from tangent to world and then applying a fresnel similar to the process some programs use to generate an AO map from a normal? It reminds me of it a bit, especially before the one-minus, but I never made the connection.
    5 - Are gradient maps (for color remapping) basically like daisy-chained Lerp functions? The Lerp step in the Unity instructions for some reason made me make that association.
    Thank you again for these videos!

    • @BenCloward
      @BenCloward  Год назад

      1 - yes, although procedural Voronoi is a bit expensive. It would probably perform better to just sample a small texture for that, but you’d need to try it and see to know for sure.
      2 -Not all car paint has a Fresnel effect. Just the fancy, show-off kind.
      3 - yes. We’re trying to mimic the fact that the surface has a thin coat of transparent wax on it. So the top surface is very smooth, so some of the light gets reflected as a very tight specular highlight. But since it’s transparent, the light also passes through and bounces of the main surface underneath - which has a different set of reflective properties.
      4 - We transform the normal from tangent to world because when you use two vectors together - such as with our dot product, both vectors need to be in the same space. Our camera vector is n world space, so we need to get our normal vector there two so that the dot product operation between them will make sense
      5 - yes, gradients are pretty much exactly Daisy-chained lerps.
      Great questions! Makes me happy to see your excitement for understanding.

  • @naht4963
    @naht4963 2 года назад

    Hello! Thank you for the amazing videos Ben!
    I realize I'm kinda late to the underwater post-processing effects party, but could you do a tutorial on creating realistic lighting underwater ?

  • @666nevermore
    @666nevermore Год назад

    Ben there are gradient atlas and curves and the material can access it on unreal engine. I don’t remember exactly the name but for sure was “gradient” something

  • @Saisoku-YT
    @Saisoku-YT 9 месяцев назад

    Is there a technique to darken those super bright edges without tweaking the reflections and smoothness?

  • @TruckerJoeOfficial
    @TruckerJoeOfficial Год назад

    Thank you for the tutorial!
    Do you have an idea how I can make it that the color is changeable from the material inspector?
    I can only take colors as input. That is not that problem, but how can I make the gradient from 2 input colors?

    • @mysteriousanayasman5416
      @mysteriousanayasman5416 Год назад +1

      use two "Color" nodes instead of "Gradient" and use "Lerp" node instead of "Sample Gradient", then you can change color from inspector.

  • @iMikOo
    @iMikOo 4 месяца назад

    Is that work with URP?

  • @RAM_industrial_death_metal
    @RAM_industrial_death_metal Год назад

    Great video. Thank you

  • @knowercoder
    @knowercoder 2 месяца назад

    Thank you!

  • @povilaslondon
    @povilaslondon Год назад

    what about using anisotropy for carbon fiber to really bring the look to the higher standard? Currently it looks like carbon veneer and not real carbon.

  • @hossamshafer4100
    @hossamshafer4100 2 года назад

    Awesome can u make all kind of volumetric eff like fog and smoke

  • @AhmedHasan91
    @AhmedHasan91 2 года назад +1

    Amazing. thank you ♥

  • @Yaroslav_Tselovanskyi
    @Yaroslav_Tselovanskyi Год назад

    No need for the "one minus" node if you're using Lerp right after it, you can just swap the values in the Lerp node.

  • @antoniosuarez7881
    @antoniosuarez7881 Год назад

    thanks, grate tutorial

  • @astroid-ws4py
    @astroid-ws4py 2 года назад

    I have seen you shader books recommendation list, Can you suggest which one of the books is best to start with for really diving in into shaders? (My level is: I know prety well C++, Calculus and Linear Algebra). Thanks.

    • @BenCloward
      @BenCloward  2 года назад

      I have this book on my desk right now and reference it at least once a week. It's a great one! amzn.to/33UuCho

    • @astroid-ws4py
      @astroid-ws4py 2 года назад

      @@BenCloward Thank you very much ❤

  • @fddesign
    @fddesign 2 года назад

    do you plan any ''strata material'' tuto? :)

    • @BenCloward
      @BenCloward  2 года назад

      You mean like this one? ruclips.net/video/cGmWa-gETzU/видео.html

    • @JhebadiaSprunklefunk
      @JhebadiaSprunklefunk 2 года назад +1

      @@BenCloward There's actually a new shader toolset in UE5.1 called Strata, it allows you to create a pseudo custom shadermodel in the material graph. So you can finally do stuff like separate Specular colour from Metallic Albedo etc, very useful for NPR stuff. It may or may not be what this person is talking about but either way I'd be keen to see anything cool you come up with from it Ben :)

  • @zenofar4761
    @zenofar4761 2 года назад

    i hope if u make tutorial for performance with unity and unreal with better in visuals staff , as particles system, shading system which is better for performance

  • @meowyang4823
    @meowyang4823 2 года назад

    Hello, why hasn't it been updated this week?🤔

    • @BenCloward
      @BenCloward  2 года назад

      I was sick this week, so I didn't make a new video. But there will be one on Thursday.

    • @meowyang4823
      @meowyang4823 2 года назад +1

      @@BenCloward Wish you a speedy recovery.

  • @mahnomix
    @mahnomix Год назад

    Or you can make a tutorial with car painting and stripes or decals.

  • @Sky-iv8zm
    @Sky-iv8zm 2 года назад +1

    Wish you'd showcase your materials on relevant geometry. For example, car paint on a car, rock materials on rocks, grass on ground, etc. Bit easier to visualize the result.

    • @BenCloward
      @BenCloward  2 года назад +1

      Yeah, 'that's a really good suggestion. These would look a lot better if I had a nice sports car mesh for sure.