Applying X3 DDS textures to your meshes

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

User avatar
DeadlyDa
Posts: 1882
Joined: Mon, 5. Jan 04, 04:46
x4

Applying X3 DDS textures to your meshes

Post by DeadlyDa » Sat, 28. Jan 06, 22:39

I've been asked several times how to apply X3 textures to custom ships...and I know I've written this at least three times and sent it to people, but I just can't seem to find it.

Since I've just been asked again, I'll do what I should have done at first, and post it here in the forum.

Before I continue...let me make it very clear...caveat emptor! There may be easier ways of doing this, and subsequent versions of DBOX (or the release of the X3 Modder Kit) may eliminate the need for the following steps. What I describe below works for me...every time. If you find an easier way, please post it so everyone can benefit.

OK...the first thing I had to do was create a "template" of the textures I wanted to use. By template, I mean an existing MAT6 multi-texture I could apply to my own meshes. The way I went about this was to select a ship already in X3 which had a set of textures I wanted to use. Most of my ships use the base texture set that is associated with the Argon M2, since it looks pretty good and has a fairly large number ( 48 ) of DDS textures to choose from.

So...you have picked a ship which uses the texture set you would like to apply to your own mesh(s). Now you must:
  • 1. Use Doubleshadow's X2BC to de-compile the BOB file for your selected ship into a BOD file, and then import it into 3dMax using the DBOX tool.
    3. You then save the multi-texture associated with the BOD file you just imported to the 3dMax texture library so it can be used later on your won meshes.
    4. Once the X3 multi-texture is saved, you must open the original X3 BOD file you used to get the multi-texture in a text editor. In the text editor, select the MAT6 entries at the begriming of the file then save them as a text file (it should only contain the MAT6 entries). (The Argon M2 multi-texture that I often use has 48 MAT6 entries.) The resulting text file is what I call the "template", and it should be an exact match of the multi-texture you saved earlier.
    4. Then, when in 3dMax, you can load the X3 multi-texture you saved, and apply it to whatever mesh you wish.
    5. Once the mesh textured to your satisfaction, export it using DBOX (always remember to keep Data Handling and Comparability set to X3). If you were to look at the MAT6 entries in the BOD file you just exported using a text editor, and compare them to the MAT6 entries in the X3 BOD file for the ship you selected, you would see that they are "broken".
    6. So, the final step is to correct the MAT6 entries in your exported mesh by opening the BOD file in a text editor, as well as opening the "template" you had previously saved, and then using the copy & paste functions to replace the "bad" MAT6 entries in your exported BOD file with the "good" MAT6 entries from your template.
You now have your mesh in BOD format, with X3 textures applied.

Use X2BC to compile it back into a BOB file...and you're good to go :D

It is quite easy to add X3 DDS texture entries to extend your template(s) using the same principals described above.

User avatar
-XTM-
Posts: 1277
Joined: Sat, 12. Nov 05, 19:46
x3

Post by -XTM- » Sun, 29. Jan 06, 00:38

Good stuff,

I'd like to add some, partially a slightly quicker (yet somewhat dirtier) way and also to fill out a few gaps.

-Afaik every races M6 holds that races big DDS catalogue, so no need to load up a M1/M2 (saves some time).

-When you've got your M6 loaded open up the Material Browser, select scene and undo the root only option.

-You can now expand all the textures in the catalogue with the 4 topside icons in the MB.

