Hello World
Create a new Scene
- Create a new Scene and save it.
- Destroy the Directional Light object generated automatically.
- Create a Plane by
Create > 3D Object > Plane
and make it Static.
Setup BakeTargets
- Create a Point Light by
Light > Point Light
and change it to Baked mode. - Add KanikamaBakeTargetLight component to the Light object.
- Repeat the above to create another Light (the position should be different from the first one).
KanikamaBakeTargetDescriptor
- Drag the prefab in the following path to your Scene and unpack it completely.
- C#:
Packages/Kanikama/Runtime/Application/Prefabs/KanikamaRuntimeGIUpdater.prefab
- U#:
Packages/Kanikama Udon/Runtime/Prefabs/KanikamaUdonGIUpdater.prefab
- C#:
- Add two KanikamaBakeTargetLights created above to the Bake Targets field in the Inspector window.
Kanikama Window
- Open Kanikama Window from
Window > Kanikama
. - Click the Create Settings Asset button in the Unity category. A UnityBakingSetting.asset will be created.
Bake static
- Click Bake static button in the Kanikama window.
- Kanikama will bake lightmaps after turning off BakeTargets.
- The baked lightmaps and LightingDataAsset are stored in
[YourSceneName]_kanikama_unity_static/
directory.
Bake Kanikama
- Click Bake Kanikama button in the Kanikama window.
- Kanikama bakes lightmaps two times.
- The baked lightmaps are stored in
[YourSceneName]_kanikama_unity/
directory.
Create Assets
- Click Create Assets button in the Kanikama window.
- Kanikama creates Texture2DArray assets with slice count 2.
Setup Runtime components
- Add the KanikamaRuntimeLight (KanikamaUdonLight for U#) components to Point Lights and add them to the LightSource field of the GI Updater in the Inspector window.
- Open the Runtime tab in the Kanikama window and click the Load Active Scene button.
- Click the Setup by UnityBakingSettingAsset button.
- Kanikama sets the Texture2DArrays to the LightmapArrays field of the GI updater.
Setup Receivers
- Create a new Material and change its shader to Kanikama/KanikamaStandardSurface.
- Change its Kanikama Mode to Array.
- Set this Material to the Renderer of the Plane.
- Open the Runtime tab in the Kanikama window and click the Load Active Scene button.
- Click the Set KanikamaGI Receivers button.
- Kanikama sets the Plane to the Receivers field of the GI updater.
Hello World
- Play Unity Editor.
- Change the colors of two Lights from the Inspector window.
- Note the GI updater works only when the Game window is active.