====== Map Lighting Tutorial (DS3) ====== Authors: Abyss1ne The Dark Souls 3 lighting system is really unique and complicated to mess with, so here it is a tutorial teaching you the basics on how to modify it. First of all, we need to understand the file type used for lighting and where it can be found. The file type that Fromsoftware uses for lighting is the .gparam files and they can be found inside the following folder path: \PARAM\DRAWPARAM\. Also, gparam files can be unpacked with Yabber, giving you a text xml file where you will be able to do your modifications. When you first look at this file, it can be really scary, but trust me, its more simple than you think. Try thinking of it as a bunch of sections with values inside of them. Let's divide it in 3 main categories: **LIGHT <------------** **FOG** **Pos Effects** Let’s start talking about the LIGHT section, what exactly it does? Well, this category will deal with the position of the light’s direction, the color it will use, the strength of that color, the strength of the light’s reflection and the SSAO of it. [LIGHT ANGLE] **-1,559945 -0,0713** The bold numbers above are, in order, the Y Axis and the X Axis of the light’s angle. [LIGHT COLOR] **0,919829 0,757829 0,698302 22** The bold numbers above are, in order, the following: **RED/GREEN/BLUE and ALPHA** (The alpha number controls how strong will be the light) [LIGHT REFLECTION COLOR] **0,770774 0,895567 1 16** The bold numbers above are, in order, the following: **RED/BLUE/GREEN and ALPHA** (The alpha number controls how strong will be the light) [LIGHT REFLECTION STRENGTH] **1,6** [SSAO STRENGTH] **1** (Just one more observation, avoid changing the light angle, Fromsoftware usually uses mixed lighting where they have both light that is directed to a location as shadow and light that are already pre rendered on the assets, imagine something like they paint over an asset a shadow or a light, if you rotate the light angle 0, shadows and light won't be in the same direction of the ones that were painted over the assets.) Now that I have presented the 5 main observations of what controls some characteristics of the LIGHT, I will need you to make a mental effort to understand one point, let's imagine the following: 0,919829 0,757829 0,698302 22 0,141176 0,141176 0,14902 4,001954 1 1 1 1 1 1 1 1 1 1 1 1 1,045 0,86 0,81 2,75 In this part of gparam, we have the colour of some ID lighting: Value id="0" / Value id="1" / Value id="2" / Value id="3" / Value id="4" / Value id="10" Sounds confusing but imagine you are editing a piece of mapstudio map, there are two sections of information where you can set these ids LightSetID [ ] FogParamID [ ] When you set a LightSetID for that mappiece using mapstudio, it will use the info stored on that id to light that mappiece. Some maps have dozens of ids, and those ids were hand produced by a Fromsoftware lighting desinger. Usually the light 0 is the general light that the map has, and the other ids are for other peculiarities of the map like grass, very distant objects, among other things. Now let's imagine the following, each Value ID has 4 lights that can be directed and configured. They seems to be pretty much the same thing, but they arent. Take a look at this: >|Light|<< Diff >>|Color1|<< >|LocalLight|<< Diff >>|Color2|<< Each id has these 4 lights - |Light| |Color0| - |Light| |Color1| - |LocalLight| |Color1| - |LocalLight| |Color2| Every light will always have Light color 0 and Light color 1 active and visible, but near the end of this portion of the XML that takes care of the light part you will find **False** **False** This part is the section that tells you whether a light has the local light ON or OFF (TRUE and FALSE). Local Light 1 and Local Light 2 generally illuminate the entire asset, be it chr, obj or mappiece. Now that we have looked at what controls light, let's take a step back and look at something mentioned earlier how the gparam structure is divided: **LIGHT** **FOG <------------** **Pos Effects** We already went through a superficial explanation of the **LIGHT**, now the **FOG** is what will manage a part of the gparam that would be something like a fog that blocks the view and, depending on the settings, it will generate this fog on the map either horizontally or vertically, not to be confused with a ffx (visual effects) like a smoke cloud, or visual effects, this fog is part of the lighting, and not only in a certain place. It will follow a similar structure to the light part, much of this you will have to test and experience personally. **0,802986 0,718366 0,67493 0,683** RED GREEN BLUE Alpha The bold numbers above are, in order, the following: **RED/GREEN/BLUE and ALPHA** (The alpha number controls how strong will be the fog) **0,802986 0,718366 0,72493 0,423** The bold numbers above are, in order, the following: **RED/GREEN/BLUE and ALPHA** (The alpha number controls how strong will be the fog) You can literally split the map in a half, depending on the way you use the colours and intensity of FOG, you will see that a huge fog with two colours divided as if water and oil were divided into two layers, that's why you have the Fog Color and Height Color, but you can adjust it so that this division goes up or down making it have a single color tone. Basically changing the Fog-Dist will manage the horizontal distance from the fog to the player. On the other hand, Fog-heightDist will do the same but vertically. **22,8** **13** The last two options, Fog-fogAlpha and Fog-fogContrast, will control how full an environment will become with the fog or how visible fog becomes by changing these two options. **1** **0,54** To end this tutorial, let’s talk a little bit about some PosEffects examples and the last options and sections on the gparam file: **LIGHT** **FOG** **Pos Effects <------------** With them you can edit many post effects, some of them as example are: SSAO Editor – Ambient Occlusion Bloom[Yebis] - Bloom LightShaft[Yebis] - God Rays Dof[Yebis] - Depth of Field Anti-Alias-Editor – Anti Aliasing MotionBlur-Editor - Motion Blur And sadly thats it for this tutorial. I promise I will make another one just for the Post Effects changes so you will be able to understand how they works. Thanks for reading.