Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

.tga to .mat

Here you can discuss building custom ships, texturing and 3D modeling in Freelancer

Post Fri Jul 22, 2005 1:02 pm

.tga to .mat

While working on my Sleeper Ship mod, I was wondering what significance the attached .tga file had. I had opened it, of course, and it looked like it would work with what I wanted the Sleeper to look like, but I dont know how to wrap it around my model.

Heres the question: How do you convert a .tga file to a .mat file?
What programs do I need?

Post Fri Jul 22, 2005 3:24 pm

mat files are just wrappers for material/texture entries - you should really familiarize yourself with HCl's UTF editor, if for nothing else to just get familiar with fl formats and their file structures- it's a powerful utility for manipulating nearly every freelancer file format and it can import the .tga you want to a mat. the .tga simply imports to a texture library/texture.tga/MIP#(number of MIP) node.check it out and read more tutes - as for wrapping,if you're using the Hispania you shouldn't need to because it already has a texture mapped to it.if you are editing the model mesh through milkshape however you will need to remap any new polygons.one last thing,you should use DDS format wherever possible to save video memory, you can get the DDS exporter plugin for photoshop/paintshop at nvidia's site(google it)

Post Fri Jul 22, 2005 4:52 pm

SO the UTF editor that comes with Shipscripter could do what I want to do?

And do I need Milkshape to skin it? Ive already got the .cmp, and I dont want to bother my friend for the same thing.

Edited by - versoth on 7/22/2005 6:06:55 PM

Post Fri Jul 22, 2005 7:03 pm

well the professional way to do it is export from milkshape to a format uvunwrapper can handle(obj seems to be the standard)and skin it in that- then reimport it to milkshape as an obj.the other way is the use of selection editor & texture coord editor in ms3d. method #1 will get you a better map but you will have to learn how to skin(see Argh's tutorial How to Skin- excellent screenies) but method #2 can be more accurate for flat surfaces or so i hear...i suck at texturing to be honest

but if you already have a cmp and its not invisible in hardcmp i assume you just want to reskin it so...
the UTF editor will do that easily(note that there's only one UTF editor)-just import your .tga(use DDS!higher resolutions with lower or same filesize) to MIP0,if you use DDS rename MIP0 -> MIPS. cheers

Post Fri Jul 22, 2005 7:09 pm

So.... Use the UTF editor, open my .tga, then "Import" it to .mipo?

Post Fri Jul 22, 2005 7:20 pm

MIP0 = M I P #0 - not mipo

Post Fri Jul 22, 2005 7:25 pm

It wont open the cursed file. When I hope it does(nothing happens) some assertion error occurs. Whats with that?

Post Fri Jul 22, 2005 7:47 pm

how should i know?i didn't program it and i've never seen that error - the only thing i can think of is you're selecting the wrong node or your file is fubar

Post Sat Jul 23, 2005 8:28 am

Wrong node? Only nodes I know are in networking.

Post Sat Jul 23, 2005 3:37 pm

Your mat file should have 2 Nodes off of the main tree. The two nodes should be called Texture Library and Material Library. Material Library (Mat Lib) is the only node you should be concerned with if you are trying to import a texture into a node. Expand the Mat Lib and you should see the names of all of your textures, with file extentions (texture01.tga). Find the texture node that you want to put the texture on. Click on it, and if there isnt one already, press add node, name the new node MIP0 (Zero). Your mat should look like this now

-/ (Tree)
+Texture Library
-Material Library
-Texture01.tga
MIP0

click on MIP0 (make sure it is selected, you will get an error if it is not) and press the Import button. Browse through your files (if you have shortcuts to folders, do not use them as UTF will interpret that as you trying to import the shortcut file) and find the texture you want to Import and select it. Save the .mat file and then test it out.

Post Sat Jul 23, 2005 5:32 pm

So I dont make a new tree? Does it matter which .mat file i use to start with?

Post Sun Jul 24, 2005 4:21 am

I think you should use the .MAT exporter for Milkshape Here...
MAT Exporter
Milkshape

Just download the exporter and Milkshape (if you dont have it). Then drop the .dll from the MAT exporter zip into the Milkshape root folder. Then launch Milkshape, go to File, Export, and look for Freelancer MAT. It may ask you to find a texture, it will launch a browse box, just navigate to the file and select it.

Btw Cold_void, be helpful with your posts or don't post in this type of thread. Your post was quite pointless. Was

Edited by - parabolix on 7/24/2005 5:22:05 AM

Post Sun Jul 24, 2005 11:41 am

true,i was just exasperated at what seemed to be a willful ignorance or lack of motivation to learn on one's own.perhaps it WAS pointless,but i believed that after 4 or so replies it was appropriate

Post Sun Jul 24, 2005 11:42 am

Thanks. Very helpful.

Post Sun Jul 24, 2005 12:09 pm

your gratitude to everyone for their help is palpable.You're Welcome.

Return to Freelancer 3D Modeling and Texturing Forum