Ambient Occlusion

FilmSensei
FilmSensei Posts: 3,114 Expert
edited November 2020 in Post-production techniques

I am currently working on refining my skills / knowledge with regards to Ambient Occlusion in HitFilm. Does anyone have any articles or videos that they feel would be helpful to gain a more full understanding of the principles and concepts regarding this topic?

«1

Comments

  • FilmSensei
    FilmSensei Posts: 3,114 Expert

    @Triem23 That is an outstanding article, thanks!

  • Triem23
    Triem23 Posts: 20,689 Ambassador

    Yeah I only skimmed it myself, but I'm going to go back to it later. Nice discussion.

  • spydurhank
    spydurhank Posts: 3,193 Expert

    Here's one tip, learn to texture paint for a "hands on" understanding of AO. Better yet, learn to draw, illustrate and or paint... it gives you a much better understanding of AO and shading.

    Another tip, bad mesh topology, bad normals and bad shading generates bad AO... or rather AO will help to easily display a model built with lazy practices.

    If you want to learn about AO on a totally different level... spend 5 minutes with me in a video chat. :)

  • FilmSensei
    FilmSensei Posts: 3,114 Expert

    @spydurhank I would love to! 😀

  • tddavis
    tddavis Posts: 5,201 Expert

    @spydurhank 5 minutes? Frank, you have highly overestimated my ability to learn. 5 hours...maybe.😁

  • spydurhank
    spydurhank Posts: 3,193 Expert

    Cool @FilmSensei :)

    Ah Terry @tddavis , you're funny. :)

    AO is simpler to use than you think. :)

    AO isn't something that occurs in the real world. Any 2D fine artist, illustrator or painter can tell you this but it's something very similar to the type of shading one would use as an artist when sketching, drawing, illustrating and painting.

    5 minutes dude... it only takes 5 minutes for me to teach someone a concept. :)

    Especially lately... I've been having more and more really good days where I wake up in the morning and my mind is working pretty good. Sure I have bad days when I can't keep a straight thought and my mind wanders very easily due to my head injury, but when I have a good day... man do I have a really good day where everything is possible. Using Hitfilm and Filmer just puts me in a very good and positive state of mind. This is when teaching is super simple. :)

  • tddavis
    tddavis Posts: 5,201 Expert

    Maybe this weekend if you're free then.

  • FilmSensei
    FilmSensei Posts: 3,114 Expert

    Yes! I am sure I am free!

  • spydurhank
    spydurhank Posts: 3,193 Expert

    I'm always down. :)

  • FilmSensei
    FilmSensei Posts: 3,114 Expert

    @tddavis name a time that you would like to get together on Skype, Zoom, or whatever.

  • tddavis
    tddavis Posts: 5,201 Expert

    I have Skype but not zoom. Anytime Saturday morning or afternoon. Whatever works best for you and Frank

    @FilmSensei @spydurhank

  • FilmSensei
    FilmSensei Posts: 3,114 Expert

    @spydurhank What time would work for you?

  • spydurhank
    spydurhank Posts: 3,193 Expert

    @tddavis and @FilmSensei ,

    Sorry for the late reply.

    Weird thing happened but I didn't forget you guys. for the past 4 days till this morning, my body temp kept dropping really low, something fierce, it felt like I was freezing while it's like, 74 degrees in the house, my body would shake and shiver so bad that I could barely breath, and every muscle locked up so the best I could do was stay in bed. How can it be warm in the house but I feel like I'm freezing?

    Woke up this morning covered in sweat so whatever it was that was dropping my temperature, feels like it is gone. At least I'm not freezing anymore and that part was just really weird.

    Anyway, sorry again for the late reply, let me know if you guys still wanna do a video chat.

  • FilmSensei
    FilmSensei Posts: 3,114 Expert
    edited December 2020

    @spydurhank That really sucks. I hope you are feeling better. I would still love to get together and chat about AO, but only when you are feeling up to it!

    BTW, I picked up the newest version of Filmer, and dude it is sweeeeeeet!

  • tddavis
    tddavis Posts: 5,201 Expert

    @spydurhank Were you actually getting low temp readings or just felt freezing? Cause the second is classic chills with a fever. Hope you weren't actually running a temperature and didn't know it. Since I never heard defo plans I figured everyone was busy 😁 Ditto FilmSensei's plans.

  • spydurhank
    spydurhank Posts: 3,193 Expert

    @tddavis Ah, Court told me I was cold to the touch. It felt like the kind of cold that is so cold that, it burns. Let me tell you it was really weird. No idea where it came from.

    @FilmSensei Wait till you get your hands on the Filmer I've been working on. I'll try to have it uploaded in the next few days, just gonna wait a few days till I feel better :)

  • nightlogic
    nightlogic Posts: 2 Just Starting Out
    edited December 2020

    I've been having more and more really good days where I wake up in the morning and my mind is working pretty good. Sure I have bad days when I can't keep a straight thought curve text in gimp

  • goetziwoodstudios
    goetziwoodstudios Posts: 12 Enthusiast

    You should be aware that, as in most games engines, Ambient Occlusion in HitFilm is wrongly used.

    Normally, as its name implies, 'Ambient Occlusion' should only affect the "ambient" part of the lighting equation, but in HitFilm the direct lighting is affected by the 'Ambient Occlusion', which is very wrong. I'll make a detailed post dedicated to this issue later on in the support forum.

    Linked issue is that the Environnement Map should not be part of the objet Material but part of Ambient Lights.

    Had the same issue in iClone from Reallusion, but after a while they finally realized the issue and corrected it to have the right behavior.

    Most people don't understand - if not what is AO - at least HOW to use the AO result in final compositing, be it realtime or not.

    Just for you to know that I know what I'm talking about: I've worked in the CGI/VFX industry for almost 30 years, I'm one of the first - if not the first - R&D department head who introduced and implemented (in France) an Ambient Occlusion shader for mental ray in Softimage|XSI in the early 2000 from the Siggraph ILM paper (who invented AO and first used it in "Pearl Harbour" in 2001).

  • FilmSensei
    FilmSensei Posts: 3,114 Expert

    @goetziwoodstudios I look forward to your more detailed post on this topic. Thanks!

  • tddavis
    tddavis Posts: 5,201 Expert

    Me too. I do not understand AO even a little bit.

  • goetziwoodstudios
    goetziwoodstudios Posts: 12 Enthusiast

    I know you understand 'what' is it, but seeing how it is used in HitFilm shows that there is a misunderstanding about how it should be used, even in known game engines they made the same mistake, in iClone too (but they finally fixed the issue..). Sorry if I sound too direct/rude/patronizing but I've seen so many times the same misuse over and over.

    In game engine AO is here as a 'feature' that is supposed to make the image more pretty, but certainly not 'realistic'. In movies CGI/VFX AO must be used correctly (ie mostly that shading from direct lighting shouldn't be affected by AO) because the goal is to create realistic images, and AO is just a trick to speed up rendering created at a time GI and path tracing were too heavy in production.

  • goetziwoodstudios
    goetziwoodstudios Posts: 12 Enthusiast

    I'll post images to precisely show what's wrong but if you are confortable with the 3d engine in HitFilm you can do this simple test: Import an object (no need for texture) and activate AO, make it strong. Now use an ambient light, you should have the expected result everybody is used to. Now switch the ambient light to a point light. You will see that in the areas lit by the point light, the AO is still here. It shouldn't.

  • goetziwoodstudios
    goetziwoodstudios Posts: 12 Enthusiast

    Actually AO IS something that occurs in the real world, but it is implicitly part of Global Illumination. The fact you think it isn't and that it looks like sketching is because it is wrongly used in most game engines.

    Having AO alone without GI is a trick invented when GI was too heavy to compute in production, yet correctly used it is 'invisible' , you don't see 'dark lines' as we see in game engines. AO has been extensively used in movies, starting with "Pearl Harbour" in 2001, "Jurrassic Park", etc.. Obviously the result in those movies is quite different with what you see in most game engines when you activate AO.

  • tddavis
    tddavis Posts: 5,201 Expert
    edited December 2020

    @goetziwoodstudios I know you understand 'what' is it, but

    No, I really don't. It has always been a bit of a mystery what it actually is, what it is used for. My understanding goes as far as, I think it has something to do with self shadows. I have applied AO maps to models to see what changes they make, but never saw a ton of difference and assumed I was using them wrong (Probably the case)😁 An in-depth write up would be most welcome from me.

  • goetziwoodstudios
    goetziwoodstudios Posts: 12 Enthusiast
    edited December 2020

    Ah sorry, I thought your answer was a bit sarcastic, sorry about that ;)

    Well, to make it simple (I hope), either you are working with an 'unbiased' renderers, or not. Unbiased pathtracers like Octane, Maxwell, etc.. literally simulate the behavior of light in a physically correct way, so you don't have to 'cheat' to create realistic images. With 'biased' renderers like all game engines so far, 'cheats' are used to speed up rendering - pathtracing being very heavy to compute - and Ambient Occlusion is one of those cheats.

    First, for convenience and artistic reasons, lighting and shading computation in those 'biased' renderers is usually split in 3 components: Ambient, Diffuse, Specular (or more accurately Reflection). Each component is 'shaded' in its own way then combined to form the final image. 'Shading' being the interaction of lighting and surface materials.

    Ambient Occlusion can be seen as one 'shading' method for the ambient component, especially when combined with an 'ambient map' - or 'environment map'. Ambient lighting is very diffuse it comes from all directions (although with nuances when environment maps are used). Ambient light does not really produces 'shadows' but can be occluded by cavities. That's why you can think of it as self-shadowing but not really, if you have a ball with bump, you wont see per say 'shadows' around the bumps, but more a decrease of ambient light intensity 'around' the bump due to the 'cavity' formed by the 'corner' if you want, between the surface and the bumps. More obviously when there are holes or dents like on a golf balls. That's why we say Ambient 'Occlusion' instead of Ambient 'Shadowing'. The difference is important, we prefer to use 'Shadows' for direct lighting, and 'Occlusion' for ambient lighting. Obviously in the final image both are present, but, what's very important, as intuitively a shadow can be lit by another light, occlusion are lit by direct lights. Say you are inside a cube with some Ambient light + Ambient Occlusion, all the cube corners and edges will be darker as expected. But as soon a you put a point light inside the cube, those 'dark corners and edges' should disappear because now they are lit by the 'direct light'. Most of the time in game engines or applications that misused AO, those corners and edges remain dark!

    In simple math terms it is as easy as:

    ( Ambient Shading x Ambient Occlusion ) + Diffuse Shading + Reflection.

    The mistake being:

    ( Ambient Shading x Ambient Occlusion ) + ( Diffuse Shading x Ambient Occlusion ) + Reflection.

  • tddavis
    tddavis Posts: 5,201 Expert

    @goetziwoodstudios Absolutely not my intent at all. Thanks for that description. I've started a doc to capture as much info as I can for the future.

  • spydurhank
    spydurhank Posts: 3,193 Expert

    @goetziwoodstudios ,

    Howdy, my name is Frank, I'm fine, how are you? :)

    I'll invite you to watch the live show in the link this weekend. It is all about lighting 3D objects in Hitfilm.

    Live with Sensei S3 E2: Sketchfab Model Gameshow Contest! - Page 2 — FXhome Community

    I only urge you to watch your temper as you seem very loud and angry about how others use AO which is rather funny to me. :)

    I only ask that you watch your temper because you'll for sure give yourself a heart attack when you see how I use AO... you may even pull your hair out. Don't pull your hair out please. :)

    This initial thread is about using AO after it has been created through the natural passage of time and weathering, I didn't think that I needed to explain this because there is no AO in brand new and clean man made surfaces. Everybody knows that right?.. Right? ;)

    So you've been VFX'n for 30 years huh? That is pretty awesome but you're very angry for a Pro. :)

    I've been illustrating, painting, and animating in 2D since I was three years old, so for 45 + years. I'm 48 years old by the way. :

    I've been VFX'n, for 12 years and have done contract work for other VFX Pros, for Indie Filmer makers, for game engine companies, for online VFX training websites, and online VFX software companies. I've built tons of 3D models for FXhome.. sometimes I'll take the odd job for a user here on the forums. I also code my own version of Blender 3D named Filmer. I've created camera matchmoving techniques that help me composite render passes from different programs, I can even have the same 3D scene in both my Software Filmer and in Hitfilm for some compositing sorcery. :)

    I'm doing all this while recovering from brain damage that happened when I was 3 years old. :)

    But yeah anyway, make sure you take your nitro pills if you decide to watch the livestream that I linked above because I don't do nothing the way it's supposed to be done. For example... if you doubt my skill, I find showing is better than doin' a whole lotta yappin'.

    This is Hitfilm Pro 14 the 3D scene is lit with default Hitfilm shaders.

    This is with path traced render passes from Filmer, Shadows, AO, and Self Reflections comped over the same 3D scene above.

    Another one.

    I build all of my own 3D assets from start to finish. I know the entire 3D pipeline. :)

    Too much stuff to list but I look forward to seeing you in the chat during the livestream. I'll be on the livestream by the way. :)

    Nice to meet you. :)

  • goetziwoodstudios
    goetziwoodstudios Posts: 12 Enthusiast

    Hi, I'm fine thank you.

    And I'm certainly not 'angry'. I'm 53 years old by the way.

    I'm not sure what's your point here, you want to prove me wrong or something ?

    Btw, there is AO in brand new and clean man made surfaces. Everybody who understand AO knows that.

  • spydurhank
    spydurhank Posts: 3,193 Expert

    Ah, this is like kobayashi maru am I right. :)

    No @goetziwoodstudios , don't be offended sir. :)

    I knew it'd be 50/50 that you'd understand me and that you may be offended. That's just how things seem to work here when one person doesn't understand another person. No I'm not attempting to Prove you wrong, I'll explain as I go.

    You need to understand that due to the render engine limitations of the software... some of us need to get creative to get better results... if you've got a problem or a bias with this type of creativity... then try your best to set that bias aside or you'll miss out on all the creativity.

    I pointed out that I have brain damage, this damage makes it very difficult for me to tell between someone that is being sarcastic in a friendly manner and someone that is being plain rude. To me everything just sounds rude and snarky... so I don't do arguments or disagreements. I don't really know what to make of your comment to me... it sounds rude but it also sounds like you really just want to help... am I correct that you're simply trying to help? :)

    Again, no I'm not attempting to say or prove that you're wrong. That is what you're doing... not me. You jumped into this thread and started telling everyone that they're wrong. :)

    Using AO as it was initially and mathematically intended is one thing. Nothing wrong with this except that you can't hold anyone here to that standard because Hitfilm doesn't generate AO the same way as it is intended in other dedicated 3D applications.

    Using AO to do OTHER CREATIVE things is a whole other concept. This is how I use it, creatively that is,

    Because there is no point in trying to do it with physical accuracy in a program like Hitfilm that doesn't do it with physical accuracy to begin with. Get my meaning? Hitfilm can't do self reflections for 3D objects either which is a realism killer from my perspective because I pay attention like that. :)

    That's why I came up with a custom composting technique that combines AO from different 3D apps into one. I get something totally new and looks a lot more physically plausible than just using Hitfilm AO plus it has many other benefits when it comes to compositing. Especially when it comes to 3D object self reflections, and other stuff like Shadows, refractions and caustics. :)

    Check this... I don't even disagree with what you're saying about you being able to see AO in brand new man made objects. Because it only means that you can see better than everyone else. If you can see better than everyone else... then you and I should for sure be talking and exchanging ideas because I love it when someone pays as close attention to detail as I do. :)

    Although I see AO as an artistic tool and a not a set in stone commandment that I have to adhere to lest I be judged and scorned by mathematical purists.

    So I prefer the creative freedom of my imagination over how a bunch of programmers and mathematicians think that I should be creative which is limited in how software developers design software.

    The painter commands the paint brush and not the other way around. Same thing goes for computers and VFX software. :)

    Anyway...

    You should check out the livestream that I linked so you can see how we deal with ornery and or badly built 3D objects in Hitfilm because it's gonna be fun and a cool learning experience for all.

    Alright last thing in the form of a question and it's part of how I see and use AO in my Fine Art and 3D art...

    Were you born with those laugh lines and crows feet? Or did they... much like the simulation of AO in a computer... develop over time? :)

    So yeah, you'll never get an argument from me because I'm on another level and I know that we're both talking about the same thing... you just see it differently than I do and I want the benefit and privilege of knowing and understanding how you see things... be it mathematically or creatively. It don't matter how I get it... I just want to know it. :)

    So you can tell it to me angry or you can tell it to me all friendly like... friendly is way better but either way. I'll accept you knowledge without bias. :)