Documentation

FIRST LIGHT TOOLKIT GUIDE

Import, edit, and export 007 First Light game assets — Glacier 2 / KNT Engine · Blender 4.2+

01

Install & First Run

1
Download the .zip

Get glacier2_007_toolkit.zip from the Download page. Don't extract it.

2
Install in Blender

Edit → Preferences → Add-ons → Install from Disk… → select the zip → Install Add-on.

3
Enable

Search "Glacier" in the addon list, tick the checkbox, then Save Preferences.

4
Open the panel

3D Viewport → NGlacier tab.

Requires Blender 4.2+.
02

The Panel

All toolkit operations live in N-panel → Glacier. The panel is context-sensitive — some buttons only appear when a relevant object is selected.

SectionPurpose
ImportLoad .prim and .borg
MaterialsAssign and edit .MATI / .MATB
Texture ToolsDecode / encode .TEXT / .TEXD
Mesh ToolsTransfer weights, snap shape, make exportable
ExportWrite .prim, pack .rpkg
03

Import a .prim

1
Extract game files

Open RPKG-Tool and use the built-in chunk browser (or CLI) to find and extract the .prim and its linked .borg into the same folder.

2
Import

Panel → Import Prim → navigate to the .prim. The .borg loads automatically if it's in the same folder.

3
Check the collection

A collection named after the .prim appears in the outliner — armature, meshes, and cloth cages.

Import Options

OptionDefaultEffect
Import LODsOffAlso imports LOD1–LOD3
Import ClothOnImports cloth cage meshes
Auto Apply MaterialOnLoads and assigns the .MATI on import
Load Render MaterialOffBuilds the Cycles/EEVEE node tree with decoded textures
04

Materials

1
Select the mesh

Click the mesh object in the viewport.

2
Load Material

Panel → Materials → Load .MATI → navigate to the extracted .MATI file.

3
Apply

The material is assigned and texture slots populated from the linked .TEXT/.TEXD files.

Keep all extracted files in the same folder — texture paths are resolved relative to the .MATI.
05

Render Materials

Builds a PBR node tree for Cycles or EEVEE — diffuse, normal, SRM, and emissive decoded from .TEXT/.TEXD.

Select a mesh with a .MATI loaded → Panel → Materials → Build Render Material.

Texture channels

SlotChannelsFormat
DiffuseRGB + AlphaBC1 / BC3
NormalX → R, Y → GBC5
SRMSpec R, Rough G, Metal BBC1 / BC4
EmissiveRGBBC1 / BC3
06

Render Source

Links a .prim to its source RPKG chunk so the exporter generates correct hash filenames. Set this before exporting.

1
Select the root object

Click the armature or root collection object.

2
Set Render Source

Panel → Export → Set Render Source → pick the source .rpkg chunk the .prim came from.

07

Edit a Material

1
Open Material Properties

Select the mesh → Properties → Material Properties.

2
Swap the image

Click the image field in the slot you want to replace and load your new texture (PNG or TGA).

3
Export

The exporter encodes your texture to the correct BC format automatically.

Match the BC format of the original slot — swapping a BC1 diffuse with BC3 adds full alpha support.
08

Swap a Material

Replaces which .MATI a mesh references — useful for applying a material from another character or prop.

1
Select the mesh

Must have a material loaded via the toolkit.

2
Swap Material

Panel → Materials → Swap Material → pick the replacement .MATI.

3
Rebuild render material

Run Build Render Material again to update the viewport.

09

Texture Tools

Decode to image

1
Decode Texture

Panel → Texture Tools → Decode .TEXT → pick the .TEXT file. The .TEXD loads from the same folder.

2
Result

A PNG (or TGA for normal maps) is written next to the source and opened in the Image Editor.

Encode back

1
Edit the image

Paint or replace the decoded PNG in any image editor.

2
Encode Texture

Panel → Encode .TEXT → pick the edited PNG. Writes .TEXT + .TEXD in the correct BC format.

FormatUsed for
BC1Opaque diffuse / SRM
BC3Diffuse with alpha
BC4Single-channel (AO, mask)
BC5Normal maps (RG)
BC7High-quality diffuse (RGBA)
10

LOD Levels

Meshes can have up to four LOD levels (LOD0–LOD3). LOD0 is full detail. Enable Import LODs in the import options to bring in all levels — each is a separate mesh object in the collection.

For a custom mesh swap, editing only LOD0 is usually fine. The game falls back to unmodified lower LODs at distance.
11

Edit the Mesh

UPDATED v2.9.3

Move existing vertices

Sculpt Mode, Edit Mode, or any modifier that doesn't change vertex count. The exporter byte-patches positions in-place — skin data, bone remap, and aux clusters are copied verbatim from the original. Safest path.

Always use this path for cloth cages — cloth link data is vertex-index based.

Custom topology (different vertex count)

Fixed in v2.9.3. The all-0xFF bone remap that caused in-game vertex explosions is corrected. See §16 Custom Model Swap for the full workflow.

The aux cull-cluster block can't be regenerated. The toolkit writes an empty block (type 0x20). Usually imperceptible for character mods.
12