-Select your untextured/not so nicely textured/totally wrongly textured mesh and select Modify/Polygon, browse downwards until you hit the Polygon properties. (or you could do element but I wouldn't recommend that)

-Use Select by ID and click on the surface of the M6 on a texture of your liking (you'll notice the ID-field now switches to the corresponding texture ID) if you want to know what texture goes with what ID.

-Now select back your other mesh, click the stuff you want to texture and apply the corresponding texture out of the MB.

-You can keep the MB open when you do so and you can also select click new poly's/elements on the fly, easy beezy.

Note : NEVER collapse a stack with different textures in certain elements unless you are absolutely sure they all use the same ID's.
Use the attach function instead, cause that's reversable and collapse-stack is not.
The Xtended Mod

Need Help?

Ask Questions / View the FAQ's at TheXUniverse Forums
Read the News on Mod Developments at our Website

User avatar
nuclear_eclipse
Posts: 1129
Joined: Thu, 2. Sep 04, 01:54
x3tc

Post by nuclear_eclipse » Sun, 29. Jan 06, 18:26

Now Released: 'The Nuke Pak' X3 Material Library
http://x.leetcode.net/?page=mods&mode=d ... ax.nukepak

This file contains a 3Ds Max 7 material library with 7 basic X3 multitexture objects, as well as the proper MAT6 declarations for each multitex to be used when exporting ships.

------

The Nuke Pak includes default Argon, Boron, Paranid, Split, Teladi, and Terran textures from respective races' M2s, as well as a custom texture that contains a set of hand-picked reusable textures from all the races.

Install the Nuke Pak by extracting all files into the 3Dsmax7\matlib folder, then open the matlib file from the 3ds material editor. Then use a single multitex for each body part you export, and copy the MAT6 declarations from the respective files overtop the exported MAT6 part in the resulting .bod files. Then have fun in X3!

** NOTE ** This material library is free for redistribution and use in anyof your own projects without request, as long as proper credit is given.

-------

This should make it easier for modellers out there, as everything is put in one place with easy access, as well as having all the races' textures useable in a single material. You shouldnt' need to customize your own materials anymore ;)

Cheers to all, I hope this helps you all out, and good luck!

User avatar
nuclear_eclipse
Posts: 1129
Joined: Thu, 2. Sep 04, 01:54
x3tc

Post by nuclear_eclipse » Sun, 29. Jan 06, 19:43

OK, this was an afterthought to the Nuke Pak release, but here's a tileset reference for my customized multitex material. If you want a higher-resolution version, you can grab it from the Nuke Pak page

Tiny version found below:

[ external image ]

User avatar
DeadlyDa
Posts: 1882
Joined: Mon, 5. Jan 04, 04:46
x4

Post by DeadlyDa » Sun, 29. Jan 06, 20:46

Nuke, Moxy, et al...

This is probably obvious, but you need to be aware that using the approach I outlined above does not let you directly alter the various properties of the X3 Material. It is just like using MAT3 textures in X2...what is in the game, is what you get.

I've tried hacking the MAT6 entries in a text editor with very mixed results. I'm not saying it can't be done...but it's not high on my priority list ATM :roll:

User avatar
nuclear_eclipse
Posts: 1129
Joined: Thu, 2. Sep 04, 01:54
x3tc

Post by nuclear_eclipse » Sun, 29. Jan 06, 20:57

DeadlyDa wrote:Nuke, Moxy, et al...

This is probably obvious, but you need to be aware that using the approach I outlined above does not let you directly alter the various properties of the X3 Material. It is just like using MAT3 textures in X2...what is in the game, is what you get.

I've tried hacking the MAT6 entries in a text editor with very mixed results. I'm not saying it can't be done...but it's not high on my priority list ATM :roll:
I figured as much. All of my Nuke Pak stuff runs on a default MAT6 entries taken directly from the Egosoft models. I don't even WANT to take the time to try and decipher texture crap like that... :lol:

doubleshadow
Posts: 671
Joined: Fri, 12. Mar 04, 08:14
x3

Post by doubleshadow » Mon, 30. Jan 06, 08:32

Untill Egosoft will release source codes of their DX effect files (or until someone will find effects disassembler), any attempts to "decipher" anything are waste of time imho (but of course I can be wrong with that).

@DeadlyDa - have you tried the DBOX 1.5? It should produce "valid" MAT6 entries (although with very limited number of properties).

darkshape
Posts: 130
Joined: Sun, 10. Oct 04, 16:57
x3tc

Post by darkshape » Mon, 30. Jan 06, 12:53

I use DBOX2 1.4 - without any problems - new ships appear with the
textures of the game - no problem after exporting with DBOX2,
no problems with textures from the game and no problems with own ones...?

at the moment i only have one problem - in the dds folder there is a normal map, called "low-bump", but only the bump map is used in the mat6 entry. doesn't x3 use the low-bump (normal) map ?

what i'm working about in the moment:
[ external image ]
don't be shocked... i forgot the alpha-channel...
its not finished ;-)

greetz,
henning

Galaxy613
Posts: 3285
Joined: Tue, 28. Dec 04, 02:19
x4

Post by Galaxy613 » Mon, 30. Jan 06, 16:19

You guys are Gods among men! :o Thanks a whole bunch DeadlyDa and DoubleShadow! If this isn't yet, this should be put in the sticky! This will help many a n00b (and not-so n00bs!)
10,000 Lightyears of awesomeness

User avatar
nuclear_eclipse
Posts: 1129
Joined: Thu, 2. Sep 04, 01:54
x3tc

Post by nuclear_eclipse » Mon, 30. Jan 06, 16:29

Am I the only one that gets 'desaturated' textures on all my exported ships? I've tried with the MAT6 entries given by DBOX, and I've tried with the method listed by Deadly, and no matter what, I only get 'silver' textures on my ships, even when the textures are Egosoft's DDS textures, just the same as the ones used by Deadly....

Anybody have any clues as to what I'm doing wrong? It may stem from the fact that I barely have any clue of what I'm doing in 3dsmax, so if you can think of even themost mudane thing, I've probably overlooked it.

Thanks for any help you have...

User avatar
nuclear_eclipse
Posts: 1129
Joined: Thu, 2. Sep 04, 01:54
x3tc

Post by nuclear_eclipse » Tue, 31. Jan 06, 05:08

OK, after trying everything I could think of (not much), I'm still having problems with textures showing up ingame without any color (desaturated).

Here's some screenshots to help you better understand my problem...

X2 Osprey in 3dsmax...
http://x.leetcode.net/x3/shipissues/osprey2.jpg

X2 Osprey in game...
http://x.leetcode.net/x3/shipissues/osprey1.jpg

X2 Dragon in 3dsmax...
http://x.leetcode.net/x3/shipissues/dragon2.jpg

