The Freelancer Community Site by Team [RIP] » Board index » The FLC Public Forums » Freelancer Tutorials




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Mon Jun 06, 2011 10:27 pm 
Offline
Member
Member
User avatar

Joined: Sun Jan 06, 2008 6:32 pm
Posts: 26
For those that have flown in the latest version of the Underverse, version 2.25, You either currently own or have flown one of the 6 ships from the game Descent 3, ported by myself. At the request of DwnUnder, I am posting my Tutorial of how I converted these ships form their native .oof file format to Freelancer .cmp and .mat file formats.

For those that are seasoned modders, please forgive the simplistic explanations of basic modding in these Lessons. I hope that the information provided here can help any future modders or users of Milkshape some pointers and/or some basics of the program.

Edit: Screenshots will be provided in .zip format.

Fus

_________________
Proud Member of Team [RIP] http://www.ripteam.com
[img]http://img.photobucket.com/albums/v105/tcoil/11.jpg[/img]


Last edited by Fusion on Mon Jun 06, 2011 10:38 pm, edited 1 time in total.

Top 
 Profile  
 
 Post subject: Re: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Mon Jun 06, 2011 10:36 pm 
Offline
Member
Member
User avatar

Joined: Sun Jan 06, 2008 6:32 pm
Posts: 26
How to convert Descent 3 .orf files to Freelancer .cmp
By [RIP]Fusion



In this tutorial we will not worry about HP's, surs or deglitching.
To convert from Descent 3 room files known as .orf files to Freelancer .cmp will require the following programs and addon files:

Programs:
[*]D3edit
[*]OOF Editor
[*]LithUnwrap
[*]Any Image
[*]Milkshape 3D
[*]UTF Editor 1.4 or 3.0



Auxilary files needed:
For Milkshape
[*]Freelancer CMP exporter version 0.2
[*]Freelancer MAT exporter version 0.1

To do the conversion is quite straightforward. First download and install the LithUnwrap program. If you haven’t already done so install Milkshape. The latest version I am using is 1.8.4. After installing, insert the .dll files of the CMP and mat exporters into the Milkshape root folder.

After creating your ship (or other object) in D3edit, it will be in the .orf file format. For our example we will call it ship.orf. Open OOF Editor and open the orf file. Save as ship.oof. Close OOF Editor and D3edit. Open Lithunwrap. Open your ship.oof under File/Model/Open. After opening, it might show a small portion of the top, but I assure you, the whole model is there. Got to Select/All and then drag the whole the whole file to the bottom if the screen. Return to File/Model/ and chose Save this time.
Using the drop down menu, Save as type Milkshape 3D, file name is ship.ms3d. Close Lithunwrap.

End Lesson 1.


Attachments:
Lesson1.zip [80.33 KiB]
Downloaded 355 times

_________________
Proud Member of Team [RIP] http://www.ripteam.com
[img]http://img.photobucket.com/albums/v105/tcoil/11.jpg[/img]
Top 
 Profile  
 
 Post subject: Re: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Mon Jun 06, 2011 10:42 pm 
Offline
Member
Member
User avatar

Joined: Sun Jan 06, 2008 6:32 pm
Posts: 26
Preparing the textures:


Programs Needed:
  • D3edit or HOGVIEW32
  • OgfTool
  • Any Image

Before we begin with the Milkshape file, lets convert our textures. Milkshape can only work with 2 texture file types, .tga or .dds. Using .tga files requires extra steps to make them work properly, so go with .dds. We will take our tgas (or whatever the file type is) and convert to .dds (Direct Draw) file format.

If you use textures out of the Descent 3 .hog file, you can either use the D3edit to extract the files, or HOGVIEW 32. Once extracted, use OGFTool to convert from ogf to tga. Close your programs. Install the program AnyImage.
Any Image is so self explanatory it’s not even funny. :D There is one thing tho, a rather annoying thing about the program: if it’s not registered, it will count down the number of days since it’s last usage before it will let you use it. Also, while unregistered, you can only convert 1 file at a time. To convert, just simply open your file(s) by clicking Add File, then hit Next. AnyImage2.jpg shows what the settings are for dds format. Simply hit convert and Voila! It’s converted. Rinse and repeat for any additional texture(s).

