From the course: V-Ray Next: Unreal Engine Rendering

Getting ready for light baking

From the course: V-Ray Next: Unreal Engine Rendering

Start my 1-month free trial

Getting ready for light baking

- [Instructor] Having reached the final chapter for our course then, we are ready to take a look now at one of, and perhaps to some, the biggest attraction of using V-Ray in Unreal and that is the ability to mix both offline and realtime renders of a project in order to showoff very different aspects of the piece. Now, although we have already mentioned the basics of light baking earlier in the course, if we're coming to Unreal as perhaps an artist who has already spent time working with render engines like V-Ray, Corona or Maxwell on offline projects, getting our head around the concept of lightmaps and light baking will be a critical piece of the puzzle for us to grasp here. As a brief background history then, most early realtime engines utilized what is now called Forward Rendering, a technique whereby each object in a scene is rendered in a separate pass for each of the lights that are affecting it. Meaning, each object in a scene would typically end up being rendered multiple times depending on the number of lights that are within range of it. A significant disadvantage then to the way in which the forward approach works is the fact that we will have to pay a rendered time cost and naturally the more lights we have affecting each object in the scene, the slower our engine's performance will become. For levels containing lots of lights then, this can very quickly become a big problem. Deferred Rendering, on the other hand, holds off on the shading and blending of lighting information until after the first render pass is complete, during which object positions, normals and materials for each surface in the scene are rendered to a geometry, or G-buffer as a series of screen-space texture maps. These are then composited onto the already baked lighting pass which is of course, created in a separate step, meaning the render cost of lighting now becomes proportional to the number of pixels that our light is affecting rather than the number of lights themselves. This in turn means that we're no longer limited in the number of lights we can have or render onscreen, which again for some levels may be a critical advantage. Light baking or light building then is simply the part of the Deferred rendering process during which a scene's lighting, both direct and indirect, gets calculated and rendered to bit maps or lightmaps. After which, that is as we say then composited with all of the other G-buffer textures in order to produce the final realtime image that we see as we play through a level. Getting ready for a light bake in V-Ray for Unreal is a pretty straightforward process in that we just need to be aware of a few things that need to be settled properly in our scenes. So first of all, we need to recognize that our light bake quality will, to some extent, depend on the lightmap resolutions that we set on each of our meshes. We need to be aware that the quality of lightmap UVs will make a big difference with a better unwrapping job generally translating into a better bake quality and we need to take care when modeling our scenes as overlapping and/or large numbers of polygons in a static mesh can result in either longer than needed bake times or possibly even cause unwanted crashes. If we are using Unreal materials in the scene as opposed to just V-Ray materials, then we will also need to set our Render Device Options to work on the GPU only and finally, but by no means of least importance, we need to make sure that all of the actors and lights in a level have been set to a static mobility setting before going ahead with the bake. All points that we will look to put into action in our next exercise as we go ahead and look to take our very first light bake.

Contents