Skydome - Exit-9B/CustomSkills GitHub Wiki
The skydome is a 3D model that appears in the background of the skills screen. It also controls where skill trees and constellation images are positioned in 3D space. Make sure you have Nifskope so that you can inspect and edit NIF files.
Using any tool that can extract files from BSA archives (such as Bethesda Archive Extractor):
- Open
Skyrim - Meshes0.bsa
and extractMeshes/DLC01/Interface/INTVampirePerkSkydome.nif
. - Open
Skyrim - Meshes1.bsa
and extractMeshes/Interface/INTPerkSkydome.nif
.
Tree Positioning
Inspect each of the vanilla skydomes in Nifskope. If you browse the node hierarchy, you should be able to find some NiNodes with names like Point00
and Point01
, as well as corresponding BSTriShapes with names like cImage00
and cImage01
. The standard skill skydome has 18 of each of these, corresponding to the 18 skills, while the beast skill skydome has 2 corresponding to the 2 beast forms. The beast skydome actually has an extra Point02
, but ignore this for now.
Skills defined in a custom skills config have their skill trees attached to the PointXX
nodes in order, starting with Point00
. You can modify the scale or distance of these nodes, but they must be arranged in a circle, equally spaced. So if there are 18 skills, there must be a 20-degree angle between Point00
and Point01
, and so on.
You can use a NIF plugin for a 3D modeling program, such as PyNifly for Blender, in order to create and position new nodes and meshes for your skydome. When you export these meshes, open them in Nifskope and ensure that the PointXX
and cImageXX
blocks have the correct block types and names. In addition, ensure that each of the cImageXX
meshes has a BSEffectShaderProperty as its shader property.
Camera Orientation
When the skills screen is displayed, the game needs to determine the orientation of the camera in relation to the skydome. The camera up vector is computed from the cross product of two node positions. More specifically, on the standard skills menu, it is the cross product of the Point01
and Point00
position vectors. On the beast skill menu, Point01
sits across from Point00
, so Point02
is used instead (the "extra" node that didn't correspond to a skill). Custom skill configurations can specify which point to use as the camera right point, the node that sits to the right of Point00
and whose cross product with the Point00
position determines the camera up vector.
Configuration
When you have your skydome set up, configure it in the JSON.
{
"skydome": {
"model": "MyMod/Interface/INTMySkillsPerkSkydome.nif",
"cameraRightPoint": 2
}
}
This should be self-explanatory now. model
points to the path of your custom skydome (under Data/Meshes
), and cameraRightPoint
specifies which PointXX
node sits to the right of Point00
for computing the camera orientation.