How To Bake Shadowmaps for MLOs | GTA V / FiveM

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so today I'm going to be just explaining and like showing the process of how to bake data maps for your Interiors there's already a tutorial on this but it's missing a couple things so I thought I'd I guess do my rendition of it so uh to start off what you're going to need to do is um for some reason blender decided to remove like the shadow pass in the render um here I'll show you some reason they removed the render pass Shadow mode so you have to use blender 3.3 uh to do this you can just download a portable version so you don't have to install it but so just make sure you're using 3.3 if you're wondering why you're missing the render pass so let's start off what you want to do is just so I'm going to bake uh just for one of the rooms here I've got my shell split up so I'm gonna for this room what I'm gonna do is Select it duplicate it and then I'm going to clear the parent real quick like this I'm gonna rename it real quick and I'm just going to Center the origin geometry then go into edit mode uh select all and then go and press alt s to scale down and scale it down just a tiny bit then once you have it scaled down so it's inside your shell like that re-center the origin room oh whoops now that we have that done what you can do is go to the materials and just remove all the materials you can also remove the color attribute just to clean up things then what we're going to do is go into edit mode what I would suggest doing is like tidying up the mesh because you don't need nearly as many vertices as your shell so first what I'm going to do is merge and then I'm going to press Alt J and then change the settings bottom left just copy what I did here this just turns it into quads so it's easier to work with so I'm just going to clean it up real quick and then I'll cut it out of the video and then come back when I'm done so now that we've got our mesh like simplified and I'll tidied up uh what we can do now is go ahead and um so go to the materials tab here add a new one go to the shading tab um add a light fall off node and then take the constant output and put into the base color of the principled bsdf then add a new image texture click new name it something like something like that I recommend doing at least one thousand by one thousand you can do higher but I wouldn't go any higher than 2K this is because if you have a big room it'll look really if you have a low res Shadow map I'd go with at least one case I'm just going to do 1K for this make sure you have your image texture selected as the active node and go back to layout and then what we can do now is switch to the rendered View and make sure you have the render pass set to shadow then go to the render tab and then under sampling you can turn on denoising for render this is what I'm using you can go ahead and just copy these settings I think optic X only works for NVIDIA gpus so you can use optic or open image denoise if you don't have that other than that what you need to do is go to light paths and then Max bounces I just have all these set to one then for clamping just leave that default caustics just uncheck the reflective and refractive and then for film here just enable the transparent checkbox don't enable any of the these settings and lastly go to bake and change the bake type to shadow and then change the margin to one pixel then make sure you have your oh lastly I forgot uh make sure you UV unwrap your um your mesh will select it all and then go into UV window press U and then smart UV project you could probably pack this better or use a different packing method but I'm just going to be leaving this default as it doesn't matter too much so now that we've got it UV on unwrapped we can go ahead and just click bake might take a second depending on how good your computer is but usually it doesn't take too long it'll say at the bottom here the progress and now that our texture is baked we can do is go back to material view then go to the UV window and then make sure you save your new Shadow map before we do anything else notice how it's like gray and just black it's not that vibrant uh like there's no white what we're going to do is open it in Photoshop or like or whatever it doesn't really matter but I'm just going to open it up and go to image and then I'm going to change the levels so it's a lot more white like this this is just so that there's uh less like shadow where there shouldn't be so that makes sense or just something like that I'm just going to save this and save it as DDS format and then for the DDS format I'm just going to be using bc3 uh compression now that that's done what we can do is go back to here and remove our new material we added go to solems and then add a decal ambient only Shader create it go to shading and just add our new texture then now what we can do is do the vertex colors so I'm going to be using vertex actually wait uh we're going to switch black back to 3.6 blender so to do so what I'm going to do is I'm just going to apply all the transfer uh yeah apply all the transforms on our mesh and then I'm going to I'm just going to rename this real quick so it follows the rest of the naming schemes none of that's renamed what I'm going to do is just create the drawable and I'm going to just go ahead and Export this I'm going to open up blender 3.6 it'll be like the latest version where your Project's going to be and I'm just going to import or exported XML and then I'm just going to add the texture again um what oh I used the wrong texture now that we have our being imported uh you can see there's a small issue here like it's I'm just going to merge it real quick and then clear the custom normals I'm just going to fix this overlapping here real quick drag that out a bit other than that everything seems fine so I'm going to go into local View uh then I'm going to go into solid mode then with vertex color Master this is an add-on I will it should be free on GitHub so I'm going to remove uh I'm going to remove the existing color attribute add a new one called color one uh just leave it blank for now like black then go to vertex mode or vertex paint mode and in the vertex color Master tab I'm going to isolate the uh Alpha Channel and I'm going to isolate then I'm going to paste in this hex it's 4f4 F4F oh you can just copy that actually wait no uh what I'm going to do is go to the value here in HSV the alpha and type in point 14 this is the value I used you don't obviously change this but this value works best for me uh wait wait 14. there we go and once you've got the alpha painted oh wait what what just happened why isn't it okay yeah there and go ahead and apply it once you've done it and go to the red Channel isolate that I'm going to I'm going to use this hex 13 13. like that oh I didn't paint it oh oh paint it and then apply then for a green I'm gonna isolate that and I'm going to use this hex which is 0b 0b 0b then paint apply then for blue I'm just going to be using um is this going to be like the default black which is all zeros so ain't it black and then apply it should end up like this brownish color and it's starting to look a lot better now last thing we need to do is go here I'm going to um hear the parent on the model for the mesh I'm going to re-center the origin and then create the drawable again this is just so it's in the right position and now last all we need to do is go to the y-type and then select this I'm going to embed this texture real quick so go here select your drawable add it and for the archetype Flags add the I think it's this one yeah eight one nine two and go to your mlo add it as an entity and then for the flags we're going to be using is this enable unknown 2 unknown 20 and 21 disable Shadow for entity and object will not cost cast Shadows let me see you add it to your room hopefully if you've done everything correctly it should um show up in game and work as intended
Info
Channel: ook_3D
Views: 2,825
Rating: undefined out of 5
Keywords:
Id: j9tCYnWJsZo
Channel Id: undefined
Length: 12min 29sec (749 seconds)
Published: Thu Sep 07 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.