How to CORRECTLY use AMBIENT OCCLUSION [Blender Tutorial]

Фильм және анимация

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

Пікірлер: 108

  • @Zev_Reef
    @Zev_Reef11 ай бұрын

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

  • @NovanByworks

    @NovanByworks

    11 ай бұрын

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

  • @Zev_Reef

    @Zev_Reef

    11 ай бұрын

    ​@@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

    11 ай бұрын

    @@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

    4 ай бұрын

    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

    2 ай бұрын

    Okay, so that makes this technique highly situational

  • @mateuscaetano380
    @mateuscaetano380 Жыл бұрын

    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 Жыл бұрын

    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!

  • @EmiliaHoarfrost
    @EmiliaHoarfrost Жыл бұрын

    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.

  • @ButterDragon
    @ButterDragon Жыл бұрын

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

  • @artjunyent1654
    @artjunyent1654 Жыл бұрын

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

  • @fsalad
    @fsalad Жыл бұрын

    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

  • @varadparmar5178
    @varadparmar5178 Жыл бұрын

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

  • @MercuryRisingFast
    @MercuryRisingFast11 ай бұрын

    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!

  • @jermesastudio
    @jermesastudio8 ай бұрын

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

  • @ianmcglasham
    @ianmcglasham Жыл бұрын

    Excellent video.

  • @ShiroiAkumaSama
    @ShiroiAkumaSama Жыл бұрын

    This was very enlightened

  • @TripTilt
    @TripTilt Жыл бұрын

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

  • @cyrud8102
    @cyrud8102Ай бұрын

    Great info. Thanks.

  • @cr4niumblu371
    @cr4niumblu371 Жыл бұрын

    Wow that was cool

  • @cupo4tea
    @cupo4tea Жыл бұрын

    thanks, actually helped me with ao shaders

  • @saeedcg
    @saeedcg Жыл бұрын

    please do more of this 🙏🏻❤

  • @sanketvaria9734
    @sanketvaria97346 ай бұрын

    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.

  • @louiscampeau7823
    @louiscampeau78234 ай бұрын

    very nice

  • @BlenderRenaissance
    @BlenderRenaissance6 ай бұрын

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

  • @gabrielzim212
    @gabrielzim2128 ай бұрын

    my hero

  • @OrangeJambo
    @OrangeJambo Жыл бұрын

    I love this video lol.

  • @IridiumZero
    @IridiumZero7 ай бұрын

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

  • @ballskin

    @ballskin

    5 ай бұрын

    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.

  • @rogper
    @rogper Жыл бұрын

    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

    Жыл бұрын

    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

    Жыл бұрын

    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

    Жыл бұрын

    @@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

    Жыл бұрын

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

  • @johanavril1691

    @johanavril1691

    Жыл бұрын

    @@rogper oh yeah of course!

  • @devotae
    @devotae8 ай бұрын

    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

  • @SnowInHere
    @SnowInHere14 күн бұрын

    Followed every instruction and it made the design less realistic

  • @DominikWysocki-ml2he
    @DominikWysocki-ml2he5 ай бұрын

    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

    5 ай бұрын

    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: kzread.info/dash/bejne/lYVk09acg9zTdKw.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.

  • @npip99
    @npip998 ай бұрын

    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!

  • @Tatsumi7886
    @Tatsumi78869 ай бұрын

    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)

  • @namemanu
    @namemanu6 ай бұрын

    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

    6 ай бұрын

    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.

  • @Kimera_Alternate_Realities
    @Kimera_Alternate_Realities8 ай бұрын

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

  • @mch43856
    @mch43856Ай бұрын

    0:57 LOL

  • @TheCarmenStar
    @TheCarmenStar2 ай бұрын

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

  • @NovanByworks

    @NovanByworks

    2 ай бұрын

    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

  • @johanavril1691
    @johanavril1691 Жыл бұрын

    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

    Жыл бұрын

    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.

  • @OkaSel
    @OkaSelАй бұрын

    why did you not change the ao map from srgb to non color?

  • @NovanByworks

    @NovanByworks

    Ай бұрын

    Since the AO map is being multiplied over the diffuse map, it gets treated as a regular color layer rather than non-color data.

  • @danioldan4189
    @danioldan4189 Жыл бұрын

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

  • @NovanByworks

    @NovanByworks

    Жыл бұрын

    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.

  • @mr.hashundredsofprivatepla3711
    @mr.hashundredsofprivatepla37118 ай бұрын

    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

    8 ай бұрын

    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.

  • @nengyuluo6709
    @nengyuluo6709Ай бұрын

    basiclly use 1-NdotL to multiply the AO map right?

  • @NovanByworks

    @NovanByworks

    Ай бұрын

    This would be the ideal solution, but Blender sadly doesn't allow using light direction in shaders for some reason.

  • @kabetee
    @kabetee Жыл бұрын

    BASED = SUBBED

  • @lakrimozzza8312
    @lakrimozzza83124 ай бұрын

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

  • @NovanByworks

    @NovanByworks

    4 ай бұрын

    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

    4 ай бұрын

    Thank you! 😊@@NovanByworks

  • @zaferec2354
    @zaferec2354 Жыл бұрын

    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

    Жыл бұрын

    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

    Жыл бұрын

    @@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 Жыл бұрын

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

  • @NovanByworks

    @NovanByworks

    Жыл бұрын

    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.

  • @PranayVaidya007
    @PranayVaidya0076 ай бұрын

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

  • @NovanByworks

    @NovanByworks

    6 ай бұрын

    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

  • @chryssdale5747
    @chryssdale5747 Жыл бұрын

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

  • @NovanByworks

    @NovanByworks

    Жыл бұрын

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

  • @joepeezly
    @joepeezly4 ай бұрын

    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

    4 ай бұрын

    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

    4 ай бұрын

    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
    @artemsh63029 ай бұрын

    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

    9 ай бұрын

    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

    9 ай бұрын

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

  • @Maxboun3204
    @Maxboun32045 ай бұрын

    I wanna go home

  • @rjwh67220
    @rjwh6722010 ай бұрын

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

  • @andrewscott985
    @andrewscott9853 ай бұрын

    _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.

  • @arbiter8246
    @arbiter82468 ай бұрын

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

  • @wuhfails9736
    @wuhfails97369 ай бұрын

    this only works for eevee?

  • @NovanByworks

    @NovanByworks

    9 ай бұрын

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

  • @wuhfails9736

    @wuhfails9736

    9 ай бұрын

    I need AO in cycles :(@@NovanByworks

  • @aliborvayeh7123
    @aliborvayeh712311 ай бұрын

    my mind farted but it was very helpful nonetheless

  • @arturkadirov9280
    @arturkadirov92807 ай бұрын

    !!!!!!

  • @_Pawelski
    @_Pawelski11 ай бұрын

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

  • @NovanByworks

    @NovanByworks

    11 ай бұрын

    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
    @myrminki11 ай бұрын

    Witchcraft!

  • @AlexHutchingsOfficial
    @AlexHutchingsOfficial4 ай бұрын

    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

    4 ай бұрын

    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
    @red46669 ай бұрын

    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

    9 ай бұрын

    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).

  • @maksymriabov1356
    @maksymriabov13569 ай бұрын

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

  • @NovanByworks

    @NovanByworks

    9 ай бұрын

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

  • @nicholaspostlethwaite9554
    @nicholaspostlethwaite9554 Жыл бұрын

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

  • @NovanByworks

    @NovanByworks

    Жыл бұрын

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

  • @jknMEMES
    @jknMEMES5 ай бұрын

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

  • @NovanByworks

    @NovanByworks

    5 ай бұрын

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

  • @brzi6504
    @brzi65046 күн бұрын

    crappy editing

  • @NovanByworks

    @NovanByworks

    6 күн бұрын

    Thank you for the constructive feedback. 😊

  • @Blenderclassecom
    @Blenderclassecom Жыл бұрын

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

  • @NovanByworks

    @NovanByworks

    Жыл бұрын

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

Келесі