End Lesson 2.

Fus


Attachments:
Lesson2.zip [76.25 KiB]
Downloaded 356 times

_________________
Proud Member of Team [RIP] http://www.ripteam.com
[img]http://img.photobucket.com/albums/v105/tcoil/11.jpg[/img]
Top 
 Profile  
 
 Post subject: Re: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Mon Jun 06, 2011 10:45 pm 
Offline
Member
Member
User avatar

Joined: Sun Jan 06, 2008 6:32 pm
Posts: 26
Introduction to Milkshape:

Programs Needed:
  • Milkshape 3D

Before we begin with the file, lets start with the most commonly used hotheys you might use. Ctrl and Ctrl-Shift are the main hot key activators used in Milkshape. Control-Shift always undoes what Control does. Another common optional screen you will use is the Right Mouse Click Popup screen. It has a few similar options that are in D3edit, but they are mostly Milkshape specific.
Two more common combinations are Shift-Left and -Right Click. Shift-Left allows you select multiple triangles, while Right click deselects them. You also can do a selection box with just the Left Click of the mouse and deselect with the Right Click mouse button in combination with the Shift Key.
Common Shortcuts:
  • Control-A Select All
  • Cntrl-Shift-A Select None
  • Cntrl-Z Undo
  • Cntrl-R Redo
  • Cntrl-H Hide Selection
  • Cntrl-Shift-H Unhide All

Selecting the perspective windows and the location of the control panel is a personal preference. It can be adjusted under the Window Menu. I recommend at least having it in Window/Viewport/4 Window and have Window/Show Viewport Caption selected. Having the caption active will allow you to change the perspective of any one of the windows, a feature not available in D3edit. Choosing which side you have the Control Panel is totally up to you. :D Milkshape3d2.jpg shows the Right Mouse Click option screen, and Milkshape3d1.jpg shows the window config screen.

End Lesson 3.

Fus


Attachments:
Lesson3.zip [32.59 KiB]
Downloaded 355 times

_________________
Proud Member of Team [RIP] http://www.ripteam.com
[img]http://img.photobucket.com/albums/v105/tcoil/11.jpg[/img]
Top 
 Profile  
 
 Post subject: Re: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Mon Jun 06, 2011 10:54 pm 
Offline
Member
Member
User avatar

Joined: Sun Jan 06, 2008 6:32 pm
Posts: 26
The Control Panel Tabs:

Programs Needed:
  • Milkshape 3D

In order to prep our ship to be FL ready, we must do some surgery to our model. But first let’s learn about the three main tabs we will be using. Most of what we need to do is done is in the Groups tab, but Model and Materials are equally important. In the Model Tab we will need the Select Button and sometimes Rotate. Rotate is mainly used when a import of a model comes in at odd angles and needs to be made right side up. Rotating is best done one axis at a time. For this tutorial we mainly want Select. Select’s Hot key is F1.

Materials is where we assign our textures. When we open our ship.ms3d, we will find that all the texture names are there, but they won’t know where we put them, since they are looking for the ogf file. Click the texture name, (<none> in Milkshape3d-Materials.jpg) direct it to the location of your .dds file, and click open. For the clearest look of the texture, click the Diffuse and Emissive buttons and select the white color box on the bottom right corner.

Groups is where the surgery of the model takes place. When you open ship.ms3d, you might see it as just one group, which is terrific if there is just one texture, but most Freelancer things use more than one texture, even in Vanilla. So what we need to do is break it up into logical segments, and assign the proper texture to those segments. Some segment examples would be Hull, Wings, Engines, and Tail. Each group and materials must have a unique name to it so that Freelancer doesn’t get confused on what texture goes to which ship.

