Jul 022015
 

Putting this here for posterity and in case it’s useful to others.

Updated 2015-07-06 with clarifications for the re-orchestrated music section. New entries are marked with an asterisk.

Updated 2015-07-23 with specific instructions on how to apply the “Laser Patch” for Star Destroyers, so they actually shoot and general instructions on adding enhanced models to the game.

This specifically applies only to people who have the Windows CD version of TIE Fighter (the one released using the XvT engine). If you have the old DOS version or the GOG.com version, these instructions may/will not apply to you. These steps are directly adapted from this guide, distilled into the minimal form of the steps I followed. That guide also has instructions for the older DOS version and GOG.com versions, if that’s your thing. Additionally, this is specifically for users of Windows 7 x64. I make no guarantees of applicability to other versions of Windows.

Primary Instructions

  1. Download Tie95-win7.zip
  2. Extract Tie95-Win7.zip to a temporary location (henceforth %TIE95-WIN7_DIR%)
  3. Insert the TIE Fighter CD. Close/exit autostart if it opens.
  4. Open the TIE95 disc in Explorer instead.
  5. Copy all files on disc to your hard drive somewhere (henceforth %TIECD_DIR%)
  6. Run XCS_TIE95_MSI_v1.0.0.0.exe from %TIE95-WIN7_DIR% and point it at the place where you copied the game files.
  7. Run XCS - TIE Fighter 95.msi from %TIECD_DIR%. Accept defaults (or change them as desired; I didn’t try; henceforth, this install path is henceforth %TIE_PATH%).
  8. Copy tie95.bat from %TIE95-WIN7_DIR% to %TIE_PATH%. This file closes Explorer when the game launches (possible color issues) and restarts it again when the game exits. Do not be alarmed.
  9. Locate the TIE Fighter 95 shortcut in the start menu, right-click and choose “Properties”
  10. Change TIESTART.EXE to tie95.bat
  11. Click ‘Apply’, then ‘Change Icon…’, then select the TIE95.EXE and click ‘OK’
  12. Click ‘OK’ to close the properties window.
  13. In your video card profile settings (e.g. NIVIDA Control Panel), create a profile for TIE95.EXE
    • Disable anti-aliasing. Having it on leads to weird color flickering.
    • Enable 16x Anisotropic Filtering
  14. Open XWTIE95.zip from %TIE95-WIN7_DIR% and run XWTIE95.exe to prevent D3D crashes.
  15. Make sure the disc is in the drive
  16. Copy B6M3GW.TIE from %TIE95-WIN7_DIR% to %TIE_PATH%\Mission (official LucasArts patch for this mission)
  17. Make sure you have a joystick plugged in. Game won’t cooperate without one.
  18. Run the game from your shortcut

Reorchestrated Music

To get the original music and improved voice, you basically need to rebuild the TIE CD disc with the Reorchestrated data files.

  1. Ensure you have a way to create and virtually “mount” ISO and BIN/CUE disc images
  2. *Download TF95ReorchestratedMusic.zip
  3. Download TF95ReochestratedDatav1.zip
  4. *Extract TF95ReorchestratedMusic.zip (doesn’t matter where). You should have a .bin and a .cue file.
  5. *Burn the BIN/CUE image to a blank CD (DVD will not cut it). Critically, there is no data (other than an empty blank.txt file) on this disc! It’s writing audio tracks layered with a data track and the game is expecting to find these audio tracks. This is key to make the in-flight battle music play.
  6. *This disc is now the physical disc you must have present when you play, not your original CD. Instead, the following steps will replace the physical CD with a virtual one.
  7. Extract TF95ReochestratedDatav1.zip to %TIECD_DIR%
  8. Replace %TIE_PATH%\TIE95.EXE with the one in the Data zip’s INSTALL folder.
  9. Create an image of %TIECD_DIR% and be sure to name it TIE95 (so it matches the original game disc)
  10. Mount it as TIE95 using some kind of virtual mounting software.
  11. *Ensure the original game disc is no longer in your drive and you are instead using the newly-created music disc.
  12. Run the game from your shortcut
  13. You may get prompted that there is no disc in the original drive. Click ‘Cancel’ and the game should launch anyway. It will not show this warning on subsequent runs.

Laser Patch

The original release of the game had a bug wherein ISDs wouldn’t shoot anything other than missiles. As you might imagine, this has/had a rather deleterious effect on mission balance for several missions (Battle 11 Mission 2, in particular, is all but impossible without your Star Destroyer dishing out firepower alongside you). This problem was fan-patched back when it was first discovered, but with all the binary file changes involved in the above, those patches don’t really work. I managed to figure out where in the executable the patches made their changes, though, by comparing byte-code before and after of a binary that I could patch. If you’re feeling brave and want to edit hexadecimal byte code directly, follow the following instructions.

  1. Obtain some way to edit binary files. I like frhed.
  2. Make a backup of your TIE95.exe file! I cannot stress this enough. If you screw up the binary, you’re SOL and will have to repeat everything above all over again.
  3. Open TIE95.exe in your hex editor.
  4. Locate offset 00dd89c and change these four bytes from 34 35 35 37 to 34 36 36 37.
  5. Locate offset 00ee834 and change the first of the four bytes at this location from 00 to 03.
  6. Locate offset 00ee844 and change the last of the four bytes at this location from 35 to 34.
  7. Locate offset 00ee848 and change these four bytes from 02 00 03 01 to 00 45 03 21.
  8. Locate offset 00ee84c and change these four bytes from 00 03 1c 0c to 00 04 00 fa.
  9. Locate offset 00ee850 and change these four bytes from 84 03 00 00 to 00 7d 00 00.
  10. Save your modified binary.
  11. Give it a spin. Star Destroyers should now shoot.

