Skip to content

B3: NIF V3.1 parser #141

Open
Open

Description

@Cadacious

Summary

Implement a minimal NIF V3.1 binary parser that can load Bridge Commander ship models. Target: ~2-3K LOC.

Scope

Parse the NIF classes needed for ship rendering:

  • NiNode (scene hierarchy)
  • NiTriShape / NiTriShapeData (mesh geometry: vertices, normals, UVs, indices)
  • NiTexturingProperty + NiSourceTexture (texture references)
  • NiMaterialProperty (material colors)
  • NiAlphaProperty (alpha blending)
  • NiZBufferProperty (depth buffer settings)
  • NiVertexColorProperty
  • NiKeyframeController + NiKeyframeData (animation, deferred to B8)

Reference Resources

  • `engine/nif.xml` -- NIF format spec with V3.1 field definitions
  • `engine/gamebyro-1.2-source/` -- Gamebryo 1.2 source for algorithms
  • `engine/mwse/` -- MWSE headers for struct offsets
  • NifSkope for visual validation

Acceptance Criteria

  • Loads a BC ship .nif file without crashing
  • Extracts vertex/index/normal/UV data for all mesh nodes
  • Extracts texture file references
  • Builds a scene hierarchy matching the NIF node tree
  • Validated against NifSkope visualization for at least 3 stock ships
  • Unit tests for NIF header parsing, node traversal

Blocks: #120

Activity

  1. added
    phase-2Phase 2: Plugin Architecture + Game Client
    track-bTrack B: Game Client
    on Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureArchitecture and designphase-2Phase 2: Plugin Architecture + Game Clienttrack-bTrack B: Game Client

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions