Global Illumination and the GIProbe in Godot (tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we are going to look at the GI probe and global illumination in Godot we're going to use our maze project to do so so this is in their continuance II that project and we're going to focus on the visuals now from the project open the level one scene and you can get started with the final result from the project on Kickstarter I'm going to delete the directional light and start over from here so I can explain a few things along the way the lighting that you have at the moment in the scene is only direct so you put a light somewhere and you have some basic lighting that takes place and there however in reality light bounces around so faces and get absorbed by different materials and we want to simulate that in our game to get some more appealing visuals we're going to add a GI probe in Godot a node that allows you to make some calculations to get that simulated indirect lighting select the level 1 node press ctrl-a and search for GI probe now add it to the scene in my scene it's not visible because I have to set it visible so fall that at the top of the viewport go to the View menu gizmos and you want to make sure that the I in front of GI probe is visible same thing for the lights that I had hidden by default you have some box in which the light will be calculated the indirect light will be baked because this is going to pre calculate some of the bouncing data based on the static geometry that you have in your level so note that this does not work exactly this is not going to simulate lights in real time it's going to bake some data so that the calculations are not too expensive and we can get some fake indirect lighting now you see the three dots on the GI probe you can click and drag on these to extend the shapes bounce and we want to have the entire level inside the shape because this is the entire area that will be baked in our scene and you can press for example control to control 3 to split your viewport and then display the game from the side view for example to make it a bit easier to see how big your elements is so I'm going to make it a little thinner and move it along the y-axis now I have my bounding box sets I'm gonna go to the View menu again gizmos and hide the GI probes can also press control 1 to go back to a single perspective view okay so once we have the GI probe nothing happens at this point we have to bake the information from our scene in order to get our indirect lighting but if we click that at this point nothing interesting will happen because we have to tell go to which meshes it should use for indirect lighting you have to tell it which meshes I'm not going to move in your scene and should contribute to that lighting so first you want to go to the ground and select the mesh instance in the inspector check the use in baked indirect lighting on we want to do the same for the mesh that constitutes our level our maize so for that we have to go not in the grid map but we're going to go into our world folder and we have a mesh Lib scene that we use we are reusing that instance in our grid map so you want to open that scene select the wall mesh instance and do the same use in baked and wrecked lighting so let's save at this point close that scene and now we can select the GI probe again and bake it and the result is going to be a little surprising as you can see so we have some light coming from the sky but it's looking very weird because we don't have a Sun we don't have a direct light to lit our scene so now we want to fix that that's why I had us remove the light it's just so you see that this is a common problem that you might have if you try to write GI global illumination to an empty Sene so let us add a directional light once again this will represent our Sun press enter I'm going to move it up and I want to zoom a little bit on it and rotate it so that we get some natural Sun direction now we will have two rebake our in directional light but let us first go into the lights parameters and you have to make sure that the bike mode is set to indirect so that it will contribute to indirect lighting then we can reactivate the shadows on this node so that we get nice shadows and I was seen select the GI probe again and click bake GI probe once more you will see that the lighting changes a little bit now some parts of our level are fairly dark and this is due to two factors one it's the lack of indirect energy contributed by our directional light so we can go back to the directional light and in the inspector you can increase the indirect energy parameter in order to increase the indirect lighting in your scene and you will see that it tends to lit some surfaces to make them brighter and there were before so you can use that to balance the lighting of your scene then I want to talk about these artifacts here so we are reusing the same mesh and in some areas we get some stitches act between two blocks so you don't want to push the lighting too high the indirect lighting too high on this lamp now indirect lighting baked in this way will work a lot better if you have various meshes interlocking with one another and maybe not as well with this grid map as you can see we are however going to go back to the GI probe and look at the subdivision parameter so you can increase the subdivision parameter to refine the lighting a little bit by default it's set to 128 as you increase it the GI probes data will take more video memory in your game so it's a trade-off it will take longer calculate as well as we can see if I rebate the GI probe takes a little longer to calculate the result but you can see that the seams aren't gone so we effectively increase the quality although we do get a little bit of light bleed on the sharp edges of our mesh and this is inherent to this lighting method and that is why when you create full 3d game you have to use different meshes to hide some parts and make sure that the game looks as good as it can here is a common issue you might have with global elimination if I activate my GI probe I don't have too much trouble right now because I lowered the subdivisions but if I increase them you can see these jagged artifacts on the flag on here and this is due to the size of my GI probes I'm going to lower the subdivisions back you can see that if I bake it again I still have these jagged results now if I increase the size of the box I guess that the light has a bit more space to bounce around and you can get much nicer results once you do that you can see that most the jaggedness has disappeared if I increase the subdivisions again they're going to come back but once again give it some more space bake and you should see a smoother result and you can always lower these subdivisions to get smoother lighting although you will get less details and the reflections on the gun in this case this model is by SOI dev a Russian artist and you can find a link to it in the video description but that's it as far as setting up the GI probe is concerned in the next video we will look at the 3d environments which will allow us to increase the strength of the ambient lighting at the sky and we will then look at the bus processing effects I want to thank you kindly for watching be creative have fun and let's see one another in the next one very soon bye bye
Info
Channel: GDQuest
Views: 12,702
Rating: undefined out of 5
Keywords: godot gi probe, godot global illumination, godot engine global illumination, godot 3d tutorial for beginners, godot lighting, godot lighting 3d, godot lighting tutorial, godot 3 pbr, godot 3d tutorial, giprobe godot, global illumination, open source, game development, game creation tutorial, godot tutorial, godot engine lighting, godot 3 3d tutorial, godot engine tutorial
Id: lPngD4uzWVc
Channel Id: undefined
Length: 8min 49sec (529 seconds)
Published: Tue Jan 29 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.