Subsurface Scattering for Foliage, in Unity (WITHOUT RAYTRACING!)

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

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

  • @MirkoCrafter
    @MirkoCrafter 5 лет назад +64

    I undestood absolutely nothing. Impressive! :D

  • @ManSpidernater
    @ManSpidernater 8 месяцев назад

    I've been thinking about implementing this for a while and here it all is, super straightforward and easy to follow, that's mint

  • @Overflowsweden
    @Overflowsweden 5 лет назад +20

    Great video! Would love to see this in shader graph.

  • @werti4894
    @werti4894 4 года назад +1

    thanks for the tutorial!!!!!! Finding amplify tutorials is the best, they're far and few in between but always high quality

  • @thecrazy8888
    @thecrazy8888 3 года назад

    Thank you for the SSS tutorial. I hope you make the wind tutorial one day.

  • @SnutiHQ
    @SnutiHQ 4 года назад +1

    This is awesome, will have to try this out in Shader Graph! 😍🌳

    • @bryantenorio368
      @bryantenorio368 4 года назад +1

      How did that go? I can't find a node for "World space light direction"

    • @SnutiHQ
      @SnutiHQ 4 года назад +1

      @@bryantenorio368 Hard to get lighting data in shader graph I've noticed as well, so not sure! We tried a programmatic approach, and made a tutorial on that a while back (for Toon shader), similar principle could work, but there are other approaches using custom nodes I know.

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

    Thank you for this!

  • @TrentSterling
    @TrentSterling 6 лет назад

    Freakin fantastic! Love the tip about the surface normals pointing out!

  • @zigastrmsek2
    @zigastrmsek2 5 лет назад +7

    Half of these nodes are missing in my shader graph wtf?

    • @unrealdevop
      @unrealdevop 4 года назад +4

      Yeah, Unity is too lazy to improve on their shader graph so they decided to let the community do it and charge $100 for it. Wish Unity could be more Dev friendly like the Unreal Engine, it's one of the biggest things I hate the most about Unity. It's a good tool, but I can't afford to spend $100 on it. Seems some of the best sharers use it too and I think these guy's do this so that you'll be more inclined to send the money on Patreon.....Knowing it's cheaper then laying down $100 on a tool, when I see these video's I automatically give a thumbs down and Unsubscribe from their channel.

  • @sanketvaria9734
    @sanketvaria9734 3 года назад +1

    Actually I went one step further with this method and created SSS effect around the surface which are parallel to light giving a light bleeding effect

  • @threemoo
    @threemoo 6 лет назад

    So quick, and gave me all the information I need.

  • @baronlovat5200
    @baronlovat5200 5 лет назад

    Can't quite seem to get it to work with the standard Unity Shader Graph, but it was a good attempt, cheers.

  • @reaktorleak89
    @reaktorleak89 3 года назад

    Wow, this is a life saver of a tutorial.

  • @lauch8844
    @lauch8844 6 лет назад

    Thanks alot! I also reallly like the Blog posts you show us to learn even more! Great work

  • @KRGraphicsCG
    @KRGraphicsCG 4 года назад

    Now this is VERY purty

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

    What's the trick to make this work with HDRP? Doesn't have the custom lighting input.

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

    How do you do this in URP? There's no Custom Lighting output!

  • @BillyJackman3D
    @BillyJackman3D 3 года назад +1

    How would you get the "custom lighting" slot in the built in Shader Graph? i got the rest working while plugged into the emission channel but i would like the custom lighting slot that you are using here. Thanks for the great tutorial by the way!

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

    How to do it without Amplify? In built-in to unity Shader Graph?

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

      ruclips.net/video/xHD7Q36-Dao/видео.html your answer

  • @tobyfredson5668
    @tobyfredson5668 3 года назад

    Any way to make this work with point lights without custom light mode?

  • @decsec1660
    @decsec1660 5 лет назад +1

    Is it compatible with Speedtree Unity?

  • @sanketvaria9734
    @sanketvaria9734 3 года назад

    What is the view direction? explain this and also do tell what is it named in shader graph in URP

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

    After two hours of trying to get this to work - I now assume it just doesn't work in URP because there is no "custom lighting", correct?

  • @nicolasduboc3936
    @nicolasduboc3936 6 лет назад +1

    Thanks a lot for this great tutorial ! Very well explained and very interesting ! =D

    • @PuckLovesGames
      @PuckLovesGames  6 лет назад +1

      Thank you so much for watching! Let me know if there are any topics in particular you'd like covered in the future.

    • @nicolasduboc3936
      @nicolasduboc3936 6 лет назад

      I'm always very interested in shaders with "movement" implied like foliage, water, liquid, clouds and shaders for lighting solutions like fake lighting with sprites, fake volumetric lighting... It's also very cool to see how different approaches (yours vs other tech artists) can have a similar result !

  • @toureiro
    @toureiro 6 лет назад

    This was fantastic.

  • @cyuxi
    @cyuxi 5 лет назад

    Very informative ! ! Thanks!

  • @salgueiro1575
    @salgueiro1575 6 лет назад

    Awesome stuff dude!

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

    And what if you want to do a skin shader? I can't use specular with this method..

    • @Legionope
      @Legionope 7 месяцев назад

      You can if you write your own custom one.

  • @onewayroad3765
    @onewayroad3765 3 года назад +1

    Can rim light achieve same effect as subsurface scattering

    • @Legionope
      @Legionope 7 месяцев назад

      The two are unrelated to eachother. Rim light emulates a reflective surface by using fresnel to make geometry pop around the edges.
      This SSS actually let's light sources shine through the geometry. If you combine this effect with fresnel however, you get a really nice result.

  • @TheFireNoodle
    @TheFireNoodle 5 лет назад

    how do I animate the leaves? like you said in the video?

  • @DoubleBob
    @DoubleBob 3 года назад

    Is it possible to use the shader you've made in Amplify, when I don't have Amplify? Can I still change parameters without Amplify?

  • @loneshadow-studio
    @loneshadow-studio 4 года назад +1

    I'm curious, its there a particular reason why you didn't just use the translucency option built into the node?

    • @hellothere_1257
      @hellothere_1257 4 года назад

      Because translucency would only allow light to shine through from directly behind the object. However, subsurface scatter, as the name implies, scatters the light, so it lights even when the light comes at an angle. Also, you're not supposed to see the actual geometry behind the object, only bright lights.

    • @loneshadow-studio
      @loneshadow-studio 4 года назад

      @@hellothere_1257 Yeah I ended up figuring that all out after finally being forced to create my own shaders.

  • @kaptnseebar9467
    @kaptnseebar9467 4 года назад

    I know why I'm subscribed to you

  • @e-frame5344
    @e-frame5344 5 лет назад

    Really nice tutorial. Thanks a lot :)

  • @Atrix256
    @Atrix256 6 лет назад

    Very cool video

  • @ItIsNathan3D
    @ItIsNathan3D 5 лет назад

    This was fire. Subbed and BELL RANG.

  • @danielgriffin4624
    @danielgriffin4624 4 года назад

    Brilliant, cheers :)

  • @Leonardorth.
    @Leonardorth. 5 лет назад +13

    Would be interesting to see how this translates to Shader Graph in Unity 2019

    • @bluekiwiconsuming4568
      @bluekiwiconsuming4568 5 лет назад +2

      exactly.

    • @LaikaBossGames
      @LaikaBossGames 5 лет назад +3

      same

    • @akamarudesign7412
      @akamarudesign7412 4 года назад

      i am currently on that... it's beenn 2 weeks now

    • @janusztarczykowski9003
      @janusztarczykowski9003 4 года назад +1

      Shader Graph and whole rendering pipeline shenanigans are not gonna be production ready for quite some time, best to use ASE tbh ;) I'd rather see this translated to code than SG

  • @remon563
    @remon563 3 года назад

    this works well in Unreal 4 as well for those interested ;) Check out Ben Cloward's Foliage AO tutorial !

  • @ranveerkumar3123
    @ranveerkumar3123 5 лет назад

    how to on or bring "costume light" input in masternode?

    • @PuckLovesGames
      @PuckLovesGames  5 лет назад

      You have to change the Light Model from Standard to Custom Lighting to enable the custom lighting input.

  • @mradinoz
    @mradinoz 3 года назад

    it would be nice to see how you made the shadows aswell :' (((

  • @zankaster3935
    @zankaster3935 5 лет назад

    A couple days ago I followed the article by Alan Zucconi to build a translucent shader, something was not right but I thought it was my fault and I messed up some calculation. But now I see in your render the same problem: when the light direction is the same as the view (camera) direction, shouldn't the leaves be brighter than when the light source is behind them? In other words, when you move the light behind the camera in the example, shouldn't the leaves be more illuminated? That's what would happen in real world

    • @PuckLovesGames
      @PuckLovesGames  5 лет назад +2

      Actually, depending on the material, that doesn't have to be the case (if I understand you correctly). You can get often much more illumination when the light is shining through a material than when it's reflecting off it, particularly with foliage. I had this lovely potplant with thin leaves once, and when the light was behind it, it glowed like it was on fire. So pretty. But regardless of that, this isn't a properly calculated physically accurate effect anyway, it's a super fake hacky way to approximate it. You can absolutely tweak the values to make the direct lighting stronger or weaker than the subsurface lighting with multipliers. Just go with what looks right to you.

  • @janusztarczykowski9003
    @janusztarczykowski9003 4 года назад

    Great tutorial, although a bit slower and more in depth look would be appreciated, there was a lot of stuff going on and a lot of knowledge in just 5 minutes!

  • @zhuqiqin
    @zhuqiqin 6 лет назад

    I want to know how it work with normalmap?

  • @MichelHabib
    @MichelHabib 6 лет назад

    this is super great, i tried it and it rocks. Can you suggest a simple way to add little transparency to the translucent edges? would that be possible? I kinda understand the custom lighting is blocking most of the other inputs in the output node

    • @eggheart
      @eggheart 5 лет назад

      If the opacity nodes are blocked off (depending on your setup), you can still get transparency by using a Grab Screen Colour, and blending that in with the SSS mask, however, this will also require the shader to be in the transparent render queue (rendered after all the opaque objects) which changes the shading and drops shadow support. Another way that maintains the benefits of being a properly lit opaque shader, is to use Dither to do transparency. It makes lots of little dots, in different patterns to fake transparency - it's not true transparency, as pixels are either completely opaque or transparent so it creates a noisy effect, but with the right AA it can look pretty good. If you use Dither, I recommend finding a 'blue noise' tilable texture, rather than using the build in Dither patterns. I'm a big fan of dither - when you first see it you'll probably be disappointed that it doesn't look as smooth as real transparency, but I think players are pretty forgiving, and I think it's worth it for the benefits of avoiding the transparent render queue.

  • @yahjungcuppp
    @yahjungcuppp 6 лет назад

    Awesome!!!!

  • @theperryjones90
    @theperryjones90 3 года назад

    This is exactly what I'm looking for, but I'm using UE4! haha. I hope I can figure out the equivalent nodes in UE4.

  • @Aethelvlad
    @Aethelvlad 3 года назад

    sss never uses ray tracing, ray tracing is the third bounce of a light being calculated. sss is the first ray passing through.

  • @elzar8763
    @elzar8763 4 года назад

    i like it

  • @RobbyDR
    @RobbyDR 5 лет назад

    May I ask about the setup of the nodes "Basic Standard Lighting NdotL + Indirect" which is attached to the relay node that then plugs into the "add node" and finally to the Custom Lighting?

    • @PuckLovesGames
      @PuckLovesGames  5 лет назад +1

      Hi there! When you're using custom lighting, you have to calculate all that stuff yourself. Amplify Shader Editor comes with a Blinn-Phong Light node, which does that for you (you can see this setup at 2.34 ruclips.net/video/RPkhbjmmvS0/видео.html), but if you wanted to do it yourself, a simple starting point is NdotL, which is the the Dot Product of the Normal Direction and the Light Direction (clamped 0-1 usually), which gives you basic light information. You can see an example of that node setup here: wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/World_Space_Light_Dir
      I hope that helps! Let me know if anything else doesn't make sense and I'm happy to talk you through it.

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

    wich pipeline??????????????????????????????????????????????????????????????????????????????????????

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

    Looks like ass since its illuminating the wrong side aswell. But nice try