Difference between revisions of "NightFire2Source"

From DanIT
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
To extract the 007 Nightfire files, you need:
 
To extract the 007 Nightfire files, you need:
 
* An .ISO of the PS2 version of Nightfire
 
* An .ISO of the PS2 version of Nightfire
* [https://github.com/NightfireResearch/nightfire-re The Nightfire research tools] (nightfire-re)
+
* The Nightfire research tools (nightfire-re)
 
* [https://www.python.org/downloads/ Python]
 
* [https://www.python.org/downloads/ Python]
  
Line 10: Line 10:
 
# Run the Python script 'main.PY'.
 
# Run the Python script 'main.PY'.
 
# All the extracted files will be located in the folder 'iso_extract\platform_ps2\ps2_converted'.
 
# All the extracted files will be located in the folder 'iso_extract\platform_ps2\ps2_converted'.
<br>
 
  
=== Converting to Source ===
+
=== Models to Source ===
 
The extracted files include .OBJ files of level parts of the singleplayer FPS levels and all multiplayer levels.<br>
 
The extracted files include .OBJ files of level parts of the singleplayer FPS levels and all multiplayer levels.<br>
  
Line 18: Line 17:
 
# Run the 'Compile-OBJ2MDL.PS1' PowerShell script in the same folder as the .OBJ files.<br>''(this uses Hammer's studiomdl.exe tool to convert the .OBJ format to Source/Hammer-compatible models including .MDL files.''<br>Edit this script's settings to fit your projects targeted game.<br>The right files will automatically be extracted to your game's 'models' folder.<br>
 
# Run the 'Compile-OBJ2MDL.PS1' PowerShell script in the same folder as the .OBJ files.<br>''(this uses Hammer's studiomdl.exe tool to convert the .OBJ format to Source/Hammer-compatible models including .MDL files.''<br>Edit this script's settings to fit your projects targeted game.<br>The right files will automatically be extracted to your game's 'models' folder.<br>
 
# Open Hammer, place an object (prop_static), change the model to the Nightfire level part you want.<br>You can stitch multiple level parts together.<br>
 
# Open Hammer, place an object (prop_static), change the model to the Nightfire level part you want.<br>You can stitch multiple level parts together.<br>
<br>
 
  
=== Next Step ===
+
=== Textures to Source ===
 +
The extracted files include .PNG files of textures of the singleplayer FPS levels and all multiplayer levels.<br>
 +
 
 +
# Use [https://github.com/Sky-rym/VTFEdit-Reloaded/releases VTFEdit] on the images to create Source compatible textures.
 +
# Save the .VTF and .VMT files in your game's 'materials' folder.<br>''You can also edit the .VMT file to change the sound a texture makes.''
 +
 
 +
=== Creating Shapes ===
 
The OBJ files are 3D models, but in order to create a workable level in Source, we need brushes instead of models.<br>
 
The OBJ files are 3D models, but in order to create a workable level in Source, we need brushes instead of models.<br>
There is no other way than to manually redraw all the surfaces as brushes, but we can import the level parts as model to use as reference to easily draw over it, and the scaling to Source is such that the parts fit on the Hammer grid, thus creating an almost 1:1 replica.<br>
+
There is no other way than to manually redraw all the surfaces as brushes, but we can import the level parts as model to use as reference to easily draw over it,<br>and the scaling to Source is such that the parts fit on the Hammer grid, thus creating an almost 1:1 replica.<br>
  
 
# (Re)position the model of the level part so its fits/snaps to the Hammer Grid (use Grid Level 2 or higher).
 
# (Re)position the model of the level part so its fits/snaps to the Hammer Grid (use Grid Level 2 or higher).
# Use the block tool to redraw the brushes of the level parts
+
# Use the block tool to redraw the brushes of the level parts.
<br>
+
 
Notable dimensions (currently mostly based on Drakes Castle / Snow Blind map):
+
=== Applying Textures ===
 +
# Use the texture tool to selected a face of a brush that you want to texture.
 +
# Change the texture to the texture you want.
 +
# Change the size and position if needed.
 +
 
 +
===Common Dimensions===
 +
(currently mostly based on Drakes Castle / Snow Blind map):
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 34: Line 44:
 
| Model Scale (Original OBJ to Hammer Units) || x40 (39.97)
 
| Model Scale (Original OBJ to Hammer Units) || x40 (39.97)
 
|-
 
|-
| Texture Scale || 0.5 (mostly)
+
| Texture Scale || 0.3125 / 0.625
 
|-
 
|-
 
| Wall Thickness (Thin) || 5
 
| Wall Thickness (Thin) || 5
Line 48: Line 58:
 
| Hallway Width || 120
 
| Hallway Width || 120
 
|-
 
|-
| Stairs Step || 8x16
+
| Stairs Step || 8 x 16
 
|-
 
|-
 
| Stairs Step Count || Multiple of 5
 
| Stairs Step Count || Multiple of 5
 
|-
 
|-
| Knee Height (retaining wall, etc.) || 40
+
| Door Frame || 70 x 100 (beams 10 x 10)
 +
|-
 +
| Window Frame || 70 x 70 (beams 5 x 5)
 +
|-
 +
| Knee Height (retaining walls, etc.) || 40
 
|}
 
|}
 
* The more distance a level/map covers, the more inaccurate the scale for the reference models become, up to 1 HU per 4000 HU.
 
* The more distance a level/map covers, the more inaccurate the scale for the reference models become, up to 1 HU per 4000 HU.

Latest revision as of 16:19, 12 September 2025

A project workflow to port over levels from the 007 Nightfire console version to the Source engine.

Extracting the Files

To extract the 007 Nightfire files, you need:

  • An .ISO of the PS2 version of Nightfire
  • The Nightfire research tools (nightfire-re)
  • Python
  1. Place the ISO in the 'iso_dump_folder' folder of 'nightfire-re'.
  2. Run the Python script 'main.PY'.
  3. All the extracted files will be located in the folder 'iso_extract\platform_ps2\ps2_converted'.

Models to Source

The extracted files include .OBJ files of level parts of the singleplayer FPS levels and all multiplayer levels.

  1. Run the 'Set-Scale.PS1' PowerShell script in the same folder as the .OBJ files.
    (this scales the object 40x, to match the right dimension for the Source engine Hammer Units.
  2. Run the 'Compile-OBJ2MDL.PS1' PowerShell script in the same folder as the .OBJ files.
    (this uses Hammer's studiomdl.exe tool to convert the .OBJ format to Source/Hammer-compatible models including .MDL files.
    Edit this script's settings to fit your projects targeted game.
    The right files will automatically be extracted to your game's 'models' folder.
  3. Open Hammer, place an object (prop_static), change the model to the Nightfire level part you want.
    You can stitch multiple level parts together.

Textures to Source

The extracted files include .PNG files of textures of the singleplayer FPS levels and all multiplayer levels.

  1. Use VTFEdit on the images to create Source compatible textures.
  2. Save the .VTF and .VMT files in your game's 'materials' folder.
    You can also edit the .VMT file to change the sound a texture makes.

Creating Shapes

The OBJ files are 3D models, but in order to create a workable level in Source, we need brushes instead of models.
There is no other way than to manually redraw all the surfaces as brushes, but we can import the level parts as model to use as reference to easily draw over it,
and the scaling to Source is such that the parts fit on the Hammer grid, thus creating an almost 1:1 replica.

  1. (Re)position the model of the level part so its fits/snaps to the Hammer Grid (use Grid Level 2 or higher).
  2. Use the block tool to redraw the brushes of the level parts.

Applying Textures

  1. Use the texture tool to selected a face of a brush that you want to texture.
  2. Change the texture to the texture you want.
  3. Change the size and position if needed.

Common Dimensions

(currently mostly based on Drakes Castle / Snow Blind map):

Description HU Dimensions
Model Scale (Original OBJ to Hammer Units) x40 (39.97)
Texture Scale 0.3125 / 0.625
Wall Thickness (Thin) 5
Wall Thickness (Normal) 10
Floor Thickness (Normal) 10
Floor Thickness (Thick) 20
Room Size Multiple of 20
Hallway Width 120
Stairs Step 8 x 16
Stairs Step Count Multiple of 5
Door Frame 70 x 100 (beams 10 x 10)
Window Frame 70 x 70 (beams 5 x 5)
Knee Height (retaining walls, etc.) 40
  • The more distance a level/map covers, the more inaccurate the scale for the reference models become, up to 1 HU per 4000 HU.