GitD3 Mesh Compatibility

1 post / 0 new
Melchior Dahrk's picture
Melchior Dahrk
Asset ReviewerExterior Developer
Joined:
2016-02-28 18:29
Last seen:
1 year 6 months ago

Glow in the Dahrk 3.0.0 (GitD3) and later versions leverage more NIF features to simulate dynamic interior lighting. Although GitD3 has legacy support to ensure that GitD2 meshes will still function, they will be lacking certain visual features that GitD3 meshes can control. This thread will break down each feature and how to control it. There are also some general format issues which need to be addressed to ensure that meshes function properly in GitD3.

GitD3 NIF format is documented below. The node names will be referenced later.

    NiSwitchNode        ...    NightDaySwitch

        Node 0        ...    OFF (exterior, no glow, daytime)
        Node 1        ...    ON (exterior, glow, nighttime, can be omitted for interior-exclusive windows)
        Node 2        ...    INT-DAY (interior, glow, daytime)

            NiCollisionSwitch    ...    rays (all sunrays must be under a single node to be toggled properly)
            NiNode    ...    DayWindow (this node encompasses the window parts which are not the sunrays)

    NiNode            ...    AttachLight (tells the code where to place the light source, if option is enabled)

        NiPointLight    ...    LightSource (settings can be changed here to affect the light's properties in game)

            Diffuse    ...    Multiplies with sky color to modify the light through the window
            Scale    ...    Sets light radius

 

Part 1 - Interior Day/Night Fading

For interiors, GitD3 fades between OFF (night) and DayWindow (day) nodes. This fading is accomplished by directly controlling the material property of DayWindow. But it will actually switch to the OFF version when night begins. Therefore the OFF and DayWindow shapes need to match in some repsects:

DayWindow                                            OFF
Mat'l Emissivity (1,1,1)                          Mat'l Emissivity (0,0,0) *                       
Mat'l Ambient/Diffuse (1,1,1)                 Mat'l Ambient/Diffuse (0.3,0.3,0.3) **
Texture (Base, Glow, Dark, etc)   =         Texture (Base, Glow, Dark, etc) ***
Vertex Coloring (off)                     =         Vertex Coloring (off) ****

 

* GitD3 does not need emissivity to be set on DayWindow as it is controlled by MWSE. But this is recommended for OpenMW compatibility.

** This material setting defines the nighttime darkness of windows. If this is set to 1,1,1, then it will have the vanilla appearance. By default, GitD3 meshes have this set to 0.3,0.3,0.3 to create a darker appearance at night. This setting may need to be tweaked depending on the window texture to not appear too dark (or bright) at night.

*** Texture properties should be identical between DayWindow and OFF shapes. This means that no glow map should be used for DayWindow. Otherwise the transition will "snap" between DayWindow to OFF switch nodes.

**** The window shapes cannot use vertex coloring (vcol) so that MWSE can actually control the material properties.

 

rays has the following requirements:

  1. Must be the first child of INT-DAY
  2. All rays must be under one node if not a single shape
  3. No vertex coloring (so material properties can be controlled)
  4. No glow texture (emissivity is controlled by MWSE)\

 

Part 2 - Interior Light Sources

AttachLight

Just like with other light sources, the AttachLight node is used to tell MWSE where the light source should be attached to the mesh. If no AttachLight node is defined, the default is the mesh origin.

LightSource

Most settings for the NiPointLight are ignored. With two important exceptions: Diffuse and Scale. If no NiPointLight is added to a mesh, then MWSE defaults to a Diffuse of 1,1,1 (so light color will be equivalent to exterior weather colors - this is used for Imperial Common windows) and a Scale of 200.

Diffuse is used to modify the light source based on window color and/or thickness. MWSE takes this value and multiplies it against the exterior weather color to achieve the interior lighting. A green window texture may filter light to be green colored. A particularly dense material or dirty window texture might not let in as much light. So this diffuse can be darkened to make the light source less bright.

Scale is directly related to the light radius setting in the CS.

 

Troubleshooting

Users getting inconsistent results

GitD3 uses the Morrowind.ini weather settings (or any modifications made by MWSE Weather Adjuster) to set the interior lighting and window color. Therefore not all users will experience the same colors or intensity of light.

Also note that shaders play a large part in the intensity of the interior lighting. HDR shaders in particular can have a big influence on visuals with this mod. HDR shaders may not always immediately react to changes in lighting which can occasionally result in light "jumping" to catch up with the current settings.

Lighting is too dim

Remember that GitD3 dims lights depending on the weather outside. The "dimmer" is a value between 0 and 1 for how bright it is outside. Determined by time of day and a predetermined brightness for the weather type. For example, clear weather has a multiplier value of 1.0, foggy weather a value of 0.5, and overcast weather a value of 0.6, so a foggy day can only get a dimmer as high as 0.5. This dimming also controls the alpha setting of the sunrays, so you may find they are harder to see in certain weather types.

So if the light seems too dark, remember to test on a clear day for maximum brightness (also good to test on a clear day to ensure the settings you chose are not too bright).

Light is bleeding into other rooms/floors of the interior

Unfortunately, TES3 lighting doesn't use raycasting, so light will "go through walls". The best way to control this is to find the right balance for the LightSource scale which brightens the immediate area but has minimum bleed into nearby rooms.

Interior light settings are not working in OpenMW

As of now, OpenMW does not support the new interior light features of the GitD3 format. However, GitD3 meshes still maintain GitD2 functionality of switching off/on in OpenMW. We hope that OpenMW will add support for interior light sources in the future.

Can't open GitD2 or GitD3 meshes "NiCollisionSwitch" error

GitD meshes use the NiCollisionSwitch node to make it so players can select objects sitting on window sills without the sunrays blocking their selection. With some versions of NifSkope, this node is not recognized by default. If you get an error when trying to open GitD meshes, you will need to modify your nif.xml file to include a definition for NiCollisionSwitch. Custom nif.xml files may be available at the Morrowind Modding Community Discord.

AttachmentSizeDate
File GITD_Example of mesh used in exterior and interior4.76 KB2021-12-13 22:30
File GITD_Example of mesh used in interior exclusively14.15 KB2021-12-13 22:30