X2 Dragon in game...
http://x.leetcode.net/x3/shipissues/dragon1.jpg

I can't get my head around this. Can anyone offer me any suggestions?

User avatar
nuclear_eclipse
Posts: 1129
Joined: Thu, 2. Sep 04, 01:54
x3tc

Post by nuclear_eclipse » Tue, 31. Jan 06, 05:29

Also of note is this:

If I use the MAT6 declarations exported from DBOX, ship turns transparent whenever there is a star or other lightsource behind the ship. If I use Deadly's method of copy/paste for the MAT6 declarations, I don't get this effect, but either way, I still has totally colorless textures.... :?

User avatar
nuclear_eclipse
Posts: 1129
Joined: Thu, 2. Sep 04, 01:54
x3tc

Post by nuclear_eclipse » Wed, 1. Feb 06, 02:27

After eight hours of effort and testing, with help from Galaxy613, IVE FOUND THE PROBLEM!

Apparently, if you set the owner race of a ship to Race 1, a mod-based ship will never display in color! This does not occur for the egosoft ships included with X3 (assuming you reference them exactly the same) but if you supply your own bod/bob files, they must not be of Race 1 (and possibly all the custom races).

Needless to say, I'm extremely maddened by how much time I've wasted on this simple problem, but I'm also happy to finally have it all figured out...

Galaxy613
Posts: 3285
Joined: Tue, 28. Dec 04, 02:19
x4

Post by Galaxy613 » Wed, 1. Feb 06, 03:54

Heh, who would've thunk it... it's most likely because there isn't any Hue settings for Race 1. So thus it drains all color from Race 1 ships. Look at the Globals file in the Types folder for the Race's Hue settings and such.

Great to know you fixed it nuke! I hope I was helpful. :D
10,000 Lightyears of awesomeness

User avatar
MrWideEar
Posts: 103
Joined: Mon, 26. Dec 05, 14:21
x3

Post by MrWideEar » Mon, 27. Feb 06, 03:08

hi!

i've got a little question about those bump maps.

in gmax or 3dsm they are listed in the material editor, and i can see the diffuse texure in 3dsm...

but after i export the model and run it with x3 the bump maps are not used, just the diffuse- specular- and light-maps ...

you can imagine, it looks really strange without those bump-maps

i'm still learning on how to use 3dsm and i just dunno what i need to do to change this.

i'll be really thankfull for any suggestion or link to some hidden sticky or post i just diddnt discover.

sorry if it is explained in this thread, i read it several times and did not understood everything of it.

User avatar
nuclear_eclipse
Posts: 1129
Joined: Thu, 2. Sep 04, 01:54
x3tc

Post by nuclear_eclipse » Mon, 27. Feb 06, 05:45

You need to open the exported .bod files and manually write over the MAT6 entries from the exported file with the MAT6 entries from the included NukePak bod files. Otherwise, DBOX can't do all proper exporting of MAT6 entires, so things look really ****ed up in game.

Hope that helps.

User avatar
tensin
Posts: 970
Joined: Thu, 29. Apr 04, 20:25
x3

Post by tensin » Sun, 28. Jan 07, 16:06

What about getting DDS textures from outside of X3 into the game. I ceratnly understand how to put them in the MOD, but I don't understand how to set up a MAT6 line to correctly use a custom texture.

Also, does it need to be DDS? I've got a mesh with a JPG or BMP texture that, when I go into 3DS and point at the DDS versions of the same texture, messes with the texture map?

I suppose if I get the rest sorted out, I can do a simple substitution in the BOD and may get the texture correct.

User avatar
DeadlyDa
Posts: 1882
Joined: Mon, 5. Jan 04, 04:46
x4

Post by DeadlyDa » Mon, 29. Jan 07, 21:22

With doubleshadow's updated DBOX, this thread is pretty much obsolete.

The latest DBOX will retain the X3 material properties automatically...no need to copy & past the MAT6 entries into your exported bod files.

As for bringing in new textures, what I have done is to copy an existing X3 material entry to a new multi-texture, and then change the maps (diffuse, specular, bump, etc) to point to your new DDS textures. I've only done this with DDS textures...so I can't help you on the subject of BMP & JPG.

superbun
Posts: 146
Joined: Sat, 1. Dec 07, 10:09
x3tc

Post by superbun » Thu, 31. Jul 08, 17:39

dose this work in g-max? when I import ships, I get a plain ship, with lots of texture entries that dont actualy show up on the ship.

dose anyone have jpeg versions of the x3 dds textures or a program that converts jpeg to dds
Last transmission of split military python AE-316:
"Split say...ARRRGG!"
-------------------------------------------------------
X3:TC Soundtracks Tutoral

Kitty
Posts: 304
Joined: Mon, 5. Sep 05, 19:59
x3tc

Post by Kitty » Sun, 10. Aug 08, 17:46

Use MAT6 editor. This tool has an option to save images in other formats.
I don't remember where to download it, but a search on the forum should do it.

Post Reply

Return to “X³: Reunion - Scripts and Modding”