Editing Pikmin 2 map lighting files

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{DISPLAYTITLE:''Pikmin 2'' map lighting files}}
+
{{todo| Research map lighting.ini under Abe. Finish writing observations below.}}
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.
+
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 <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.
 
  
 +
=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.
 +
{{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).}}
 
<source lang="powershell">
 
<source lang="powershell">
 
###############################################  
 
###############################################  
Line 17: Line 17:
 
0 # <Type>  
 
0 # <Type>  
 
</source>
 
</source>
 
+
First line represents what version the lighting file is. Differently from cave lighting files, the type is set to 0.
<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">
 
<source lang="powershell">
Line 35: Line 32:
 
}
 
}
 
</source>
 
</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 far away the light source is from it's angle's vertex. <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 on the <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.
  
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.
 
  
 +
{{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.}}
 
<source lang="powershell">
 
<source lang="powershell">
 
#===============================================  
 
#===============================================  
Line 108: Line 104:
 
}
 
}
 
</source>
 
</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 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.
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]]
 

Please note that all contributions to Pikmin Technical Knowledge Base are considered to be released under the Creative Commons Attribution-ShareAlike (see Pikmin Technical Knowledge Base:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)