Unity Products:Amplify Color/Masking and Unity Products:Amplify Impostors/Lightmap Baking: Difference between pages

From Amplify Creations Wiki
(Difference between pages)
Jump to navigation Jump to search
ampwiki>AmplifyWiki
No edit summary
 
ampwiki>Kebrus
 
Line 1: Line 1:
{| style="width: 920px; horizontal-align: left;"
<span style="font-size: 120%;">[http://amplify.pt/unity/amplify-impostors Product Page] - [[Unity_Products:Amplify_Impostors/Manual| Manual]] - [[Unity_Products:Amplify_Impostors/Custom_Baking| Custom Baking]] - [[Unity_Products:Amplify_Impostors/Lightmap_Baking| Lightmap Baking]] - [[Unity_Products:Amplify_Impostors/Roadmap| Roadmap]]</span>
|


This sample demonstrates how to generate dynamic masks when using Amplify Color. Unfortunately, although Amplify Color is fully compatible with VR, the current sample is not.
== Introduction ==


[http://wiki.amplify.pt/images/wp-content/download/AmplifyColorMaskSample.zip Dynamic Mask]
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.


Once you open the project, you’ll note that it works by using a second camera to render objects on a “Color Mask” layer using a very simple unlit color shader, e.g. white on black background (or vice versa), into a “Color Mask” Render Texture. This texture is assigned to the Mask property of Amplify Color, in order for the effect to work.
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 [[Unity_Products:Amplify_Impostors/Custom_Baking| custom baking tutorial here]] to understand the underlying concept.


http://wiki.amplify.pt/images/wp-content/uploads/2014/02/ColorMask.jpg
== Description ==
<br>


Depth masking can be enabled directly in the Amplify Color camera component, there is no need to use additional packages. Simply adjust the curve as you would with any other tweakable effect to achieve depth based color grade masking.
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.
 
http://wiki.amplify.pt/images/wp-content/uploads/2015/09/DepthMask.jpg
<br>
 
|}
[[Category:Project Samples]]

Revision as of 15:58, 26 March 2019

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

Introduction

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.

Description

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.