Real-time lighting and shadows are expensive in terms of processing power and speed.  In addition  it never looks as good as a pre-rendered image, which is the primary reason I have been  exploring baking lighting detail, from a pre-rendered image, onto a 3D model which can be used in a real-time engine.

The image on the left is a test scene rendered in 3dsMax with Vray whilst the image on the right is a baked version of the scene in the Unity3D engine.  I was exploring this as part of a solution for an interactive object viewer which I am in the process of developing, but more on that in a later post. This test is using the Unity3d lightmap shader with VrayDiffuseMap in the diffuse slot andVrayRawTotalLightingMap in the lightmap slot.

I have found it difficult to achieve an accurate result due to the awkward work flow

  • Unwrapping and Multiple UV setup
  • Determining best bake map
  • Making sure toning and gamma was translated across
  • Testing out different shaders in Unity

Baked city model in Unity3D with lightmap only

I am getting closer to an accurate result but I think there is still some tweaking and fiddling to be done.