Optimizing Your 3D Scenes for Faster Rendering

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today i will be talking about scene optimizations and how you can improve your render times and get a better scene interaction this is part 103 which i was recently holding at an autodesk webinar if you would like to help out this channel and if you haven't done so yet i would really appreciate if you would subscribe to my channel and support me that way so now let's get started with stage one and optimize your scenes alright so in stage one i want to talk about scene optimization and this scene is actually fairly complex because it has quite a few different elements to it as you can see we do have x-gen fur quite a lot of that actually and we do have these big dots on the back here are raindrops we do have subsurface scattering all over the place and we have our usual ones like diffuser and specular and we do have a few area lights at the top and we also have one big dome light which is illuminating the environment on the left here you can see the render from a client and you can see it's very nice looking we have nice shallow depth of field we have all the elements in place we can see the fur on the on the on the stem here and we can see all over the nice details of that little ladybug one problem is that this render takes roughly um 23 minutes and 41 seconds on my machine so it does not seem like a high number because in production you do tend to get way higher render times and bear in mind this is a rather simple scene but it just shows how much you can optimize your scenes and the first thing what i always do when i look at scenes or some people tell me oh my renters are so slow what can i do the first thing i do is i look at the samples and specifically i do look at the camera a samples and then the corresponding indirect diffuse and specular passes like transmission and subsurface scattering because all of these combined make up your render time on top of that there is now adaptive sampling in arnold which if not used properly can really be a bottleneck and really take some time this is right now enabled and it has a maximum a of 20 and an adapter threshold of 15. so this essentially is very high render settings and it essentially means that this render will not take 4aa samples for camera a but it will roughly take 20 which is very expensive and takes a long time on top of that you do have ray depth like diffuse and specular depth it means how often the ray bounces in your scene until it returns the color and the higher this number goes the more bounces you will get and the longer your render times will be so i've seen quite a few different render setups and i've seen quite a few of different render times obviously so i've seen people go 10 10 10 10 10 and then the fuse also 10 10 10 and they wonder why the render is super slow and i can tell you it's you are very much over sampling your scenes and you're just not taking the power of rendering which you can achieve so i want to quickly break down what is very important how all of this works so quite importantly the a samples here are your main multiplier essentially so camera a will be multiplied by itself so in this sense here it will be four times four samples um which equals to 16 already and then this number will be multiplied with each of its sub components as if they are quadratic as well so three times three this one will be um nine and the other ones will be nine and this one will be sixteen and this one here at the bottom will be four hundred so now sixteen times 400 will be a very high number so this is how many samples actually will be calculated if your adaptive threshold is at 0.015 which is quite low which means very high render times so when i get scenes like this i always first check the aovs in this case um these aovs here or this render was rendered very high so everything will be extremely clean and that's why it took so long to render so typically what i do before i like how i optimize scenes i make sure that i output all the aovs and it's the typical one so you have your sheen your specular your sss and all the default ones and importantly to debug a cpu time and rate count which are similar but they give us a bit of different results which is very interesting to see and then what i do i reduce my render settings even though these are like the clients high settings what i always do i go two one one one on everything i always disable adapter sampling and i do this so it's one depth for each of those raid depth and then i hit render hit play let's see what we get now so the scene did render already let's show the buckets um show render tiles and if i update full scene you will see that we get the scene rendered it's very quick it's not 24 minutes but it is eight seconds and you can already see that yes we do get noise which is totally fine and because we have low settings you can see that the x-gen fur at the bottom here is a bit noisy you can see that the ssc on this little uh i i call them antlers it's probably not the right word and then you can see we have because of depth of field we also have quite a lot of noise and you can check the aovs if you scroll down through them so that cpu time we'll be discussing that you've got your diffuse direct you can see that is even noisy um and if diffuse direct is noisy you only can do camera a samples increase those indirect is very noisy we don't have sheen and specular the same specular direct is pretty noisy indirect is even worse and then you have your scattering passes and they are all pretty bad so this already gives me some kind of clue and if i check the ray count you will see that if you enable your pixel information you can see how many samples or rays were cast and essentially this is now nine rays the brighter it is the more rays will be passed on onto your renders which will take essentially longer that's why i said cpu time is quite similar to raycon because the more rays you produce the longer it will render and you can see that the cpu time on this specific pixel took i know four whatever that unit is i'm not sure but you can just gorge or see uh which took the longest and that's also a quite good indicator which will um which shaders or which lights or whatever are very expensive but you can see our glass or our water droplets on the back are quite heavy and all the subsurface scattering sections are also quite heavy all right so the first step what i always do i slowly start increasing my samples and because we have that field you would probably need to raise your aaa samples so what i always do i zoom into a region which is very out of focus let's say this one at the back here and you can see the buckets came in and let's just go from camera aa2 to 4 and see what happens you sometimes need to update your scene for them to actually kick in and you can already see it got a lot better it's still noisy but it is um gotten getting a lot better here and we still have quite a few of noise in the antlers and still in the specular passes so next up what i do i just update my subsurface scattering because you can see now that my subsurface gathering passes are still very noisy these ones here so i'm cranking those up maybe two three and hopefully you can see this already got a lot cleaner and we did a similar thing for for diffuse and specular because they were also quite noisy and let's render the bottom section here and you can see already this is cleaning up quite nicely we still have the problem of very low depth of field so to get clean depth of field renders obviously you have two options you can render this in compositing or you can increase ua samples and for depth of field you unfortunately need to crank up your camera a samples so let's say i go up to uh let's say eight and see if this gets clean now you always need to update your full scene and this is now getting very clean so what happens now is if your camera is this high you will sometimes over sample a few parameters so what happens if you go on high if you use high camera a samples you tend to go lower on the other ones because this will now rebalance everything all right so now we have a one minute 43 seconds render and it's improved a lot so let's just cycle through the aovs we have our diffuse direct which looks now very clean um our diffuse interact has a little bit of noise on the white sections here it might be the subsurface scattering then we have specular direct which is pretty good but then we check the specular indirect and we can still see there's quite a lot of noise in here and this is because we reduce it back to one so we will definitely need to adjust that back and then sss is very clean on two and the indirect is probably neglect triple so all we gotta now check is how can we get rid of the noise here at the bottom so let me just select this region here and do specular of two and see if we can get that cleaner and if you compare this now with two specular indirect samples it's getting a lot cleaner now so what we can do to top everything off is we can enable a denoising operation which is quite cool to do so you can just head over to images add imager and then you go for the denoise noise denoiser and what this needs is you will need to restart your render because it it will add custom aovs for the denoiser to work and what we can test we can now actually reduce our camera aaa samples down to two and hit render so now with the denoiser enabled you can already see that our image is still a lot cleaner and it's now down to 44 seconds for the render we still have some artifacts here on the depth of field areas but that's quite easy to clean up so what i want to do now is i want to enable adaptive sampling because we did disable this in the beginning so if i bring it back now on and my good settings were roughly around 8 camera a sample so let's just go for safety and put this to 10. so our maximum aaa samples will be 10 our minimum will be 2 and the adaptive threshold will control which kind of range of samples to use the lower this number the more it leans towards 10 and the higher this number it more leans towards two so i want to try something like .005 as pretty good settings and i still have my denoiser on and for now i just want to render this region here at the back and see how my depth of field behaves alright so this depth of field now it looks very clean and we do have denoising on we have two camera aaa samples and we have 10 maximum a sample so now let's render the full thing and see what time savings we got with the added adaptive sampling our oval image is a lot cleaner just because it finds where to to add or more samples to clean up the noise our final render time is 3 minutes 39 seconds and our original render time was 23 minutes and 41 seconds so we are roughly eight times faster with these render settings and the result there is a little bit of difference because the denoiser also helps to clean it up but essentially we have a very clean image and it's a lot faster obviously these settings are very specific to the scene but i wanted to show you the overall thought process of how to eliminate noise go through the aovs check your render settings and do it step by step things to consider are your light samples sometimes they are also set to high and sometimes if your light samples are too low meaning one you are sometimes under sampling which also takes longer to render so make sure you balance your light samples as well as your aaa samples last but not least i really want to touch up on the arnold gpu it is a very easy way to speed up your interactive render sessions and to optimize your scenes as well so right now my scene is set up for cpu but it's very easy to just do the switch head over to your render system here and go to the device selection and just change it from cpu to the gpu you will notice that you will gray out all these parameters um the reason is the gpu works a little bit different than the cpu and you do not have this granule granular control about controls and that makes it quite easy to control because you just have camera a and you do have adaptive sampling and obviously you do have still have the ray dev because this is a different setting so now i switched over to the gpu now let's just hit play and see what we get this is now running on the gpu and you can see it's very fast and if i switch over to my perspective camera you will see that if i tumble around we get a pretty fast response time um currently this session is uh running progressively so the steps get finer and finer and finer until you get your your resulting um aa samples typically what you want to do you want to always work with adaptive sampling on the gpu or you just you definitely need to crank up one setting so you can go really high on the gpu so if you do camera a820 this will just slowly progress and get cleaner and cleaner and cleaner and then just after a few seconds you get a very clean and resolved image and this is very nice to work on the gpu you can also use adaptive sample how this works is quite similar to you on the cpu you specify your minimum and you specify your maximum and then it's defined by the adaptive threshold you don't want to go too low with the minimum aa sample so what i always do i go down to five for my minimums and then i enable adaptive sampling and then i go pretty high on my maximum camera a samples um something around 60 to 80 for max is pretty good the gpu as i said works a little bit different so you need to have different values you can start off by going on a higher adaptive threshold maybe 0.25 and then just let's see how that works and this is now the result after 53 seconds you can see we still have a little bit of noise but all you got to do now is reduce the adapter threshold to maybe 0.05 or something and then you will get a clean image and you can also use images denoising all the fancy stuff can be used on top of that as well i have now reduced the adaptive threshold to 0.05 so now let's see until the image is resolved using the denoiser just after a few seconds we have a very clean and resolved image and this is the beauty of the gpu it's uh it's very fast if you have a good supported gpu and you get most out of arnold this concludes stage one i hope you learned something and if you did please let me know in the comments below and i would really appreciate if you would subscribe to my channel and i will see you in the next one [Music]
Info
Channel: Arvid Schneider
Views: 18,899
Rating: undefined out of 5
Keywords: arvid schneider, vfx, maya, autodesk maya, maya 2020, maya 2022, maya tutorial, arnold, arnold renderer, maya 3d, 3d, 3d modelling, 3d texturing, lookdev, rendering, 3d rendering, lighting, 3d lighting, cgi movies, visual effects, vfx artists, hollywood vfx, vfx tutorial, vfx effects, autodesk, 3d tutorial, simulation, fx, render, solidangle, surfacing, shading, 3dsmax, 3d render, denoiser, tutorial, texturing, texturing tutorial, optimizing scenes, scene optimization, maya lookdev
Id: mLMXWCLX4SY
Channel Id: undefined
Length: 15min 57sec (957 seconds)
Published: Fri Jul 23 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.