Lightmapping Done In 9 Minutes + Switching On and Off In Realtime

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video I will be going over how I set up bite maps in my game vampire heist and how you can set things up to quickly get into using baek's fighting in addition I will also show three methods you can use to emulate turning lights on and off in areas using bait lighting which is one of the only major difficulties I found when going from real time to bait life style yet to see being covered elsewhere to show off the pros of lightmaps here's a single room I've set up in three different ways using bates lighting alongside an example using only real time lights to show the contrast the old-time lights are great for their dynamic users and shadows however they can't really be used for fine details since too many will begin to heat up processing power and that meshes can only burn so many real-time lights before the light rendering begins to break down and lose detail baked lights have a are perfect for all scenes you can add as many as you'd like giving you precise control over their effects lets you add fine details to your scene and since it's all pre-rendered it won't hit your games performance here the settings are used for my bite maps I turn the environmental lighting to color from Sky box and set the color to a near-complete black this lets me have the option for high contrast to my scene in the light mapping settings I change progressive to enlightened and after this I'll turn the ambient occlusion on to speed up editing I will turn off or to generate lighting and also lower the right map resolution to five or even two which are then later turn back up again once I'm done editing the biting in the scene using these settings I can quickly edit the bait whites manually generates the lighting check the overall intensities colors and positions are fine and then up the resolution to generate the final baked when using light Maps don't forget to set the objects to be affected to static and on their model import settings check yes to generate swipe map movies to check for the light map textures themselves book like go to the few port options and go from shaded to beit's light maps this will let you see the resolution of light map details on objects and the wall lighting if you find an object resolution is off you can change its density by going to the objects mesh renderer component expanding light mapping and changing the scale in light map value finally don't forget to add light probes about your scene these will converge the beta lighting information just something that can affect real-time non-static objects in your scene my maps are static for most games this is fine but sometimes you want to be had to do things like making an area go dark something simple to do a real-time light but impossible for bates lights luckily there are workarounds I'll be covering three methods I know of to get around this projectors mixed lighting and swapping light maps projectors can be found on the asset store as part of the unity technologies standard assets package the projectors folder can be found in the standard assets folder under effects projectors are made to project an image on top of any mesh in its area for our purposes and Mike Maps we are going to use them to project dark areas across multiple separate rooms giving the effect of these well lit rooms having their lights being turned off and on to achieve this you simply need to set the projector to be orthographic scale it to the room in question and assign a material using the multiply shader under projector for the material use the default full of texture use in the projector examples and for the texture make a dark square as shown in the video I recommend making the square a dark blue instead of pure black when you do this you must set the warp mode in the image settings of the texture to be clamped or else the projector will loop the texture across the whole scene ejectives work great for light areas you just want to darken this method is quick to use and can be edited freely in one time a thing to keep in mind however is projectors will also overpower any real-time lights you have in their area so real-time lights intensities and colors will also be dampened by projectors sometimes you want the light to be the focus of an area to have moving shadows or have the dark areas be more detailed in these instances a mixture of real-time and based lighting will do the trick in my example seen from vampire heist I used a single strong real-time light to add contrast and bright in a dark moon the final method is to swap the right maps of an object in real time by making an alternative dark version of your level as a new scene you can bake in a turn to dark version of the light maps and light probes once these have been generated you can use both light and dark versions in your main scene and toggle between them this method requires the most prep work and technical know-how but on the plus side it also gives you the most control over how the dark and white versions of your scene will look like while I am only bringing up the concept of this method here I will be releasing a video soon that will go over how I made it so I could swap the light maps and probes in my scene in detail to see it when it's out you can follow the channel or check the description below but there will be a link to the video when it's available but that I become the essential fusion need to get ready to use light Maps so one last topic before ending the video is post-processing effects are not technically lighting post-processing is a quick way to add extra depth to your games colors and visuals as Werth quickly introducing you to to get camera effects open the package manager window and make sure to be viewing all packages once all the packages have loaded scroll down to post processing and install to set up post-processing your scene go to the main camera set its layer to post processing and add the two components post-processing layer and post-processing volume in post-processing layer set the trigger to the main camera or press the this button and set layer to post-processing in post-processing volume take is global and make a new profile making a new profile will generate a file that saves the settings for the effects you will add to the camera and could be used in other scenes most effects will tell you they can't work when color space is set to gamma this setting can be found in the project window go to player and scroll down to other settings color space is the first option simply set it to linear and wait for unity to finish processing to be ready to use these effects to add an effect just press add effect and pick or takes your fancy just remember to enable the properties of the effect after you added here the settings for the profile I used for vampire heist I found ambient occlusion and color grading did a lot to quickly up the visual quality of my game any of these are worth taking the time just to play around with and see if they can't make your game look better if you want to see what the effects look like while editing press the button shown in the video and make sure it is active and post-processing is enabled this lets you view additional visual effects in the scene view and that's all for now while this isn't an expert course on lightmaps hopefully they should let you know what to do so you can just jump into using them without having to worry about the small stuff and settings if you liked this video why not help me out by following the link in the description and getting my most recent game release vampire heist a try liking commenting on this video and subscribing to the channel or so be appreciated but I don't do too many videos if there's anything you've seen me doing that you'd like me to cover let me know in the comments so I know what kind of things people's like need to do in the future anyway I hope this video was helpful and my voice was not too fast this time see you later and good luck development
Info
Channel: Birdmask Studio
Views: 63,193
Rating: undefined out of 5
Keywords: video game development, unity tutorial, GameDev, IndieDev, unity, tutorial, how do i use lightmapping, lightmapping, baked light, lightmaps, switching lightmaps, swapping lightmaps, lightmaps realtime, should i use lightmaps, what are lightmaps
Id: NkAJNeHqmc4
Channel Id: undefined
Length: 8min 27sec (507 seconds)
Published: Tue Nov 19 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.