EvilEngine/LKIT: Difference between revisions

m
Seil moved page LKIT to EvilEngine/LKIT
Battlepedia>DirtyDan
(→‎Format: Added a bit more information about LKIT lighting)
m (Seil moved page LKIT to EvilEngine/LKIT)
 
(7 intermediate revisions by 2 users not shown)
Line 1:
<onlyinclude>
{{AssetInfobox
{{#vardefine:typeid|LKIT}}<nowiki/>
|subtitle=LightKit
{{#vardefine:name|LightKit}}<nowiki/>
|type=[[Binary]]
{{#vardefine:type|[[Binary]]}}<nowiki/>
|games=Battle for Bikini Bottom<br>The SpongeBob SquarePants Movie<br>The Incredibles<br>Rise of the Underminer}}
{{#vardefine:basetype|}}<nowiki/>
{{#vardefine:games|BFBB TSSM Incredibles ROTU RatProto}}<nowiki/>
{{#vardefine:sourcecode|[https://github.com/bfbbdecomp/bfbb/blob/master/src/Core/x/xLightKit.h xLightKit.h]}}<nowiki/>
{{#vardefine:image|}}<nowiki/>
</onlyinclude>
{{AutoAssetInfobox}}
 
==Format==
===xLightKit:===
Header:
 
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x00 || char[4]uint || '''tagID''' || '''"TIKL"'''
|-
| 0x04 || intuint || '''groupID''' || null
|-
| 0x08 || intuint || '''lightCount''' || Number of Lights'''
|-
| 0x0C || intuint || null'''lightList''' ||
|-
| 0x10 || AssetID? || '''blended''' || '''Only Present in ROTU'''
|}
 
===xLightKitLight:===
Light:
 
{| class="wikitable"
! Offset !! Type !! Variable !! Description
|-
| 0x00 || intuint || '''Typetype''' ||
* 1 - Ambient light
* 2 - Directional light
|-
| 0x04 || Vector3[[Vector4]] || '''Color (BGR)color''' || RGBA
|-
| 0x100x14 || float[[Vector3]] || unknownnull (always 1)||
|-
| 0x140x20 || Vector3float || unknownnull ||
|-
| 0x200x24 || float[[Vector3]] || unknownnull (always 0)||
|-
| 0x240x30 || Vector3float || unknownnull||
|-
| 0x300x34 || float[[Vector3]] || unknownnull (always 0)||
|-
| 0x340x40 || Vector3float || '''Direction'''null ||
|-
| 0x400x44 || float[[Vector3]] || unknownnull (always 0)||
|-
| 0x440x50 || Vector3float || unknownnull ||
|-
| 0x54 || float || '''radius''' ||
| 0x50 || float || unknown (always 0 for ambient lights, 1 for directional lights)
|-
| 0x540x58 || Vector3float || unknown'''angle''' ||
|-
| 0x5C || ?? || '''platLight''' ||
|}
 
Color values are in BGR order (Blue, Green, Red). In BFBB, these get automatically normalized to values between 0 and 1.
 
The direction vector determines what direction a directional light will point to. This does not point to a particular spot, but rather at an angle all throughout the map. These values can be positive or negative.
 
The other vectors serve no apparent purpose.
 
{{Assets}}
{{AutoGameNavs}}
 
[[Category:Asset]]