Difference between revisions of "Pikmin 2 map lighting files"
EpochFlame (talk | contribs) m (formatting) |
|||
(9 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{DISPLAYTITLE:''Pikmin 2'' map lighting files}} |
− | + | The lighting configuration files for overworld areas in ''Pikmin 2'' are found under <code>/user/Abe/map/<map name></code> as <code>.ini</code> files. Each overworld has one, as well as all Piklopedia maps and the test map. They control the lighting of maps and how they change throughout the day. | |
− | =Configuration | + | ==Configuration format== |
− | The example below represents settings for Valley of Repose's <code>light.ini</code> taken directly from the file and broken up into segments. | + | The example below represents settings for Valley of Repose's <code>light.ini</code> taken directly from the file and broken up into segments. Note that parameter IDs that start with <code>u</code> are unsigned 8-bit integers that go from 0-255. IDs that start with <code>f</code> are floating point values. |
<source lang="powershell"> | <source lang="powershell"> | ||
Line 17: | Line 17: | ||
0 # <Type> | 0 # <Type> | ||
</source> | </source> | ||
− | + | ||
+ | <code>Version</code> appears to always be <code>0000</code> for both caves and overworlds, but <code>Type</code> is different. For overworlds it is <code>0</code>, but in caves it is <code>1</code>. | ||
+ | |||
+ | Setting <code>Type</code> to <code>3</code> will have the game use Night, Evening, and Morning values, in that order. | ||
+ | |||
+ | <source lang="powershell"> | ||
+ | #=============================================== | ||
+ | # 太陽タイプ設定 <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} | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | These are the basic settings that control the sun spotlight's height and rotation values that affects the vertex lighting of the model. <code>{f000}</code> changes how high up the light source is, and thus the size of the spotlight. Higher values make brighter maps.<code>{f001}</code> represents the starting angle of the spotlight while <code>{f002}</code> would be the end angle based off the start and end of day in <code>time.ini</code>. 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. | ||
+ | |||
+ | After the main parameters are five different versions of lighting settings, for different times of the day. The first is always night, or the color you see at the very end of the day during takeoff. Next is morning light, or the light you see at the start of a day. After that is noon light, and then evening light. At the end is "for demo" light. It seems like this should be the light used during day 1, but this is not the case. The game actually uses the morning light values during day 1. | ||
+ | |||
+ | <source lang="powershell"> | ||
+ | #=============================================== | ||
+ | # ライトカラー設定 <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} | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | 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 light sources. In ''Pikmin 2'', the game uses linear interpolation for its fog where alpha intensity goes from 0 to 1 starting from the value of <code>Start Z</code> and ending up at <code>End Z</code>. Shadows refer to the color of circular shadows underneath all objects. | ||
+ | |||
+ | [[Category:Pikmin 2]] | ||
+ | [[Category:File formats]] |
Latest revision as of 00:41, 14 June 2021
The lighting configuration files for overworld areas in Pikmin 2 are found under /user/Abe/map/<map name>
as .ini
files. Each overworld has one, as well as all Piklopedia maps and the test map. They control the lighting of maps and how they change throughout the day.
Configuration format[edit]
The example below represents settings for Valley of Repose's light.ini
taken directly from the file and broken up into segments. Note that parameter IDs that start with u
are unsigned 8-bit integers that go from 0-255. IDs that start with f
are floating point values.
###############################################
#
# Game Light Mgr Setting
#
###############################################
#===============================================
# 共通設定 <Common Settings>
#===============================================
{0001} # バージョン <Version>
0 # <Type>
Version
appears to always be 0000
for both caves and overworlds, but Type
is different. For overworlds it is 0
, but in caves it is 1
.
Setting Type
to 3
will have the game use Night, Evening, and Morning values, in that order.
#===============================================
# 太陽タイプ設定 <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 high up the light source is, and thus the size of the spotlight. Higher values make brighter maps.{f001}
represents the starting angle of the spotlight while {f002}
would be the end angle based off the start and end of day in 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.
After the main parameters are five different versions of lighting settings, for different times of the day. The first is always night, or the color you see at the very end of the day during takeoff. Next is morning light, or the light you see at the start of a day. After that is noon light, and then evening light. At the end is "for demo" light. It seems like this should be the light used during day 1, but this is not the case. The game actually uses the morning light values during day 1.
#===============================================
# ライトカラー設定 <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 light sources. In Pikmin 2, the game uses linear interpolation for its fog where alpha intensity goes from 0 to 1 starting from the value of Start Z
and ending up at End Z
. Shadows refer to the color of circular shadows underneath all objects.