End Lesson 4.

Fus


Attachments:
Lesson4.zip [83.4 KiB]
Downloaded 344 times

_________________
Proud Member of Team [RIP] http://www.ripteam.com
[img]http://img.photobucket.com/albums/v105/tcoil/11.jpg[/img]
Top 
 Profile  
 
 Post subject: Re: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Mon Jun 06, 2011 11:07 pm 
Offline
Member
Member
User avatar

Joined: Sun Jan 06, 2008 6:32 pm
Posts: 26
Regrouping the ship:

Programs Needed:
  • Milkshape 3D

OK it’s time to prep our model and assign the textures. For my example I will make a frame similar to a UV BB. The techniques used is exactly as what you will use on your ship.ms3d, but in a much simplified format.I will use 2 textures in my example.

Open ship.ms3d. If you haven’t already done so, assign your textures in Milkshape as shown in Milkshape3d-Materials.jpg and described in Lesson 4. Ship.ms3d prob has the D3 Texture names listed in the Materials Tab. To rename a Material, simply put a new name in the box that has the texture name and click Rename. Use _ (underscore)or -(hyphen/dash) to indicate spaces. My texture names are Tutorial_MatFrame and Tutorial_FaceMat. In Model tab, choose Select, making sure that Select options is Face and Ignore Backfaces is checked. Go to Groups Tab.
Left Click your mouse and make a either a selection box or Shift-Left Click your desired faces. This highlights the faces you want only. If you get some unwanted faces, keep Shift held down and Right Click the unwanted faces. You might have to right click the unwanted faces in one of the other 2 windows to make sure you get what you want. Once you get everything you want, (You are in Groups Tab, yes?) click Regroup.
Milkshape has now made these faces into a independent part of the model, to do whatever we want without affecting the rest of the model. For my example model’s group I will now call it Tutorial_Face1. To do so, I highlight Regroup01 in the editable box next to Rename, type my name, then hit Rename. The remainder of my model stays the same, and is still called Box02.
Now our new Group’s name is Tutorial_Face1, but is still needs its’ texture assigned. While it is still selected, switch to Materials Tab and click Assign. Repeat this process as many times as needed until your model is completely textured. If you want to change the order of the groups in the list, simply highlight the group name and click Up or Down until it’s in the order you want.

End Lesson 5.

Fus


Attachments:
Lesson5.zip [86.61 KiB]
Downloaded 350 times

_________________
Proud Member of Team [RIP] http://www.ripteam.com
[img]http://img.photobucket.com/albums/v105/tcoil/11.jpg[/img]


Last edited by Fusion on Tue Jun 07, 2011 11:05 pm, edited 1 time in total.
Top 
 Profile  
 
 Post subject: Re: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Mon Jun 06, 2011 11:22 pm 
Offline
Member
Member
User avatar

Joined: Sun Jan 06, 2008 6:32 pm
Posts: 26
Creating the Mat File the easy way.


Programs needed:
[*]Milkshape 3d
[*]Freelancer MAT exporter version 0.1
[*]UTF Editor 1.4 or 3.0 (get 3.0 here from Starport)


Creating the mat file in Milkshape is very straight forward. Before we open our x.ms3d file (where x = the name of your file), lets make sure you have the dll file in your Milkshape root folder. File name is msMATExporter01.dll. Got the file? Great!

Open your ms3d file, and make sure that all textures are assigned to your surfaces as described in Lesson Four. All done? Let's export. Go to File/Export/Freelancer MAT 0.1, as shown is Milkshape3d-Maxeport.jpg. Ms3d-Matcreate.jpg is what you should get. Chose Create New MAT File. Option will pop up for naming your mat file, (Obviously) name it the same name as your .cmp file. If all has gone well, you should get a screen as seen in Ms3d-MatResult1.jpg Click continue.

