How to Create Shadow Matte and Occlusion Matte in Maya Arnold | Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so what we are going through today is basically um how to render shadow maps and then um that there's definitely a advantage in exporting or rendering shadow maps if for example you have a very heavy scene and your environment it's fully done and you know that you will never change environment again and your character animation is ongoing so what's actually technically changing is just your character and the shadow casting so instead of re-rendering the set every time you can just re-render the set without the shadows and if the animation that is always updating you can just render the character with its shadow so it will be less expensive to render and it will be faster to turn around and you save the resources to re-render your very heavy set again for example but of course there's also limitations for example if you do not have a character in a set to cast a shadow that will means that it does not have its reflection as well um so if you were to do that separately and your environment has reflective surface then you need to you need to render the reflection parts as well to to make sure everything ties together with your character cool so now um i have a very basic scene setup so i will just uh quickly go through i have a ground plane um three geometries um one environment light so let me just name this emp like and this is my key light so two light source okay let me just quickly um give the like uh like group so this is my key and this is my env okay so now um i have a basic scene setup and what we need now is okay um the shadow pass but before the shadow pass what we need is to make sure we have all the parts set up for example now i need my environment uh i'll call it the set which oh no sorry i'll just call it the ground okay create collection and this will be my ground geometry so i'll just put in the ground geometry into here okay so now if i render here let me just save this okay if i render here i just get my ground without the geometries there okay so this is done then i need my um for example my geometry pass that create collection okay so inside this geometry plus i will need all my other shapes right so i'll put other shapes into this collection so this will be my joe um joe geometry okay so it's all of them then we will knit um another collection which is the ground okay so we'll put in the ground okay so but in this pass we only need to render the geometry without the ground but we need the ground there to be occluding the lights that you have set up in the scene right so what we need to do next is make sure you are viewing from the render pass select the collection okay just go to the any of the shape node inside arnold right click primary visibility create absolute override to the ground geometry okay and then inside this collection just turn off the visibility okay that way if i were to render now i should get just geometry and it should look exactly the same with and without the the ground okay so now if i were to comb this on top of my ground it will looks 80 correct without the shadows so now what is missing is just a shadow but before i proceed let me just quickly do a save before i mean just in case it crashed okay so now we need the shadow pass so we'll just create another render layer so this will call the shadow maps okay inside this shadow map basically again we need the the collection of both of the geometry and the ground so we'll just create the geometry collection which is this okay and then again the ground collection which is this okay but before we proceed further let's just make sure we have all the aovs set up okay let's just go into our aovs okay so now nothing okay so um if you are you are you want a shortcut to create all the like aovs instead of typing rgba your like group um for all your likes what you can do is you can go to you can just select rgba okay put it into your active aovs okay click on this arrow and go to the aov node so you select that go to attribute editor you will see this um like group attribute and then if you do the drop down you'll see that there's this global aov okay you can just deselect that and activate all light groups so what this does it will use um whichever light that has the light group you put in this rgba and export out aov so instead of typing them one by one you can use this and you'll get all your likes it will be for free okay so that's your like uv then for example now i will need my shadows i can just scroll down and then there is this shadow ai shadow map just bring it over okay so now if i go back to my um seed and if i just render like that let's just see what we get um like that okay from here okay render okay so nothing happens right okay so first what we need in this shadow path is we don't need the visibility of all our geometries right so these three geometries in this collection we can just right click visibility create absolute override and turn off okay so now if i re-render we won't get that um the visibility of the geometries okay so what's next is we need to assign a a shadow map shader to this um ground and how we can do that is we can go to the ground collection okay right click um create material override okay choose a material and you can type a i capital s shadow map this okay once you assign that you'll see that um there's options for you to choose you can choose a background okay we don't need the scene background we can just choose a background color and then we want our okay what we want is we want our shadow map to be white color right so we want the shadow to be white and to to make sure we have the selection we just need to change the background color to black okay so now once we do that and we re-render again okay this is the beauty okay you see that okay although this is the beauty we can ignore this because ultimately we'll just shuffle out the shadows which will be what we have here uh let me just minimize this okay so then we got our shadow pass so we can just come we can use this as a map and we can grade um them in com on top of our ground plane okay um another advantage that we have um exporting the um shadow path separately is that we can control the brightness and not the brain yeah the shadow density like how how dark is a shadow or how blur is your shadow you can do all those in post instead of breaking it into your render so you have additional control and if that's the route you'll go um so this you can do this um to get that okay so um what another thing that i like to do on top of this shadow path is i like to have the occlusion um of the geometries on the ground because sometimes even with the shadows you feel that the character is not grounded to the to the to the floor because there's there's this lack of occlusion um on the on the renders so what we can do is we can output one more aov which is the occlusion and we can use that to on top of this shadow path and we can use that to make our blenders sit together more on top of this shadow path okay so what we need to do is we'll go into the render settings so i will just go into my render settings here okay it will be i'll just create a custom one called occlusion okay so inside this occlusion same thing i will just click on this select aov node and go to my attribute editor okay what we can do now is we'll assign a shader for this aov so inside this custom aov there's this shader just click this and we want to assign a ambient occlusion let me remove this okay assign ambient occlusion okay so now if we were to re-render again okay and we go into the occlusion aov we get this but um if it's black on the occlusion area it and what you need to do in later on basically you need to invert right so but since we are here we can just tweak the occlusion shader to work the way that we want so we can just reverse this white and black okay just reverse this okay and we render again so we get the occlusion and then if we go to the shadows we get the shadows okay so that's how we can um output all these smarts and then maybe just let's quickly um render out this uh passes and we'll just take a quick look in new how we can put all of them together so let me just turn off this okay all this seems okay i'll go to render render sequence okay then render from render cam and i want to choose a folder let me just set then render and close okay so i'll just wait for a while for the renders to be done and then meantime i'll just open up my nuke okay then that's my images okay oh sorry um so if i see this um something tells me that my renders is it's not coming out like how i want because it's creating uh folders for all geometries and if you guys remember in my some of my demos um what it means that is your aov is not merged so you need to go into render settings make sure you merge your aovs okay now let me just um re-render again okay i'll just go to render and the sequence then render and close okay so mean time you'll see that it's rendering here okay for some reason there's this round one in my render layer that i accidentally put in so just ignore that okay looks like it's done i'll just go to my nuke okay this is my geometry and this is my ground and this is my shadow map okay so very simple we can do our regular a over b okay okay so it looks 50 right right then what we need to do is um before we merge the geometry of geometries on top we can use the shadow map and we can shuffle out okay we can shuffle out the occlusion okay and we can shuffle out the shadows okay so let's just name this note so we can see clearly what it is so now this is the occlusion and this is the shadows okay so now um okay we can do them one by one we can create a grid node okay okay you can just view the full image add a grid to your your ground renders okay let's just work with the shadows first okay and we can grade the shadows so you see you can click however dense your shadow is um or maybe you know i i feel that it's too sharp now i can just soften it with a blur so it has its advantage if you want to do it in post um yeah so you can blur it you can make however dense you want or you can add a color to it if even if you know you want some colors you know shadows you can do things like that and what i mean by you feel that your your geometry is not really sitting you see it doesn't feel like it's sitting on the ground um maybe it's my implant but it still feel it's like of some occlusion um between the ground and the geometry so what we can do is we can use the occlusion path now and then okay we can just create a little bit oh wait let me just double check the occlusion um oh should use we can use a keyer to make sure i get its alpha okay okay so it's aluminium luminance key okay just if i view from here and i press a the alpha it's where i want okay and then go back here okay you can increase so you see um view okay then if i were to reduce this you can see that um the areas that is closer to the geometry will have a bit more of the contact then than other areas that it's further away so this will help to ground and sit your geometries more into the scene and if it's if it's not bright enough what we can do is um we can push the alpha if you if you really want to cheat it that way we can push alpha um a bit more right i mean i'm just exaggerating it but you you get what i mean see then of course this is too much um but you can basically increase your the alpha and you see that it helps to to push those contact points a bit darker and it will sit your character um nicely up much better in your scene yeah and this you see the this line is probably it's one or two pixels above the ground that's why it's not really sitting but this is not too bad yep so that's the the the overall idea on shadow maps and how you guys can use them and render them separately if you need and then for example if this ground or this background is a super high-res one and you are changing your your characters always um you will not need to render this background ever again and just focus on rendering your mats and your character the match as you can see it will be super fast so it it's definitely a pros or positive steps to take if if you have a very heavy scene um yeah that's that's shadow maps for you and thank you everyone all right so if this demo or tutorial is helpful to you don't forget to click the like subscribe button and if you have any questions feel free to put in the comment section and i'll reply them as soon as i have a chance to have a great evening so see you guys next video
Info
Channel: TOILSTORY
Views: 3,848
Rating: undefined out of 5
Keywords: TOILSTORY, THETOILSTORY, autodesk, maya, arnold, rendering, lighting, compositing, vfx, visual effects, cg, cgi, render, tricks, tips and tricks, 3dsense, 3d, tutorial, demo, light, beauty, nuke, foundry, render layers, render passes, composite, demoreel, portfolio, cryptomatte, settings, samples, education, cinematic, shatner, light filters, light filter, barndoor, gobo, blocker, deep compositing, deep exr, god ray, volumetric lighting, light scattering, dof, depth of field, shadow matte, occlusion, aiShadowMatte
Id: nEe2oigbYGE
Channel Id: undefined
Length: 17min 18sec (1038 seconds)
Published: Mon Sep 27 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.