Search Unity

Summer of Code: Progress on External Lightmapping

August 24, 2009 in Community | 2 min. read
lightmapping-picture
lightmapping-picture
Share

This blog post is written by Michał Mandrysz who is working on support for External Lightmapping in Unity. The project is one of four selected projects that were selected for the Unity Summer of Code.

What's lightmapping?

If you're not familiar with the terms "baking" and "lightmapping" then let me introduce them to you a little. Baking is an operation of prerendering expensive details (in calculational sense) like illuminated lightning, highlights and shadows into a texture so that it doesn't have to be renderered at realtime. It requires some additional effort from the game designers, but it benefits hugely in performance. This solution is pretty old, but according to words of John Carmack it's still up-to-date and will be - even in high end games.

What is the Lightmapping Tool?
It's a tool for lightmapping scenes in external applications (yeah, I know most of you would  wish to see an integrated system, but it's not that easy to write this kind of system; however there are several huge benefits from using an external one, especially as powerful one as VRay).
As you may have heard before, my job is to wire lightmapping process tightly with 3dsmax and VRay. The system automates the process of both external baking, and setting up the lightmaps in Unity.
Lightmapping tool manages up to 99 lightmap atlases (could be even more but the interface would have to be modded for such extreme jobs) which hold object information with resolution proportional to their size on the stage. It can start external applications (currently only 3dsmax), assign appropriate renderer or load a preset max scene which holds information about lightning and so on. I'm planning to make a short screencast video when the work is done, so you can be sure you understand everything clearly ;-)

lightmapping-picture

This picture presents about 1/6 of a whole scene lightmapped with only one 2kx2k lightmap rendered with VRay on medium settings

August 24, 2009 in Community | 2 min. read