Open UTF Editor, and open your new mat file. I will use Cube.cmp's mat file for my example.

If your opened file doesn't look like UTF_Editor-Cube.jpg, click the [+] next to the little tree.

Every Mat file has 2 branches, or nodes as its called in its tree. The Material Library is the list of the textures used in your CMP file, and is the same name used in the texture assignment screen in Lesson #4.This is where it somehow remebers where in the model those textures were placed. Each texture has its own 3 nodes of its own. They are:

\
>material library
->Texture name
-->Dt_flags
-->Dt_name
-->Type

Not sure on the flags reference,but in our example there is a @ (Shift-2) in it. Dt_name refers to the name of the texture in the Texture Library. Type tells the mat file that the texture is either a .dds or a .tga file. The texture Library, where the actual file resides, has its own nodes. They are:

\
>texture library
->Texture Name.tga
-->MIPS

Even if your texture is a .dds file, Freelancer still requires the .tga reference every time. If your image was an actual.tga file, the -->MIPS would say MIP0(zero)

99% of the time, the mat exporter captures the textures. However, in one case, the exporter didn't capture the texture in the texture library, although it created the ness node references. In that instance, I had to manually insert the windshield .dds file. UTF_editor-NoMIPS.jpg shows an example of what it looks like when there is no texture in the texture library. To correct this, We select the MIPS node, hit Import, find the required file, and click Open. Your empty "beaker" (for lack of a better description) will now be a full blue color.

End Lesson 6

Fus


Attachments:
Lesson6.zip [145.83 KiB]
Downloaded 359 times

_________________
Proud Member of Team [RIP] http://www.ripteam.com
[img]http://img.photobucket.com/albums/v105/tcoil/11.jpg[/img]
Top 
 Profile  
 
 Post subject: Re: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Mon Jun 06, 2011 11:35 pm 
Offline
Member
Member
User avatar

Joined: Sun Jan 06, 2008 6:32 pm
Posts: 26
Creating the CMP File.


Programs needed:
[*]Milkshape 3d
[*]Freelancer CMP exporter version 0.2
[*]UTF Editor 3.0 or HardCMP


Lets begin with making sure you have the CMP exporter Version 0.2,(File Name msCMPExporterV2.dll) and that it's in your Milkshape 3d root folder.


Open our x.ms3d file. (Where x=the name of your file) If for some reason that the model isn't big enough for your needs, before we export, let's increase its size using the Scale command. Milkshape3d-Scale.jpg shows the different scale options. Here is a simple explanation of the three options. They are:

[*]Center of Mass
[*]Origin
[*]User Point

Center of Mass would be the same as the room center of a .orf in D3edit. Origin is simply 0,0,0 in the X,Y,and Z axis. User Point I have no understanding on it works. The cool thing that is you can control which axis you want to tweak. :D

Now that everything is to our desired size, let's export our CMP. As shown in Milkshape3d-CMPexport.jpg, Go File/Export/Freelancer CMP V0.2(zero point two). Doing so will get us Ms3d-CMPcreate.jpg. Click Create New CMP File, name your file, and this will get you Ms3dCMPexportdefault.jpg.

Users of the original exporter will prob remember getting a serious shock when you went into your build the first time and discovered that your x.cmp model "Shrunk in the Wash" in a matter of speaking, and got seriously small. This is because in the original exporter, since you have no control on it's sizing during export, it defaulted to the Scale=92.

