Skip to content

About

Personal remaster of Star Wars Jedi Knight: Dark Forces II for Apple Silicon Macs, built on OpenJKDF2. Modern lighting, HD textures and models. No game assets included.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

2,127 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jedi Knight: Dark Forces II, remastered for Apple Silicon

A personal project to rebuild the look of Star Wars Jedi Knight (1997) on a modern Mac, while keeping it unmistakably Jedi Knight.

Today vs target: level 1 as it runs now (left) and the art direction it's heading towards (right)

Left: the game today, running natively on Apple Silicon. Right: the art direction (AI concept art of the same room, used as a north star, not a promise).


What this is

Jedi Knight is one of my all-time favourite games, and this fork is where I'm remastering it: native on Apple Silicon first, then modern lighting, HD materials, new models and upscaled cutscenes. The goal is the game as you remember it, rather than how it actually looked in 1997.

The engine is OpenJKDF2, the community's function-by-function reimplementation of the original engine. All the hard reverse-engineering credit goes to that project. Everything here is built on top of it and kept in sync with it.

What it isn't: a new game, a mod pack or a commercial product. No game assets are included or ever will be. You need your own copy of the game (the GOG version is recommended).

Art direction

The target is dark, wet, grimy and atmospheric: lived-in industrial rather than clean sci-fi. Light pools on wet metal, haze in the air, light shafts through skylights, dense blacks and a desaturated, warm-brown grade.

That breaks down into concrete engine work:

The look needs How Status
Lights that pool on surfaces and glint off wet metal Per-pixel lighting with specular highlights Done (playtesting)
Wet floors reflecting light strips, sky and objects Screen-space reflections Done (playtesting)
Haze and light shafts Volumetric fog lit by the baked light, screen-space light shafts Fog on all 25 levels (playtesting); height fog, smoke and steam next
Filmic colour Colour grading pass with live-reloading .cube LUTs from Resolve Done
Glowing lights and sabers that roll off softly Bloom (built in) into a half-float buffer with highlight roll-off Done
Every shot lit like a film: side key light, rim light on every character, nothing flat Light bake with recovered designer lights (Blender Cycles); light probes so characters take the baked light's colour and direction, plus key, rim and floor light All 25 levels baked: light maps and light probes in game (playtesting)
Crisp, detailed, grimy surfaces HD textures with roughness and normal maps Stage 3
Detailed characters New models through a Blender pipeline Stage 4

Progress

Stage What Status
1 Native build on Apple Silicon, one-command build and run Done
2 Rendering: Retina, filtering, colour grading, per-pixel lighting, atmosphere In progress
3 HD textures with material maps, true-colour replacement loader In progress
4 Models: Blender import/export for .3DO and .KEY, new Kyle and stormtroopers In progress
5 Cutscenes: upscaled and graded, played from modern video files In progress
6 Mysteries of the Sith: the same treatment for the expansion Not started

Stage 2 checklist

  • Audit what the renderer already offers (bloom, SSAO, SSAA, filtering, FOV and frame cap are all built in)
  • Silent, repeatable screenshot and frame-timing captures for before/after comparisons
  • Retina (HiDPI) by default on macOS
  • Mipmaps and anisotropic filtering for true-colour textures
  • Colour grading: exposure, highlight roll-off, live-reloading .cube LUTs
  • Measure the cost of bloom, SSAO and SSAA (130+ fps with everything on)
  • Art direction chosen
  • Per-pixel lighting with wet highlights for dynamic lights (plan), being playtested
  • Highlights from glowing surfaces: built, but reads as blobs rather than wet; off by default
  • Screen-space reflections for wet, reflective floors (being playtested)
  • Coloured light from sabers, including enemy sabers
  • Haze and light shafts (being playtested)
  • Volumetric cloud sky with moon shafts on the storm levels (Maw, Sarris, the ascent); other skies to follow
  • Cinematic key and rim light on characters and props (first pass)
  • Light bake in game: baked light maps replace the 1997 corner light on six test levels (r_lightmaps, in the remaster preset) (plan)
  • Light probes: characters and props lit by the bake around them (colour, direction, floor light)
  • Light bake on all 25 levels: light maps, light probes and light volumes
  • Light bake tuning (sun for day levels)
  • Volumetric fog lit by the baked light (r_volumetricFog, all 25 levels)
  • Height fog on outdoor levels, distance fog
  • Fog volumes placed by hand in Blender (tools/blender/atmos_volumes.py)
  • Smoke and steam emitters, placed in Blender, lit by the bake
  • Dust in the light; light shafts that stop at walls (plan)
  • Film touches: grain, a little more contrast, anamorphic lens streaks (r_filmGrain, r_contrast, r_anamorphic)
  • Lightsaber dismemberment on ordinary enemies (g_dismember)
  • One-switch preset: remaster 1 in the console

Stage 3 checklist

  • Research: OpenJKDF2 already loads HD texture packs (colour, glow, displacement maps)
  • Tool to extract every original texture to PNG (tools/mat_extract.py)
  • Rebuild the community Neural Upscale pack from its installer (555 textures matched so far)
  • Rebuild from all three Remastered installers, palette-correct (no wrong colours in other levels)
  • Engine fix: HD texture hashes use the level's real palette (coverage went from almost none to dozens per view)
  • Performance: full remaster + HD runs at about 107 fps on the MacBook's native screen and 70 fps on a 7680x3240 ultrawide (was 11: light shafts now at half resolution, effects at the scene's size, automatic render scaling to 10 megapixels)
  • Material maps in the engine: roughness, metalness, AO and normal maps per texture (rock defaults to matte)
  • Importer for Texture God output (my own AI upscaling and PBR pipeline)
  • First full Texture God batch in game (217 level textures, gritty look, own pack)
  • Texture God on every level, including per-level palette variants (507 textures in game)
  • Roughness and normal maps for the wet, grimy look: Texture God's where it has them, and learned from them for the 693 textures it hasn't done
  • Upscale and hand-finish key textures (hangar, Nar Shaddaa, Kyle)
  • Procedural water: 3D swell on a fine mesh, ripples, sky and scene reflections, open vs covered (every level with water)
  • MetalFX upscaling (Apple's upscaler) on top of the OpenGL renderer: +43 % on a 7680x3240 ultrawide, +92 % at laptop size with the full remaster look (plan)
  • Native Metal renderer: the whole remaster on Metal, MetalFX native (59.6 fps vs OpenGL's 53.4 on a 7680x3240 ultrawide); the launcher opens it (design)
  • Temporal MetalFX on Metal: jittered frames, motion vectors from depth and camera; sharper and faster than spatial at laptop size
  • Metal tuning: effects in tile memory
  • Procedural computer screens: displays glow with scanlines and a rolling refresh band, computer banks blink
  • Procedural grass blades on Katarn's farm: tufts in the green patches, lit like the ground, moving in the wind (plan)
  • Rain on the storm levels: falls around the camera, splashes, soaks and ripples the open ground, stops under roofs and indoors

Stage 4 checklist

  • Blender tools: the community blender-sith add-on, tested on Kyle and the stormtrooper (model and animation in and out of Blender 5.3, identical in game)
  • Tool to pull any model, animation or texture out of the game archives (tools/gob_extract.py)
  • Engine limits mapped: 512 vertices and 512 faces per body part, 64 joints
  • Raise the per-part limits for detailed models (8192 vertices per mesh)
  • Skinning: one continuous mesh bends with the original skeleton, so every original animation drives modern characters (tested pixel-identical)
  • Fit Jedi Academy's Kyle onto JK's skeleton (tools/blender/ja_to_jk.py): in game, driven by the original animations
  • Stormtrooper from Jedi Academy (keeps JK's own rifle as a rigid part)
  • The cast from Jedi Academy: officers, commandos, Grans, Rodians, Trandoshans, Ugnaughts (18 JK models)
  • Animation check: crouch, fire, jump, punch and saber swing drive the new Kyle cleanly
  • Named characters (Jerec and the Dark Jedi, Jan) and civilians
  • Material pass on the converted characters (Texture God) - Kyle done (roughness/AO/normal maps)
  • New Kyle, built in the original's 16 rigid parts so every existing animation still drives him
  • New stormtrooper
  • New lightsaber: Kyle's hilt from Jedi Outcast in third person, first person and the pickups
  • Third-person weapons no longer carry the 1997 hand
  • Glowing plasma blades: white-hot core, coloured sheath and halo, animated, lighting the room (r_saberGlow)
  • Lightsaber swing trails (only on real swings)
  • First-person hands: Kyle's gloves and sleeves on every weapon view
  • First-person hands v2: bare hands (free PSX arms pack), rounded sleeves, Texture God jacket
  • First-person weapons from the JK Enhanced mod (10-35x the polygons), driven by the original animations with Kyle's arms, Texture God textures
  • Third-person and pickup weapons from JK Enhanced (5-20x the polygons), Texture God textures

Stage 5 checklist

  • Extract all 25 cutscenes (640x300, 15 fps, 33 minutes) to ProRes for upscaling and grading (scripts/extract_cutscenes.sh)
  • Engine plays HD replacements (H.264, HEVC or ProRes, any resolution or frame rate) in place of the originals, with the originals as fallback and subtitles kept
  • Upscale all 25 (Topaz, 3x to 1920x900, original 15 fps; interpolation looked janky)
  • Grade in After Effects
  • Playtest every cutscene in game

Latest

Every comparison below is the real 1997 game (original models, textures and lighting) on the left and the remaster on the right. New work lands on feature branches first and merges here once it's been checked.

Where it stands, level by level. The real 1997 game beside the remaster as it runs today on the native Metal renderer, with everything below switched on.

Storm and grass: the Maw, Sarris and Katarn's farm, 1997 vs remaster

Interiors: Boc, Yun, the ascent and the cargo ship, 1997 vs remaster

Sharper, faster, more material. Temporal MetalFX now gathers detail across frames (sub-pixel camera jitter plus motion vectors rebuilt from depth and the camera), so on normal-sized screens the game renders a quarter of the pixels and still looks close to native. The volumetric fog marches at half resolution with a depth-aware upscale, saving 3.6 ms a frame on a 7680x3240 screen. And the 827 HD textures that had no material maps now have roughness, metal, ambient occlusion and normal maps, learned from Texture God's own.

Rain on the storm levels. The Maw, Sarris and the ascent now have the storm their skies promised (and Katarn's farm a drizzle). Streaks fall around the player in two layers, near and far, and stop under roofs, bridges and indoors, using a baked map of what's overhead. Where they land they splash, and open ground gets soaked: darker, glossy and rippled by the drops, so the reflections shimmer. (clip)

Sarris rooftop in the storm: 1997 vs rain, splashes and soaked ground

Grass that grows. Katarn's farm was a flat printed texture. Now a dense field of grass grows around the player (hundreds of blades per square metre nearby, thinning into the distance), rooted on the lumpy ground, lit like it, and moving in slow gusts of wind, with the ground underneath turned to dark turf. (clip)

Katarn's farm: 1997 vs grass

Screens and computer banks that are switched on. Displays now glow with CRT scanlines, a slow rolling refresh band and a flicker, and the walls of computer banks blink their indicator lights, each at its own pace. (clip)

Cargo ship computer wall and escape ship display: 1997 vs remaster

A native Metal renderer. The whole remaster now runs on Apple's Metal directly instead of OpenGL (which macOS translates to Metal anyway), with Apple's MetalFX upscaler built in: about 60 fps on a 7680x3240 ultrawide with every effect on, versus 53 for OpenGL with the upscaler and 39 without it. The OpenGL renderer stays as a fallback.

Procedural water. The 1997 water was a flat, printed texture. Now every water surface is a fine mesh that a slow swell lifts and drops in 3D, with real ripples on top, mirroring the sky clouds where it's open and the room's own light where it's covered; walls, people and lights reflect in it too. Only the old texture's colour survives. (clip)

Barons Hed canals: 1997 vs procedural water

Baked lighting, light probes and volumetric fog. Every level's lighting has been re-baked in Blender's Cycles path tracer: the level designers' lights (recovered from the 1997 lighting), every glowing strip and lamp as a real light, and sky light through openings, with shadows and bounce light. Levels use the result as light maps; characters and props take their light from baked light probes (colour, direction, a rim from the light behind them and the glow of the floor under their feet); and the air is filled with volumetric fog lit by the same bake, so it glows red over the hangar strips and stays dark between lights. All 25 levels are baked.

Hangar: the 1997 game vs the remaster

Six levels, 1997 vs remaster:

Baked lighting on six levels

Everything together: HD textures, Jedi Academy's cast on the original skeletons, per-pixel lighting, wet reflections, bloom, ambient occlusion, a filmic grade and the new skies (open the console with backtick and type remaster 1; remaster 0 for the original):

The 1997 game vs the remaster

Bloom and lens flares: bright light fixtures (skylights, lamps, light panels) bloom, and everything bright throws a film-style anamorphic streak and lens ghosts:

Bloom and lens flare, 1997 vs remaster

Fog placed by hand: a Blender add-on loads any level, lets me drop boxes and ellipsoids of fog over it and exports them for the game. First use: low mist rolling across the hangar floor, lit red by the strips:

Hand-placed floor mist in the hangar

Smoke, steam and dust: smoke and steam emitters can be placed with the same Blender add-on (they billow, rise, fade into floors and walls and take the baked light); they'll go where something motivates them, like vents, grates and wreckage. Dust motes drift and twinkle wherever the air is lit (hangar clip: fog, floor mist and dust in motion).

Skies: a volumetric cloud sky on the storm levels and presets for the rest (Nar Shaddaa smog, Sulon overcast, day and sunset skies):

Skies, 1997 vs remaster

Lightsaber: a glowing plasma blade instead of a flat textured strip, a white-hot core, a deep coloured sheath and a halo that lights the room, with swing trails. (video)

Lightsaber, 1997 vs remaster

The cast: most of Jedi Knight's characters now use Jedi Academy's models, fitted onto the original skeletons so every 1997 animation still drives them (same lighting and framing for each pair):

The cast, 1997 vs remaster

In game: Nar Shaddaa

Texture God on every level: my own AI upscaling and PBR pipeline covers every level texture, including per-level palette variants (507 textures in game). Original texture (left of each pair) vs Texture God:

Texture God palette variants

Cutscenes: all 25 play upscaled in game (Topaz, 1920x900), original (left) vs upscale:

Cutscenes, original vs upscale

Next up: materials (roughness and normal maps, so wet metal shines and cloth doesn't).

Decisions, findings and dead ends are logged as I go in docs/DECISIONS.md.

Building it yourself (macOS, Apple Silicon)

git clone --recursive https://github.com/domdino/OpenJKDF2.git
cd OpenJKDF2
brew install cmake imagemagick openal-soft glew libpng openssl@3 protobuf libmodplug innoextract
scripts/build.sh

Extract your own copy of the game into gamedata/jk1/. For the GOG installer: innoextract --language english -I app <installer.exe>, then move the contents of app/ there. Then:

scripts/run.sh

scripts/build.sh metal builds the native Metal renderer (OpenJKDF2-Metal.app), and scripts/make_launcher.sh puts a double-click launcher on the Desktop that opens it.

To see the remastered look, open the console in game (backtick) and type remaster 1. Colour grades live in grade/; the game reloads grade/default.cube live whenever it changes.

Credits and legal

All engine credit goes to the OpenJKDF2 project and its contributors. Star Wars, Jedi Knight and related marks are the property of Lucasfilm and Disney. This project is not affiliated with or endorsed by them, includes no original game assets, and is for personal, non-commercial use only. Concept images are AI-generated references for art direction.

About

Personal remaster of Star Wars Jedi Knight: Dark Forces II for Apple Silicon Macs, built on OpenJKDF2. Modern lighting, HD textures and models. No game assets included.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages