Unity Products:Amplify Impostors/Lightmap Baking

From Amplify Creations Wiki
Jump to: navigation, search

Product Page - Manual - Custom Baking - Lightmap Baking - Roadmap


Due to high demand, as of version 0.9.5, you can now bake and render impostors with static Lightmap information. Be advise that, due to the static nature of lightmaps, doing this means all impostors sharing the same texture will also share the same light information. Making that light information different between similar impostor means baking different lightmaps to different objects which in turn increase the texture footprint of your application. If you use this feature it means you accept that trade-off when using multiple lightmapped impostors. This feature has some special uses cases, for instance, you might only want a impostor of a single static object that has baked lighting, or your multiple baked impostors might be sharing very similar lighting conditions in which case the different of objects would be neglectable.

This is also a somewhat advance feature that uses custom baking to bake and render the lightmap information so we highly recommend you to first read the custom baking tutorial here to understand the underlying concept.


You'll be creating a bake shader that outputs the lightmap in to a single RGBA texture and another that reads it. Because the light information can use higher values that single colors allow, unity packs the lightmap color RGB into a RGBM format where the M is a multiplier of RGB, this only means you'll need all four channels of a single texture and not just 3. You'll then need to create the runtime shader that reads that RGBA texture file and unpacks it into the original RGB information. While this might sound confusing at first its actually a matter of just adding an extra texture output and use it. We provide a shader function that automatically does the packing and the shader already unpacks the result without extra work.