Enhanced Ship Models

It is possible to use more advanced ship models, such as those in XvT, XWA, or the high-quality models produced by the XWAU project, in TIE Fighter. I’m not going to enumerate every step involved, but you’ll need a program called OPTech (the site’s hideous, but the tool’s good), which can read and write OPT model files in both the format used by X-wing Alliance and the older XvT-style format used by the Window release of TIE Fighter. Create a new project in OPTech, import an OPT, save it as XvT format, rename it as necessary, and drop it into your %TIE_PATH%/IVFILES directory, deleting any OP1 files that may also share the same name.

Enjoy!

Photogrammetry

 Posted by at 13:42  2 Responses »
Sep 242010
 

Photo-what?

That ugly word is actually a very useful tool for reconstructing geometric information from 2D images. Using a collection of similar photographs of a given subject, you can use matrix math to recompute the 3D structure of that object from the 2D images. Not by hand, mind you. That would take way more brainpower and patience than pretty much anyone has any desire to lend to the task. Computers, however, make great photogrammetric calculators.

Why is this relevant to anything? Well, it’s pretty important when you want to accurately recreate something in the world in a 3D modeling environment and you don’t have access to A) the thing you want to create and B) a 3D scanner. Specifically, I’m talking about modeling spaceships. Most 3D hobbyists just wing it, eying the proportions and getting pretty close. But let’s be honest: when have I ever been satisfied with getting “pretty close” when I could use math to be exact?

I started out modeling a Star Destroyer last year, trying to take very accurate measurements in Photoshop and extrapolating the “right” values by averaging several of these measurements together. I was putting together what looked like a fairly accurate model. Then I read about photogrammetry. This had two effects: the first was that my progress on the Star Destroyer model ground to a halt; the second was a period of intense research into the fundamental math behind photogrammetry. This included (re-)teaching myself matrix math, learning about projection matrices1, and so on. I googled university lectures, dissertations, and dissected open-source projects to understand how this process was done.

Sadly, none of the open-source projects I found would do quite what I want. It seems that the hot thing in photogrammetry is reconstructing terrain surface detail with as many recreated vertices as the resolution of the source images would allow. I wanted to define just a handful of points each image and have a mesh reconstructed from them. From there, I would do the fine detail work on my own. So, I started writing my own program (in Python) to do it. Losing my job, getting a new job, and getting married all conspired to prevent much progress on this front, though, so it hasn’t progressed very far yet.

Assuming I can get something I’m happy with, though, it will alleviate one of the biggest sticking points I’ve always had when modeling technical things: accurate blueprints. Just about every set of blueprints for every technical thing2 I’ve tried to model has had errors in it. Not little, nitpicky errors, either, but major, mismatched proportions between orthographic views. In one image, a component would be X pixels long but in another image—from the same set of diagrams, mind you—it would be Y pixels long. In some cases, you can just split the difference and get something decent. Most of the time, these compromises compound until you’ve got an irreconcilable problem.

Anyway, this is probably one of those topics that will prompt most people who read this to smile, nod, and pat me on my math nerd head. All the same, it’s interesting to me, so maybe it’ll strike your interest to.

  1. A projection matrix describes the conversion of a 3D coordinate to a 2D coordinate through a camera lens, essentially. []
  2. Okay, okay, spaceship. []
Sep 172010
 

Have you ever noticed that sometimes, we do things that provoke a predictable response that we then use to galvanize further action? Yeah, that’s a little vague. Let me clarify: the other day, Scalzi posted this. For the TL;DR crowd, the short version is:

Do you want to write or don’t you? If your answer is “yes, but,” then here’s a small editing tip: what you’re doing is using six letters and two words to say “no.” And that’s fine. Just don’t kid yourself as to what “yes, but” means.

I shared this article with Cody; that’s the “doing something to provoke” part. This morning, Cody asks me, “So, do you want to be a writer, or not?” Enter: “a predictable response” part. I knew, on seeing that article, she would needle me about the fact that I haven’t really exhibited much in the way of writer’s ambition since I finished the zeroth draft of the novel back in November. I’ve poked at the idea of editing it ever since, but haven’t really done much.

Anyway, this exchange dovetailed nicely with a growing urge to try to actually write something here every day, if for no other reason than to practice the work of stringing sentences together. I’ve entertained the idea of actually having a readership for this blog, and enjoy that notion. The trouble is that whole ‘building a readership’ part that has to come first. When the desired end state starts taking more time than my patience allots, I slack off on actually getting to that end state, thereby never attaining it. This has been true in my for-fun modeling (oh, Star Destroyer project, I shall one day finish you!), in the notion of getting more into costuming and crafting-type things, in learning to play guitar, drawing, and writing. It’s a bad habit and needs to die a horrible, painful death.

So, pursuant to that, I’m going to start trying to write something here every day, at least 250 meaningful words in length. Meaningful, mind you, does not get to be in the eye of the beholder!