Export

1
Select the root object

Click the armature or root collection object.

2
Set output folder

Panel → Export → Output Folder.

3
Configure options

Enable Pack RPKG to auto-generate a patch archive. Enable Custom Mesh only if the vertex count changed.

4
Export Prim

Panel → Export Prim. Writes .prim, encodes textures, and — if enabled — generates patch_xxx.rpkg.

5
Deploy

Copy patch_xxx.rpkg to [Game Install]\Runtime\. Launch the game.

OptionDefaultEffect
Pack RPKGOffWraps output into a deployable patch archive
Experimental: Custom MeshOffFull prim rebuild — required when vertex count changed
Export TexturesOnEncodes and includes modified textures
Export MaterialsOnWrites modified .MATI files
13

Full Walkthrough

End-to-end: replace a character mesh and export a deployable patch.

1
Extract

RPKG-Tool → use the built-in chunk browser or CLI to find and extract the .prim, .borg, .MATI, and textures to a work folder.

2
Import

Panel → Import Prim. Enable Load Render Material to see the textured result in the viewport.

3
Edit

Sculpt / reshape the mesh, or follow §16 to swap in a custom model.

4
Edit textures (optional)

Decode a .TEXT, repaint in any editor, encode back.

5
Set Render Source

Armature selected → Panel → Export → Set Render Source → pick the original .rpkg chunk.

6
Export

Enable Pack RPKGExport Prim.

7
Deploy

Copy patch_xxx.rpkg to [Game]\Runtime\ and launch.

14

Troubleshooting

Import

SymptomFix
Skeleton not importedExtract the .borg alongside the .prim
Textures show as pinkExtract .TEXT/.TEXD into the same folder as the .MATI
Collection is emptyMake sure you're pointing at a .prim, not a .borg

Export

SymptomFix
Game crashes on loadThe patch .rpkg must be in [Game]\Runtime\ — not a subfolder
Mesh invisible in-gameSet Render Source before exporting
Custom rebuild failedRun Transfer Weights to Selected before Make Custom Mesh Exportable
RPKG packer not foundRe-install from the latest zip — native DLLs are included

Custom mesh

SymptomFix
Skinned mesh exploded (pre v2.9.3)Update to v2.9.3 — bone-remap bug is fixed
Weights look wrong after transferMove your mesh to overlap the game mesh before transferring, then move it back
Cloth breaks after mesh swapKeep cloth cage vertex count identical; only move existing vertices
UVs distorted after SnapEnable Transfer UVs from Custom Mesh in the Snap operator options
15

Reference

File types

ExtensionContents
.primVertices, normals, UVs, skin weights, LODs, cloth cages
.borgBone hierarchy, bind poses, cloth rig
.MATIMaterial instance — texture bindings and shader class
.MATBShader class definition
.TEXTTexture header — format, dimensions, mip count
.TEXDBCn-compressed pixel data
.rpkgPackage archive — patch archives replace originals at load

Version history

VersionChanges
2.9.3Fixed bone-remap explosion bug. Added Snap Game Mesh to Custom Shape operator.
2.8.0Fixed null-pointer crash from missing aux cull-cluster block on custom topology exports.
2.7.xRPKG packer integrated into the export panel.
2.6.xCloth import / export added.
16

Custom Model Swap

v2.9.3

Replace a game mesh with your own model — different topology, different vertex count — and get it in-game with rigging and UVs intact.

Method A — Custom Topology

Use when your mesh has a different vertex count. Triggers a full PRIM rebuild. Fixed in v2.9.3.

Method B — Snap to Game Slot

Use when you want your custom shape but need to keep the original vertex count. Shrinkwrap projects the game mesh's verts onto your custom surface. Rigging stays completely untouched.

Steps

1
Import game prim

Panel → Import Prim.

2
Import your model

Scale and position it to match the game mesh proportionally.

3
Selection order matters

Click your custom mesh first → shift-click the game mesh (active).

4
Snap Game Mesh to Custom Shape

Panel → Mesh Tools → Snap Game Mesh to Custom Shape. Enable Transfer UVs if you want your custom UVs.

5
Make Exportable

Panel → Make Custom Mesh Exportable.

6
Export normally

No Custom Mesh flag needed — vertex count is unchanged. Panel → Export Prim.

Method B runs the safe-path byte-patcher — skin partition, BoneInfo, BoneIndices, and aux cluster are all copied verbatim from the original.

Comparison

Method AMethod B
Vertex countAnySame as original
RiggingTransferredOriginal — untouched
UVCustom UVsOriginal or transferred
ClothDroppedIntact
Aux clustersEmpty blockOriginal kept

Troubleshooting

SymptomFix
Still exploding after v2.9.3Re-run Transfer Weights and Make Exportable — old metadata may have carried over
Snap result is lumpyYour custom model needs more polygons near the game mesh's silhouette edges
UVs garbled after SnapEnable Transfer UVs from Custom Mesh in the operator options panel (bottom-left after clicking)
Weights all zeroMeshes were too far apart during transfer — overlap them, transfer, then move back