The Refractor Engine is a game engine designed by Stockholm-based studio Refraction Games. It was first developed for the computer game Codename Eagle, which was released in November 1999. Since then, Refraction Games was bought by Digital Illusions CE, who jointly worked on the Refractor 2 engine, used for the Battlefield series on the PC.

  • View media
  • View media

Introduction:

This tutorial will show you, how you can make your Alpha-Channeled parts
in your texture appear invisible in-game. The programs that will be used
are freely available. We'll need GMAX (+Bf2 Gamepack), GIMP (+DDS plugins) and the materials editor.
And your model of course. If you don't have one, or first want to test it,
I got the raw-data of a model for you.

Downloads:

Download GMAX: Files.turbosquid.com GMAX Bf2 Gamepack: Largedownloads.ea.com
Download GIMP: Sourceforge.net
Download DDS plugins: Gimp-dds.googlecode.com
Download the model (Pine): Moddb.com
Download materials.exe : Lipski.co.at

Preparation

If you haven't already done it, install Gimp and Gmax first, then the Gamepack
and then the DDS plugins. How to install them, is described in the .zip file of the plugin. Unzip the Pine.zip file.
You can do this with the build-in unzipper of Windows, or a free unzip-program like 7zip or WinRAR.
Unzip it in your: EAGAMES/Bf2/mods/bf2/objects/staticobjects folder.
Install the BF2Materialtools simply through the installer.

The first step: The model

Open Gmax with the Bf2 tools. Then open the model. I already made the fitting Col. meshes, Lods and
UV-mapping. We just care about the textures now.
Open then "material editor".
Now click on new, and select: Bf2 Staticmesh2.
IMPORTANT: SAVE YOUR WORK! Gmax often crashes, when you rename the materials,
so please save!
Click in the "name" tab, and delete the "Mtl #0" now write: yourmaterialname||Alpha_Test
(pine||Alpha_Test for example).
This is a very important step!
Without setting the ||Alpha_Test tag after the material name, the
engine won't render the alpha-channel invisible.
After you've done this, click on "Base", and select the pine_b.png file from the "EAGAMES/Bf2/mods/bf2/objects/staticobjects/pine/textures/ folder.

Tutorial images
Very good, the first step is done :)
Now save your work.
Just close the "Material Editor" window, press "H" and select everything. Now press the Bf2 button, and select "export"
Export your model to "EAGAMES/Bf2/mods/bf2/objects/staticobjects/pine/" folder.
Tutorial images
NOTE: If it doesn't work, export the file to your desktop, and then paste it into the "EAGAMES/Bf2/mods/bf2/objects/staticobjects/pine/" folder
manually.

Very good, first step is done, let's go on to Gimp:

The second step: Gimping a bit around.

You should have installed the DDS-Plugins now.

Start Gimp (I recommend you version 2.7, even if it's beta, because you don't have to mess around with 3 windows anymore, instead you now have one.
You can activate it through: ->>"window\"-->>"Single-window mode")

Now, open the "pine_b.png" from the "EAGAMES/Bf2/mods/bf2/objects/staticobjects/pine/textures/" folder.
You'll see the texture, and a gray-checkered background. That checker is the alpha channel or the invisible part.
Now, export your work as a .DDS .A dialog will pop up. Select "BC3/DXT5" and also, make sure that
you check the box: "Generate Mipmaps"
Now export it under "pine_b.dds" in the same folder.
Tutorial images

3: Final step: Changing the materials

Open up the BF2MaterialTool. Now go to:
"EAGAMES/Bf2/mods/bf2/objects/staticobjects/pine/meshes/

Now, just drag and drop the "pine.staticmesh" on the BF2MaterialTool.

Now click on the first "MTL"-file. Look on the "Type" window. The value should be "0"
Change it to "2". Now, redo this for every "MTL"-file.

If you're finished, click on "save mesh"
Tutorial images

Viewing our results:

Open up Bf2Editor, and load "bf2". Open the model, in the object editor.
If you've made everything right, it should look like this:
Tutorial images
If anything doesn't look good, or the mapmodel dosen't even load, feel free
to contact me :)

Dementium4ever

Add game Games
Codename Eagle

Codename Eagle

First Person Shooter

Welcome to the world of Codename Eagle, a romp through a parallel universe, where Russia is the reigning nation of the world. You are Red, a member of...

Comments
Muntaqim_313
Muntaqim_313

Not bad for a 1999 engine. Not bad at all.

Reply Good karma Bad karma+3 votes
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Platforms
Windows
Company
DICE
Contact
Send Message
Homepage
Dice.se
Licence
Commercial
Release date
Engine watch
Start tracking
Share
Community Rating

Average

9

1 vote submitted.

You Say

-

Ratings closed.

Embed Buttons
Link to Refractor by selecting a button and using the embed code provided more...
Refractor
Statistics
Rank
348 of 808
Last Update
Watchers
9 members
Games
1
Articles
1