Rendering Models With Shadows on Transparent Background with #Vray

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey everybody and welcome to today's video where i'm going to try to answer a pretty common question that i've received and that is how to go ahead and render out a model in a studio background but keep the shadow and at the same time render it in a transparent background now this is actually pretty common when you're rendering uh for products because the client will generally want to put their model on a web store or a different background and it's always very very convenient to have the model exported out as a png with an alpha channel but a lot of times i've seen people just rendering out the model and then going inside photoshop and trying to basically paint in the shadows well there's not really any need for that because it's very very simple and easy to export out the shadows within v-ray so i'm going to show you how to do it uh now what i'm going to use is i'm going to use the same scene that we worked on in the previous videos if you want to see how to create this whole thing just check out the previous video as a starting point what i'm going to do is first of all i'm going to start the ipr there we go click on the certain directive rendering and this is exactly what i'm looking at right now so this is what we have set up in our studio lighting scenario now what i want to do is i want to make sure that i have my model but now since we also want to incorporate the shadow it would be a good idea to try and find an angle in which i can see more of the shadow as well now in this case the shadow is pretty diffused so just so i can get a better understanding as to where exactly the shadow is what i'm going to do is i'm going to select my light here the the main light i'm going to decrease the radius so the shadow becomes much more sharper so i know at least where it is like this and what i can see at the moment is it's pretty far off so in order to make it a bit closer to the chair i'm going to rise it up something maybe like this all right so now i have the shadow inside my rendering or my save frames again i'm going to bring the radius back to 44. all right so back to diffused there we go so now we have my main object and the shadow within the safe frames so now next thing we want to do is i'm going to open up my material editor and i've switched over to the slate material editor so if you have it too compact just you're gonna see the same thing we did on the first one but if you go over to the slate you can follow along easier like this and the reason is i want it to be more visually simple to follow along so for this i'm going to sample the base here and then we'll put our floor material in here and now what i want to do is i'm going to put this thing to the side so we can actually see the changes as i'm doing them what i want to do is i want to use a material wrapper for this so i can just click on wrap here and drag out a vray material wrapper in here take our floor put it in the base material and now select the actual floor and apply the material rapid to it now as you can see nothing changed and if we take a look at the options for the material wrapper on the side on the navigator you can notice that these options can be found on a different place namely if i right click on the floor and go to vray properties i can see these same objects over here so you have uh object properties where we have the generate gi receive gi over here we have the shadows here and we have the mat so all of these options can be found over there but for now we're going to use the material wrapper to control everything in this scene if we go over in the options here where it says additional surface properties first we have generate gi and both of these are set to one if i increase the number to let's say three what you're gonna notice is that we have much more light bouncing off and it's being generated from the actual floor on which we have this material wrapper applied to which can be seen as a lot of that whiteness is being transferred over to our model we don't want that so i'm going to put it back to one at the same time if i increase the received gi and increase this we're just gonna notice that a lot of that whiteness is again transferred over to the floor but not so much as it's bouncing it off so we're gonna leave those two at one for now and this is the important part where you can actually tick on matte surface now take a look at what happens as soon as you tick this thing off you're gonna notice that at the moment everything disappeared and it looks like it's placed on a black background now this black background is the actual background that we have here and in order to check it all we have to do is just press 8 and that will bring up the environment and effects and here you have the color for the background now if you're using a hdri it's going to show the hdri but if i go in here and i just change the color you will see that that color is translated well into our render here now i'm going to turn off my environment for now and in here i have the other option where it says shadows so if we click here this is what happens the shadow will appear again but now uh at the moment i'm still not being able to export this out as a transparent background because this thing is still contributing to the alpha the way that we can see it is if i go over here where it says rgb color and i switch down to alpha you will see that everything in here is now white this means that this entire base here is contributing to the alpha so here we have another option where it says alpha contribution set to uh one if i put this thing to zero what you will notice is that now the only thing that is being contributed is this uh chair cut out here but if i click on effect alpha again nothing changes so what gives what is the problem if if we did everything right this should affect the alpha well the reason why this is not affecting the alpha is because the alpha contribution is set to zero which means whatever that we do it will not translate well and it will basically be invisible but if we now go ahead and decrease this to minus -1 now we're gonna see a much different result namely i can see that anywhere that that we have a shadow that is being basically cut into the alpha map and it will translate well with the final result now to make it even uh easier to see what i'm going to do is i'm going to go back to my background put this thing to black here it's not really going to be seen but now when we go ahead and render out the final result this will basically take the alpha contribution and we can have a final result which will be basically baked out or rendered out with the final result with the alpha so i'm going to do is click on save now choose the name for this i can call this chair shadow oh three actually tested this thing previously and very important thing here is that you save it as a png or another format which will allow you to save it as an alpha map so click on save and once you have the png configuration by default this thing should be ticked on but if you tick it off it will basically not save the alpha channel and it will save it with the background but we want to save it with the alpha channel so click on ok and just like that you now have a png file that is baked in with the shadow so now if i go in and i open up the final image that we rendered out it's going to look like this and if i go over and open it up in photoshop let's put it in here there we go we can see that we have a transparent background with the shadow along with the chair so if i go ahead and drag this thing into any scene you can see that i can drag it in place it and have it look like it was rendered in the scene but do take one thing into consideration for example in this scene a very important thing that you want to think about or think ahead of time before doing the rendering is depending on what is going to be the lighting scenario in your background image you will have to do the modifications to your model in order for it to look realistic because in this case if you take a look at my shadow it's casting over to the back side while the light is coming from this side so this will not work well because it's going to be very easy to notice it's a fake model just implanted into the scene so even though everything that i showed you how to render the model with the shadow is valid take into consideration what is the actual background that you will be placing your model in and knowing that do the necessary modifications to the light in order to put it into a scene that is going to look much more realistic so we can try to do this thing uh in a couple of different scenarios maybe something like this put it in here again here the uh lighting is a bit closer to normal but here the other thing that also might be a good thing to note is that you might want to consider checking the perspective angle at which this thing is rendered because even though this thing the lighting is okay to us to a degree in this case the angle at which this thing is rendered does not really fall in well with uh this scene so if you take account on the lighting scenario along with the actual perspective you should be able to render out a image that with the shadows inside the alpha channel can be implemented into pretty much any sort of a scenario that you might need for your client and this about covers the basics on how to render a model with the shadow in the alpha channel so i hope you guys had fun and you managed to learn something new from this video if you like to support me you can click on the join button and the direct links will be in the description below and the most helpful thing you can do is always click the like and subscribe buttons and comment below in the videos and as always thank you very much for watching and i will see you all in the next video bye-bye [Music] you
Info
Channel: Denis Keman
Views: 19,801
Rating: undefined out of 5
Keywords:
Id: yP7--sRyDn0
Channel Id: undefined
Length: 13min 21sec (801 seconds)
Published: Mon Jan 18 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.