However, in Ver 0.2 and 0.3 of the exporter (don't use 0.3 as there is a issue with it) you CAN control the orientation and scale sizing. The settings you want are "Orientation = Back to Front" and "Scale Down = 1". I use the slide bar instead of the box to select the scaling. "Number of Groups" should be set to 1, the default. If you are so inclined, you can save these settings (Just like I did when I did the Billboards in the UV), so that you have uniformity. This will save a x.ces file (where x= your file name.) Simply load the .ces file when your at this screen to recall your settings. Done? Hit Continue. Ms3d-CMPResult.jpg is your next screen, which you can hit Continue once more. You should now have your desired cmp file.

Open HardCMP (if you can't use the UTFeditor 3.0 from the Starport).You should be able to see the new CMP at it's full ingame size.



End Lesson 7

Fus


Attachments:
Lesson7.zip [81.29 KiB]
Downloaded 332 times

_________________
Proud Member of Team [RIP] http://www.ripteam.com
[img]http://img.photobucket.com/albums/v105/tcoil/11.jpg[/img]
Top 
 Profile  
 
 Post subject: Re: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Mon Jun 06, 2011 11:44 pm 
Offline
Member
Member
User avatar

Joined: Sun Jan 06, 2008 6:32 pm
Posts: 26
Reviewing Regrouping.


Programs needed:
[*]Milkshape 3d

Returning to the subject of Regrouping in Lesson 5, we will now review that lesson and expand more on this concept.

Because many, (if not all) Freelancer objects use multiple textures on their surfaces, yet our models in their source format are setup for one texture, we must break our model into the needed pieces to accomadate those multiple textures. Regrouping is the method to accomplish this. Regrouping the model does not destroy or ruin the model once in it's CMP format, rather, it just controls which faces get what texture.


Before we begin with the Tutorial itself, lets review the Modifier and Mouse commands commonly used for this function. These controls are:

[*]Left Mouse Click
[*]Right Mouse Click
[*]Mouse Wheel
[*]Shift
[*]Control

We will begin with the mouse commands.Left Mouse Click Selects faces, either by clicking on them or a Click/Drag box option. Right Mouse Click works the same way, only it DEselects the faces. In the 3D window, Left Click rotates the screen in the R Axis Left to Right or Right to Left.
Mouse Wheel is a Zoom command, but when used alone, works best in the grey grid windows, and not the 3D window.(Default is bottom right corner.)
Shift, when combined with the Left Click, zooms at a faster pace than the Scroll wheel alone. To zoom closer, Shift-Click and move the mouse cursor to the top of the screen. Shift-Click and moving the mouse cursor to the bottom of the screen will zoom out.
Shift also keeps your desired faces selected, both when you are trying add faces to select or remove unwanted selected faces.
Control, when combined with the Left Click, moves all the screens in the Up/Down and Left/Right directions at a faster pace.

Now that we have covered that, let begin.

Although RegroupChallenge.jpg is a over simplified example of this issue, the techniques used remains the same. The goal is to get all the faces in Regroup1 (highlighted in red) with out adding faces from Group0. SelectionBox.jpg shows the size of my selection box, and though it will get more faces than desired, (UnwantedFaces.jpg), We can fix that by using the Shift-Right Click Combination to get rid of them. DeselectedFaces.jpg shows my selection box's size to get rid of the faces. To get the final unselected faces in Regroup1 in our example, keep holding Shift and Left Click each face or make a selection box to add them. After you have your desired faces, Just hit the Regroup button under the Groups tab and name the group.

End Lesson 8

Fus


Attachments:
Lesson8.zip [72.03 KiB]
Downloaded 364 times

_________________
Proud Member of Team [RIP] http://www.ripteam.com
[img]http://img.photobucket.com/albums/v105/tcoil/11.jpg[/img]
Top 
 Profile  
 
 Post subject: Re: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Tue Jun 07, 2011 1:23 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Sun Jan 06, 2008 4:53 pm
Posts: 1041
Awesome work Fusion, thanks for posting! :)

_________________
http://FreelancerCommunity.net
http://UnderVerse.us


Top 
 Profile  
 
 Post subject: Re: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Tue Jun 07, 2011 5:16 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Sun Jan 06, 2008 3:44 pm
Posts: 727
Nice Fus ..Thx For Sharing

_________________
Image
Hey You! Check out The UnderVerse by Team RIP
The RIP Team Forums


Top 
 Profile E-mail  
 
 Post subject: Re: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Tue Jun 07, 2011 11:22 pm 
Offline
Member
Member
User avatar

Joined: Sun Jan 06, 2008 6:32 pm
Posts: 26
Welcome guys. Always glad to share my limited knowledge of Freelancer modding. Sometimes all we need is someone to show us the basics in a easy to understand format.

Fus

_________________
Proud Member of Team [RIP] http://www.ripteam.com
[img]http://img.photobucket.com/albums/v105/tcoil/11.jpg[/img]


Top 
 Profile  
 
 Post subject: Re: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Sun Jun 12, 2011 6:53 pm 
Offline
Member
Member
User avatar

Joined: Sun Jan 06, 2008 6:32 pm
Posts: 26
Reverting to .orf files


Programs needed:
[*]Milkshape 3D
[*]Milkshape CMP Importer 2.7
[*]Ms3d to orf DOS converter

Because of the limitations of D3edit in the matter of textures, I have never tried to convert .dds files to ogf format so that the model in question could be viewed textured in the D3 editor.

Starting with the model in its cmp format, We will require the CMP Importer version 2.7. The filename of the importer is msCMPImporter27.dll, which, just like the other .dll files of the exporters, should be located in the Milkshape root folder. Found it? Cool, let's begin.

After opening Milkshape, go to File/Import/Freelancer CMP Importer V2.7, as shown in CMPImporter.jpg. CMPImport-main.jpg is our main window, where we can load the cmp and the associated mat files. Select Model, and direct it to the desired cmp. CMPImport-options.jpg shows the different variables for importing a CMP. Since we are not gonna be needing the HP's, We will keep the "Import Hardpoints" unchecked for now. Find your desired model, and hit open. Now Click Material, and direct it to the corresponding .mat file. Once done, hit Import.

If all has gone well, you should now see your cmp object in it's textured and un-HPed format. Save, calling it x.ms3d (Where x = the name of your file.) Close Milkshape.

Now the easy part. Open up Notepad, and type (or Copy/Paste) this text:

Code:
ORFTOOL -SM:filename.ms3d -DO:filename.orf
pause


Replace "filename" with the name of your ms3d file and the name of your soon-to-be converted .orf file. Save, ending it with a .bat (Batch file) extention. For example, my file name is ms3dconvert.bat As show in in ms3d-ORFTOOL.jpg, place your x.ms3d file in your ORFTOOL root folder, and double click the .bat file. This triggers the program and spits out the new .orf file and a .gam file. ORFTOOL_cmd-exe.jpg shows the active program in the Command Prompt screen.

Now what did we just do, you say? This conversion program was originally designed to be used in DOS. But because modern Windows don't have DOS anymore, only a command Prompt thingy, We made a file to trigger the program without having to fight with the Command Prompt. Aren't I sneaky... :twisted: <evil laugh>

If you open your new x.orf file, you will find that the model is there, but untextured. One word of caution. Just like Milkshape, D3edit has a cap of the max number of faces it can handle, a quantity I don't know what is.

End Lesson 9

Fus


Attachments:
Lesson9.zip [161.71 KiB]
Downloaded 346 times
ORFTOOL.zip [63.2 KiB]
Downloaded 339 times

_________________
Proud Member of Team [RIP] http://www.ripteam.com
[img]http://img.photobucket.com/albums/v105/tcoil/11.jpg[/img]
Top 
 Profile  
 
 Post subject: Re: Descent 3 to Freelancer Conversion Tutorial
 Post Posted: Sun Jun 12, 2011 8:19 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Sun Jan 06, 2008 4:53 pm
Posts: 1041
Thanks Fusion. :)

The d3edit limitation is 3,000 faces per room.

_________________
http://FreelancerCommunity.net
http://UnderVerse.us


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 14 posts ] 

The Freelancer Community Site by Team [RIP] » Board index » The FLC Public Forums » Freelancer Tutorials


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron