How to CORRECTLY use AMBIENT OCCLUSION [Blender Tutorial]

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ก.ค. 2023
  • I'm here to settle the score on how to use ambient occlusion in Blender CORRECTLY. None are without sin.
    Blender Manual - "Shader To RGB":
    docs.blender.org/manual/en/la...
    Blender Stack Exchange post:
    blender.stackexchange.com/que...
    ASSETS USED:
    Rustic Brick 2:
    www.textures.com/download/PBR...
    Coastal Cliff 2:
    www.textures.com/download/PBR...
    Tufted Leather:
    www.textures.com/download/PBR...
    Hammered Copper:
    www.textures.com/download/PBR...
    Wood Trim:
    www.textures.com/download/PBR...
    Old Metal (legacy):
    www.textures.com/download/Sub...
    Timbered Brick Wall:
    www.textures.com/download/PBR...
    SciFi Panels 09:
    www.textures.com/download/PBR...
    HDRI Japan Kabuchiko Night:
    www.textures.com/download/HDR...
    HDRI Faroer Bay A:
    www.textures.com/download/HDR...
    Earth model by Denis Cliofas:
    skfb.ly/6VCKF
  • ภาพยนตร์และแอนิเมชัน

ความคิดเห็น • 98

  • @Zev_Reef
    @Zev_Reef 9 หลายเดือนก่อน +25

    Warning: Shader to RGB disables Screenspace Reflections and Subsurface Scattering.

    • @NovanByworks
      @NovanByworks  9 หลายเดือนก่อน +2

      Yeah, I am sadly aware. Until Blender Foundation officially supports AO maps for EEVEE, that's the biggest trade-off.

    • @Zev_Reef
      @Zev_Reef 9 หลายเดือนก่อน +2

      ​@@NovanByworks I spent an hour trying to figure out why reflections were missing and then I checked google lol
      I hope Eevee Next will support AO, someone should tell that dev if they haven't already.

    • @NovanByworks
      @NovanByworks  9 หลายเดือนก่อน +2

      @@Zev_Reef There's been a request on Right-Click Select for a few years now, but I've still not heard any explicit plans to incorporate it. My guess is that because EEVEE was originally developed to have near-parity with Cycles, they didn't consider what features it would need between shared shaders. This is why the Specular shader still has an AO input while Principled does not.

    • @AdamJensenReal
      @AdamJensenReal 2 หลายเดือนก่อน +1

      I cannot even find this shader to RGB in blender 4.0 :D
      I think the normal method work good anyways i was needing only to preview how it is working before put it in engine.

    • @Myzelfa
      @Myzelfa 17 วันที่ผ่านมา

      Okay, so that makes this technique highly situational

  • @mateuscaetano380
    @mateuscaetano380 10 หลายเดือนก่อน +12

    FINALLY!!! An actual solution to a problem that haunted me for so much time but weirdly no one talks about. Thank you SO MUCH!!!

  • @MisterP1999
    @MisterP1999 10 หลายเดือนก่อน +1

    Such a simple method yet adds so much to a render. Thx for sharing I'm definitely adding this to some of my old project files!

  • @ButterDragon
    @ButterDragon 10 หลายเดือนก่อน +13

    You deserve more subscribers, good editing, explaination with humor.

  • @EmiliaHoarfrost
    @EmiliaHoarfrost 10 หลายเดือนก่อน +1

    Thank you very much for the valuable input. I wish you success on your Blender video career. It was short, concise, not distracting, basically excellent as far as video editing is concerned. You addressed the targetted public right away, kinda advanced/knowledgeable users of Blender.

  • @artjunyent1654
    @artjunyent1654 10 หลายเดือนก่อน +1

    One of the best tutorials of blender i ever saw!
    Thankyou so so much!

  • @jermesastudio
    @jermesastudio 6 หลายเดือนก่อน

    Thank you for sharing this. It really help me while working on my commercial projects

  • @varadparmar5178
    @varadparmar5178 10 หลายเดือนก่อน +1

    Wow! Great explanation bro,basic understanding and great speech - style also...❤

  • @fsalad
    @fsalad 10 หลายเดือนก่อน +1

    Very nicely explained 😊😊thanks! I recently started looking into Maya hypershade utility nodes and nodes in general, am a bit slow understanding stuff, but it is so interesting

  • @MercuryRisingFast
    @MercuryRisingFast 10 หลายเดือนก่อน +3

    I love how Blender goes out of it's way to be extra difficult, and time consuming instead of focusing on more intuitive, and less time consuming. lol... But I love it!

  • @ShiroiAkumaSama
    @ShiroiAkumaSama 10 หลายเดือนก่อน

    This was very enlightened

  • @ianmcglasham
    @ianmcglasham 10 หลายเดือนก่อน

    Excellent video.

  • @TripTilt
    @TripTilt 10 หลายเดือนก่อน

    now that was interesting. I'll try to use that way more now :)

  • @cr4niumblu371
    @cr4niumblu371 10 หลายเดือนก่อน

    Wow that was cool

  • @saeedcg
    @saeedcg 10 หลายเดือนก่อน

    please do more of this 🙏🏻❤

  • @cupo4tea
    @cupo4tea 10 หลายเดือนก่อน

    thanks, actually helped me with ao shaders

  • @louiscampeau7823
    @louiscampeau7823 3 หลายเดือนก่อน

    very nice

  • @sanketvaria9734
    @sanketvaria9734 4 หลายเดือนก่อน +1

    I always knew this so I resorted to never use thinking that AO might be a technique for old times when Raytracing wasn't as efficient and PC's weren't strong so they faked GI using AO. Hence why also used in games. So basically AO is indeed in genuine use, just that it is being wrongly used by everyone.

  • @BlenderRenaissance
    @BlenderRenaissance 4 หลายเดือนก่อน

    Make more tutorials. You have a unique appeal that will get you far.

  • @estude_comigo_gb
    @estude_comigo_gb 6 หลายเดือนก่อน

    my hero

  • @OrangeJambo
    @OrangeJambo 10 หลายเดือนก่อน

    I love this video lol.

  • @rogper
    @rogper 10 หลายเดือนก่อน +9

    This should be implemented on the Principled BSDF shader... up until today I still don't know why it just doesn't have the AO input!?

    • @NovanByworks
      @NovanByworks  10 หลายเดือนก่อน +4

      Yeah, seems like a pretty big oversight. There's been a feature request on Right-Click Select for 3 years, but no response.

    • @johanavril1691
      @johanavril1691 10 หลายเดือนก่อน +1

      I mean with a displacement map you get pretty good AO and also it just looks better in general sooo a AO texture is pretty much useless if you have a height map

    • @NovanByworks
      @NovanByworks  10 หลายเดือนก่อน

      @@johanavril1691 This is true, but I only included the segment on Cycles just to show one way AO could be controlled if the user so desired.

    • @rogper
      @rogper 10 หลายเดือนก่อน

      @@johanavril1691 That may be correct for cycles, but for Eevee the AO helps substantially!

    • @johanavril1691
      @johanavril1691 10 หลายเดือนก่อน

      @@rogper oh yeah of course!

  • @DominikWysocki-ml2he
    @DominikWysocki-ml2he 3 หลายเดือนก่อน

    I get crossed eyed when using Blender's nodes. Seriously, I'm amazed at how people remember or simply know what the hell to do when you connect this to that to this.

    • @NovanByworks
      @NovanByworks  3 หลายเดือนก่อน

      Part of it is practice, but it helps to know what each node actually does. It's a little outdated, but I recommend Daniel Krafft's video covering them here:
      th-cam.com/video/cQ0qtcSymDI/w-d-xo.html
      It's also good to refer to the official Blender docs for anything confusing. They should give you a good idea of how things work and what you're allowed to do, such as which nodes work in Cycles or EEVEE.

  • @namemanu
    @namemanu 4 หลายเดือนก่อน

    I am learning how to create cs2 skins and that glow in the dark effect seems really interesting to apply in the game. Would you make a detailed tutorial about how can you achieve this effect and how to bake the occlusion sheet?

    • @NovanByworks
      @NovanByworks  4 หลายเดือนก่อน

      To create the glow/light effect, you just use the same setup for an emissive map rather than the AO map. As for the "occlusion sheet", I'm not sure I understand what you're referring to. Your material should already have an ambient occlusion map, and if not, you either have to make one in an image editor or bake it from actual geometry.

  • @Tatsumi7886
    @Tatsumi7886 8 หลายเดือนก่อน

    Soooo, lets just say that I have a character and a point light, after seeing this video I understand that the more illuminated sides of said character Will have less AO while the lessers Will have more?
    Would that be correct? (This may be a dumb question but It would help me xD)

  • @devotae
    @devotae 7 หลายเดือนก่อน

    wow more of these vids please!! EVERYDAY LESSONS lol lol I tried this and it didn't work, missing something basic I think. Also, love how you explain what an AO is, i mean.. i knew that... or did i??? how does sheen and specular work??? as a fabric artist I need to know these things =D ytytyt for the videos

  • @Kimera_Alternate_Realities
    @Kimera_Alternate_Realities 6 หลายเดือนก่อน

    Alexa: How do I permanently engrave this information on my brain?

  • @johanavril1691
    @johanavril1691 10 หลายเดือนก่อน

    The eevee part was really good but using an entire new viewlayer as a mix factor for making the ao darker is a really weird idea I mean you could just turn on a few more passes and get basically the same (or better) result without rendering the scene twice

    • @NovanByworks
      @NovanByworks  10 หลายเดือนก่อน +1

      I was mostly trying to find a way to make more accurate use of the AO pass since it's doesn't take light sources into account, hence the pseudo-falloff pass. It is definitely hacky and I wouldn't personally use it, but I still included it just to show a Cycles equivalent.

  • @npip99
    @npip99 6 หลายเดือนก่อน

    FULLY CORRECT SEEN BELOW!
    ~ Writing in caps here because I'm trying to solve this issue, and this YT video gave me what I needed to solve it (Shader -> RGB), but the solution given wasn't working in all cases for me.
    Here is the correct math that works across many PBRs that I tested:
    Starting Configuration: Textures => Principled BSDF -> Shader Output
    Here's what you will do (Probably putting this all in a Shader Group),
    - Take the Ambient Occlusion, and multiply it with albedo (Call this node NODE_Z). Then, take the Metal texture, invert it, and multiply with NODE_Z to get NODE_Y.
    - Then, add Principled BSDF -> Shader to RGB; VectorAdd this result with NODE_Y, and connect the output of this VectorAdd to your Shader Output.
    This now _adds_ ambient lighting (The YT tutorial doesn't actually brighten up the texture, it only darkens, which is incorrect); and, it works correctly on textures with metal in them (This YT tutorial breaks on any texture with metallicity).
    You can also multiply Ambient Occlusion with any number (1, 2, 3, 4) to match the "Ambient Light" setting in your game engine (UE, Unity, Godot), and the result should match 1:1 with the game engine. This adjusts the intensity of the ambient light. You even multiply by a color to give the ambient light a tint.
    Overall, the formula is this:
    ambient_light = ambient_intensity * ambient_tint * ambient_occlusion; // intensity is a float, the other two are vector3's
    ambient_light *= albedo;
    ambient_light *= 1 - metallic;
    BSDF_RGB += ambient_light;
    // If you have a PBR without an AO map, set ambient_occlusion = vector3(1,1,1), so that lighting is still equal across all PBRs in the scene.
    Hope this helps!

  • @TheCarmenStar
    @TheCarmenStar 16 วันที่ผ่านมา

    How'd you get the little image previews above your nodes? :0

    • @NovanByworks
      @NovanByworks  16 วันที่ผ่านมา

      It's an add-on called "Node Preview". It's a tad pricey but very useful. You can buy it here:
      blendermarket.com/products/node-preview

  • @IridiumZero
    @IridiumZero 5 หลายเดือนก่อน +9

    99% of blender youtubers are just affiliate marketers. They don't know anything beyond the surface level.

    • @ballskin
      @ballskin 3 หลายเดือนก่อน +2

      not at all. most of them are just repurposing the AO node to make a quick dirt/grime/dust mask. it has nothing to do with light.

  • @PranayVaidya007
    @PranayVaidya007 4 หลายเดือนก่อน

    Can you make a vid on portal light property in area light

    • @NovanByworks
      @NovanByworks  4 หลายเดือนก่อน

      I'm not familiar with that as I typically work in EEVEE. It's a little outdated, but this seems like a pretty good explanation: blender.stackexchange.com/a/33877/66794

  • @lakrimozzza8312
    @lakrimozzza8312 2 หลายเดือนก่อน

    Tried it for cycles. I added layer "solidrender" and cant find it in "override". I don't understand what i did wrong

    • @NovanByworks
      @NovanByworks  2 หลายเดือนก่อน

      While in the "SolidRender" view layer, create a blank white diffuse material and set that to the override. This will make everything use this material when the layer is rendered so it will only show AO and lighting. This layer then gets multiplied on top of the original Scene layer in the compositor.

    • @lakrimozzza8312
      @lakrimozzza8312 2 หลายเดือนก่อน

      Thank you! 😊@@NovanByworks

  • @mr.hashundredsofprivatepla3711
    @mr.hashundredsofprivatepla3711 6 หลายเดือนก่อน

    1:21 “You might as well just merge the AO map into the albedo map to save yourself the extra draw call.” I thought a draw call was just an instance of a mesh or an instance of a material applied to one? I don’t have that much experience in draw calls, so any of us could be wrong, but I’m open to learning more.

    • @NovanByworks
      @NovanByworks  6 หลายเดือนก่อน

      Best I can tell, it depends on the rendering engine itself. This might not actually be true for EEVEE, but uselessly rendering the AO on top of the albedo is still less performant than just merging them into the same image. Game engine shaders tend to separate the AO map because of the way it's supposed to react to light, which may result in an extra draw call depending on the shader model used.

  • @danioldan4189
    @danioldan4189 10 หลายเดือนก่อน

    did you read the "warning" on "shader to rgb" ? according to that it disables reflection and SS scattering !?

    • @NovanByworks
      @NovanByworks  10 หลายเดือนก่อน +1

      True, so I suppose that's the tradeoff: Have proper AO, or have SSS & reflections.
      You can still have baked cubemap reflections, but until Blender Foundation adds proper AO support, this is the best solution I've come across.

  • @kabetee
    @kabetee 10 หลายเดือนก่อน

    BASED = SUBBED

  • @zaferec2354
    @zaferec2354 10 หลายเดือนก่อน +2

    I use math(power) and it works much better. Also I don't know why there is still no AO socket in Principled BSDF

    • @NovanByworks
      @NovanByworks  10 หลายเดือนก่อน +2

      I would guess that it's because Principled was originally created for Cycles, which generally doesn't require AO maps the same way real-time engines do. And now not enough people even know how to properly use them to ask for its inclusion (hence this video).
      Interesting idea about the Math node. Would you mind sharing how to incorporate it?

    • @zaferec2354
      @zaferec2354 10 หลายเดือนก่อน +2

      @@NovanByworks I do the same thing as everyone else, as at 54 seconds. The only difference is that I add a math(Power) node between the AO and the Mix node. And that gives much better control.

  • @Hubertoser
    @Hubertoser 10 หลายเดือนก่อน

    Hm, i just used the AO node and plugged it between the bsdf and the output in cycles.

    • @NovanByworks
      @NovanByworks  10 หลายเดือนก่อน +2

      The issue is that the AO node is only generative and does not take light sources into account. This is useful for procedurally blending textures/materials at mesh corners for effects like weathering, but not for actual realistic ambient occlusion.

  • @chryssdale5747
    @chryssdale5747 10 หลายเดือนก่อน +2

    I guess eevee and cycles are both complicated since there are things cycles cant do but eevee can and vice versa xd

    • @NovanByworks
      @NovanByworks  10 หลายเดือนก่อน +1

      Pretty much. General rule seems to be that Cycles is best suited to photo-realistic rendering while EEVEE is best suited to stylization/NPR.

  • @wuhfails9736
    @wuhfails9736 7 หลายเดือนก่อน

    this only works for eevee?

    • @NovanByworks
      @NovanByworks  7 หลายเดือนก่อน

      Yes, specifically "Shader to RGB" is exclusive to EEVEE.

    • @wuhfails9736
      @wuhfails9736 7 หลายเดือนก่อน

      I need AO in cycles :(@@NovanByworks

  • @joepeezly
    @joepeezly 2 หลายเดือนก่อน

    Great trick. I understand the steps, but why does it work? It's basically killing the AO map under direct light - how does a diffuse shader to rgb in the mix do that? What? Great video, but this is one of my complaints about a LOT of online tutorials: they go through the right steps, but don't always explain the what's and whys. So I don't learn them, just what options to click.

    • @NovanByworks
      @NovanByworks  2 หลายเดือนก่อน +1

      I quickly glossed over it in the video, but ambient occlusion simply refers to the occlusion of ambient light, also known as "indirect light". It's the natural shadows exhibited by creases and cavities that ambient light cannot reach (think of an overcast day). When a direct source of light is shone on them, these shadows disappear.
      "Shader To RGB" effectively exposes the raw color data of a BSDF shader, i.e. what's lit and what's not. Thus we can use this data like a mask to control what parts of an AO map are revealed under direct light and what parts are not.
      Normally AO occurs naturally in path-traced rendering such as with Cycles, but game engines use pre-baked AO maps to save on performance for real-time rendering. EEVEE is also real-time but lacks that same support for AO maps, so we use Shader To RGB instead. The tradeoff is that this disables screen space reflections and subsurface scattering. Until Blender adds real AO map support, this is my interim solution.

    • @joepeezly
      @joepeezly 2 หลายเดือนก่อน

      Nice, thanks for the reply! So it's really about "reverting" back to the pure color of the shader, which emulates the effect of being in direct light. I totally get it, thanks again.@@NovanByworks

  • @artemsh6302
    @artemsh6302 7 หลายเดือนก่อน

    I tried to conduct experiments and I got the impression that this does not always work. The Ambient Occlusion node works more stable than Diffusion + Shader to RGB. 🤔

    • @NovanByworks
      @NovanByworks  7 หลายเดือนก่อน

      The issue is that the AO node doesn't take light direction into account or allow you to use pre-baked AO maps.

    • @artemsh6302
      @artemsh6302 7 หลายเดือนก่อน

      @@NovanByworks Agree. It makes sense. Then it might be worth combining both approaches. Since the AO node also has its advantages.

  • @arbiter8246
    @arbiter8246 6 หลายเดือนก่อน

    I'm so confused. Ima go back and make a second cube.

  • @Maxboun3204
    @Maxboun3204 3 หลายเดือนก่อน

    I wanna go home

  • @aliborvayeh7123
    @aliborvayeh7123 9 หลายเดือนก่อน

    my mind farted but it was very helpful nonetheless

  • @arturkadirov9280
    @arturkadirov9280 5 หลายเดือนก่อน

    !!!!!!

  • @rjwh67220
    @rjwh67220 9 หลายเดือนก่อน

    Wrong wrong wrong! Calm down, dude, you’re going to give me a stroke!
    PS: Great vid!

  • @andrewscott985
    @andrewscott985 หลายเดือนก่อน

    _This is a joke._
    _These guys are cool . . ._
    for a short time after you pull them out of a freezer. Again and ag . . .
    Nah, srsly, they cool.
    P.S. The slaps you thown . . . I . . . felt them like it was me who shouted again and again how to incorectly use the Ambeyond Conclusion.

  • @_Pawelski
    @_Pawelski 10 หลายเดือนก่อน

    ive heard that there is no ambient occclusion in real life thus cycles doesn't use it by default

    • @NovanByworks
      @NovanByworks  10 หลายเดือนก่อน

      Sure, it's more a term to describe a shortcoming of real-time rendering. I only covered using it in Cycles because I was unsatisfied with the implementation of the AO pass.

  • @myrminki
    @myrminki 9 หลายเดือนก่อน

    Witchcraft!

  • @AlexHutchingsOfficial
    @AlexHutchingsOfficial 2 หลายเดือนก่อน

    Nice video, but please slow it down. I can barely see what you're doing without slowing the video down or going back a bunch of times

    • @NovanByworks
      @NovanByworks  2 หลายเดือนก่อน

      I like to edit for a brisk pace to keep things succinct. You can turn on subtitles and/or change the video speed if you need.

  • @red4666
    @red4666 8 หลายเดือนก่อน

    i don't think this is correct. you are not supposed to bake in any lighting information in your diffuse. that's not the way pbr works. the principled bsdf should have its own dedicated ao input.

    • @NovanByworks
      @NovanByworks  8 หลายเดือนก่อน

      Correct, which is why I was basically joking about that. This whole setup is just a stopgap until Blender adds AO support to the Principled BSDF (assuming they ever do).

  • @nicholaspostlethwaite9554
    @nicholaspostlethwaite9554 10 หลายเดือนก่อน

    This would have been interesting, presented competently, slower spoken, not madcap.

    • @NovanByworks
      @NovanByworks  10 หลายเดือนก่อน

      I like to make my tutorials as concise as possible. I have included subtitles if you need to take time with the instructions.

  • @maksymriabov1356
    @maksymriabov1356 8 หลายเดือนก่อน

    are you 1.5xing your voice? it feels way to fast...

    • @NovanByworks
      @NovanByworks  8 หลายเดือนก่อน

      I've included subtitles and you can change the video speed.

  • @jknMEMES
    @jknMEMES 4 หลายเดือนก่อน

    There is no "solid render layer", you lying.

    • @NovanByworks
      @NovanByworks  4 หลายเดือนก่อน

      At 3:22, you can see me create a new View Layer named, "SolidRender".

  • @Blenderclassecom
    @Blenderclassecom 10 หลายเดือนก่อน

    Where are find a shader RGB ? It's a joke. Somebody try it ?

    • @NovanByworks
      @NovanByworks  10 หลายเดือนก่อน +1

      The 'Shader to RGB' node is in the 'Converters' category. It is only usable with EEVEE.