Pikmin 2 map lighting files
To do: Research map lighting.ini under Abe. Finish writing observations below.
Lighting configuration files for overworld maps are found under "root/user/Abe/map/<map name>" as .txt files. There are 10 in total that can be found for the main maps, piklopedia maps, and test map.
Configuration Format
The example below represents settings for Valley of Repose's light.ini
taken directly from the file and broken up into segments.
Editor's note: Notice that the first two characters in the braced 4 character parameter ID signify the data type. "fp" means floating point number and "u8" being unsigned 8-bit integer (0-255).
###############################################
#
# Game Light Mgr Setting
#
###############################################
#===============================================
# 共通設定 <Common Settings>
#===============================================
{0001} # バージョン <Version>
0 # <Type>
First line represents what version the lighting file is. Differently from cave lighting files, the type is set to 0.
#===============================================
# 太陽タイプ設定 <Sun Type Settings>
#===============================================
# パラメタ <Parameters>
# MoveParms
{
{f000} 4 25000.000000 # 光源までの距離 <Distance to light source>
{f001} 4 135.000000 # 日の出角度 <Sunrise Angle>
{f002} 4 45.000000 # 日の入角度 <Sunset Angle>
{_eof}
}
These are the basic settings that control the sun spotlight's height and rotation values that affects the vertex lighting of the model. {f000}
changes how far away the light source is from it's angle's vertex. {f001}
represents the starting angle of the spotlight while {f002}
would be the end angle based off the start and end of day on the time.ini
All these values can be set to negative values as well and it's possible to have the spotlight rotate around the model multiple times before the day ends.
Editor's note: The there are a total of 5 groups of light parameters starting from night, morning, noon, evening, and demo. The game's time.ini defaults the game to start by using the morning set of parameters so change those first if you plan on using a unmodified time.ini.
#===============================================
# ライトカラー設定 <Light Color Settings>
#===============================================
#-----------------------------------------------
# 夜 <Night>
#-----------------------------------------------
# メインライト <Main Light>
# ColorParms
{
{u800} 4 67 # 赤 <Red>
{u801} 4 47 # 緑 <Green>
{u802} 4 51 # 青 <Blue>
{u803} 4 255 # アルファ <Alpha>
{_eof}
}
# サブライト <Sublight>
# ColorParms
{
{u800} 4 10 # 赤 <Red>
{u801} 4 10 # 緑 <Green>
{u802} 4 15 # 青 <Blue>
{u803} 4 255 # アルファ <Alpha>
{_eof}
}
# スペキュラライト <Specular Light>
# ColorParms
{
{u800} 4 128 # 赤 <Red>
{u801} 4 128 # 緑 <Green>
{u802} 4 128 # 青 <Blue>
{u803} 4 0 # アルファ <Alpha>
{_eof}
}
# アンビエントライト <Ambient Light>
# ColorParms
{
{u800} 4 35 # 赤 <Red>
{u801} 4 28 # 緑 <Green>
{u802} 4 35 # 青 <Blue>
{u803} 4 0 # アルファ <Alpha>
{_eof}
}
# フォグ <Fog>
# ColorParms
{
{u800} 4 28 # 赤 <Red>
{u801} 4 18 # 緑 <Green>
{u802} 4 10 # 青 <Blue>
{u803} 4 48 # アルファ <Alpha>
{_eof}
}
# GameFogParms
{
{f000} 4 0.000000 # 開始z値 <Start Z Value>
{f001} 4 4500.000000 # 終了z値 <End Z Value>
{_eof}
}
# 影 <Shadow>
# ColorParms
{
{u800} 4 0 # 赤 <Red>
{u801} 4 0 # 緑 <Green>
{u802} 4 0 # 青 <Blue>
{u803} 4 50 # アルファ <Alpha>
{_eof}
}
The main light has the color of the sun spotlight. Sublight is used on some models to represent reflected highlight. Specular light determines the color of specular reflection. Ambient light refers to the flat lighting of anything not affected by other lightsources. In Pikmin 2, the game uses linear interpolation for its fog from where alpha intensity is 0 to 1 starting from the value of Start Z and End Z. Shadows refer to the color of circlar shadows underneath all objects.