3d models skins
Moderator: JeremyaFr
3d models skins
- JeremyaFr
- Posts: 3603
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
UPDATE
Hello,
I've updated the 32bpp hook.
There is a new feature: Skins.
With skins, you can customize the appearence of the 3d models.
Suppose that the craft is "FlightModels\[Model].opt".
To create a skin named "[Skin1]", create a folder named "FlightModels\Skins\[Model]\[Skin1]\".
To replace a texture, place it in the skins folder with the same name and dimensions of the original texture.
The supported image formats are bmp, png, jpg. Use the png format to get transparency.
See "Skins\XWing\Default\Tex00033.png" for an example for the vanilla X-Wing.
Suppose that the mission is "[MissionDir]\[Mission].tie".
To define a skin for a craft, create a file named "[MissionDir]\[Mission]_Skins.txt" or create a section named "[Skins]" in "[MissionDir]\[Mission].ini".
The format is
CraftOptName = SkinNameA, SkinNameB
CraftOptName_fg_# = SkinName1, SkinName2, SkinName3
# in CraftOptName_fg_# is an integer for the opt color marking index, starting at 0.
The default SkinName is "Default".
See "Skins.txt"
Hello,
I've updated the 32bpp hook.
There is a new feature: Skins.
With skins, you can customize the appearence of the 3d models.
Suppose that the craft is "FlightModels\[Model].opt".
To create a skin named "[Skin1]", create a folder named "FlightModels\Skins\[Model]\[Skin1]\".
To replace a texture, place it in the skins folder with the same name and dimensions of the original texture.
The supported image formats are bmp, png, jpg. Use the png format to get transparency.
See "Skins\XWing\Default\Tex00033.png" for an example for the vanilla X-Wing.
Suppose that the mission is "[MissionDir]\[Mission].tie".
To define a skin for a craft, create a file named "[MissionDir]\[Mission]_Skins.txt" or create a section named "[Skins]" in "[MissionDir]\[Mission].ini".
The format is
CraftOptName = SkinNameA, SkinNameB
CraftOptName_fg_# = SkinName1, SkinName2, SkinName3
# in CraftOptName_fg_# is an integer for the opt color marking index, starting at 0.
The default SkinName is "Default".
See "Skins.txt"
- Vince T
- Posts: 13916
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
This is a historic day! This new function revolutionizes the way we can create FG colors!
So far we were limited to the FG colors that the authors had baked into the OPTs. Not only did this limit creativity it also bloated up the filesize of the individual OPTs (*cough* VSD, ISD2 *cough*)
Now if you want a ship that is worn AND has certain markings you can just add both of these skins (if available) ontop and you're done
Great work Jeremy!
So far we were limited to the FG colors that the authors had baked into the OPTs. Not only did this limit creativity it also bloated up the filesize of the individual OPTs (*cough* VSD, ISD2 *cough*)
Now if you want a ship that is worn AND has certain markings you can just add both of these skins (if available) ontop and you're done

Great work Jeremy!
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
- JeremyaFr
- Posts: 3603
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Thanks
and thank you Forceflow for having the idea.
and thank you Forceflow for having the idea.
Murphy was an optimist! I am a pessimist!
And always remember that a smile is cheaper than a bullet! (District 9)
Webmaster of the X-Wing Alliance Upgrade Project
And always remember that a smile is cheaper than a bullet! (District 9)
Webmaster of the X-Wing Alliance Upgrade Project
- Vince T
- Posts: 13916
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
Here's a little peak of what this could mean...
A VSD with the New Republic AND the Damaged skin: Or something completely different....
A VSD with the New Republic AND the Damaged skin: Or something completely different....
You do not have the required permissions to view the files attached to this post.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
- Trevor
- Posts: 515
- Joined: Thu Dec 04, 2014 7:11 pm
Oh wow, so does this mean that some of the FGs baked into eg the x-wing might be removed and replaced with skins leaving FGs to be just FG's (Primary colour groups - red blue etc rather than red 1, red 2, red 5 etc)?
Trev
Trev
- Vince T
- Posts: 13916
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
It sure is worth considering. It's the various HD FG colors which bloat up the OPTs in filesize. But we sure won't force-convert everything to skins all of a sudden, just because we can.
I think a good rule of thumb would be: If it had FG colors in vanilla, use default colors and add the rest as skins, if it had no FG colors in vanilla, go for skins right away.
I for my part am definitely going to implement this for the VSDs and ISDs, since those ships are extremely bloated up by those flightgroup colors. The bare VSD is around 17MB rather than the whapping 70MB it currently is.
I think a good rule of thumb would be: If it had FG colors in vanilla, use default colors and add the rest as skins, if it had no FG colors in vanilla, go for skins right away.
I for my part am definitely going to implement this for the VSDs and ISDs, since those ships are extremely bloated up by those flightgroup colors. The bare VSD is around 17MB rather than the whapping 70MB it currently is.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
- Trevor
- Posts: 515
- Joined: Thu Dec 04, 2014 7:11 pm
@blue_max @JeremyaFr Will these skins support the materials?
Speaking of materials and rusty VSD's, do you have plans for a future specular map (mapping whats shiny and not by grey values?)
Trev
Speaking of materials and rusty VSD's, do you have plans for a future specular map (mapping whats shiny and not by grey values?)
Trev
-
- Posts: 1129
- Joined: Mon Apr 05, 2004 11:01 pm
Brilliant. Thank you Jeremy and Forceflow! Another great X-mas weekend gift. 

W-I-P: ISD-II, (Imp) Escort Carrier, NL-1 Platform, Misc, & TFTC.
- blue_max
- Posts: 2264
- Joined: Wed Mar 20, 2019 5:12 am
I haven't really tested this yet, but the material system should work the same since it's based on the name of the texture being loaded. So, as long as the name is also replaced, the materials should keep working.
I have plans to add support for specular and normal maps in the future, but it's going to take a little longer

- JeremyaFr
- Posts: 3603
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
@blue_max
With the skins feature, "_fg_#" is added to the name of the texture, where # is the color index starting at 0.
With the skins feature, "_fg_#" is added to the name of the texture, where # is the color index starting at 0.
- ArrowLoop
- Posts: 15
- Joined: Thu Jun 04, 2020 7:46 pm
- Contact:
What would be the quickest and easiest way export an OPT's bundled textures to bmp, png, jpg in order to edit them and make your own skins for this hook?
- Forceflow
- Posts: 7033
- Joined: Wed Oct 20, 1999 11:01 pm
- Contact:
You can use XwaOptExplorer (bundled in the XwaToolsDownloader which can be found in the downloads section under Additional Files) XwaOptExplorer can export the opt into .obj .3dm and .an8 files. When doing so it will also export the respective textures of the model. That should be a good basis to make your own skins.
Murphy was an optimist! I am a pessimist!
And always remember that a smile is cheaper than a bullet! (District 9)
Webmaster of the X-Wing Alliance Upgrade Project
And always remember that a smile is cheaper than a bullet! (District 9)
Webmaster of the X-Wing Alliance Upgrade Project
- Trevor
- Posts: 515
- Joined: Thu Dec 04, 2014 7:11 pm
Just a thought - Would there be any performance gain from going further and using "default" (64x64?) textures within the opt and then using the skin feature entirely for all FGs/Unique craft?
Would this allow (if XWA doesn't already) different texture sizes to be used for lesser machines?
eg, base folder is your highest res textures, then for n levels you scale down.
if a user chokes on hi-res, then can rename a folder (or babu can) to select a lower res folder
Trev
- Forceflow
- Posts: 7033
- Joined: Wed Oct 20, 1999 11:01 pm
- Contact:
That's something that @JeremyaFr has to answer, but as far as I understand it the replacing texture must have the same size as the existing texture as it would otherwise mess up the UV mapping.Trevor wrote: ↑Wed Dec 30, 2020 11:58 amJust a thought - Would there be any performance gain from going further and using "default" (64x64?) textures within the opt and then using the skin feature entirely for all FGs/Unique craft?
Would this allow (if XWA doesn't already) different texture sizes to be used for lesser machines?
eg, base folder is your highest res textures, then for n levels you scale down.
if a user chokes on hi-res, then can rename a folder (or babu can) to select a lower res folder
Trev
Murphy was an optimist! I am a pessimist!
And always remember that a smile is cheaper than a bullet! (District 9)
Webmaster of the X-Wing Alliance Upgrade Project
And always remember that a smile is cheaper than a bullet! (District 9)
Webmaster of the X-Wing Alliance Upgrade Project
- JeremyaFr
- Posts: 3603
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,Trevor wrote: ↑Wed Dec 30, 2020 11:58 amJust a thought - Would there be any performance gain from going further and using "default" (64x64?) textures within the opt and then using the skin feature entirely for all FGs/Unique craft?
Would this allow (if XWA doesn't already) different texture sizes to be used for lesser machines?
I don't think that reducing textures size will have a significant performance improvement. It has impact on the total memory consumption.
- Vince T
- Posts: 13916
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
I've actually tested it at some point, if the replacement texture is larger than the original, you'll only see a part of it which maches the original's size.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
-
- Posts: 75
- Joined: Sun Jul 16, 2006 11:01 pm
This is an amazing new feature. Can't wait to play with it!
-
- Posts: 1129
- Joined: Mon Apr 05, 2004 11:01 pm
Does this new hook apply to textures for LOD meshes too ?
W-I-P: ISD-II, (Imp) Escort Carrier, NL-1 Platform, Misc, & TFTC.
- Vince T
- Posts: 13916
- Joined: Fri Apr 27, 2001 11:01 pm
- Contact:
Likely, in the OPT format LOD Textures are treated as any other texture.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear
Vince T's X-Wing HQ - where the bad guys get their gear
-
- Posts: 11
- Joined: Sat Jul 11, 2020 9:10 pm
So I think I must be doing something wrong. I'm not seeing any changes when I try what JeremyaFr outlined in the first post. It's been over a decade since I've done anything with editing skins in XWA and I need to take some time and look through the forum and tutorials on OPTing. But as an example I'm trying out a skin for the YT-1300. (I'd love to see some FG colors for the YT series ships =] )
So the craft is "FlightModels\CORELLIANTRANSPORT2.opt".
I edited a few of the pngs that I extracted from the opt and placed them as follows: "FlightModels\Skins\CORELLIANTRANSPORT2\CORELLIANTRANSPORT2[TEX*****].png"
The files in the skins folder have the same name and dimensions of the original texture. I did change the color mode from Indexed to RGB, would that cause problems?
I recall when I last tried this with the original Xwing that I had a hard time finding which textures to edit. Is it that I have not done the Cockpit and Exterior opts yet?
I wanted to look over the example but I don't see "Skins\XWing\Default\Tex00033.png" anywhere in my directory. Just to be safe I reinstalled the latest update to the Mega Pack today and looked again, but still not there.
So the craft is "FlightModels\CORELLIANTRANSPORT2.opt".
I edited a few of the pngs that I extracted from the opt and placed them as follows: "FlightModels\Skins\CORELLIANTRANSPORT2\CORELLIANTRANSPORT2[TEX*****].png"
The files in the skins folder have the same name and dimensions of the original texture. I did change the color mode from Indexed to RGB, would that cause problems?
I recall when I last tried this with the original Xwing that I had a hard time finding which textures to edit. Is it that I have not done the Cockpit and Exterior opts yet?
I wanted to look over the example but I don't see "Skins\XWing\Default\Tex00033.png" anywhere in my directory. Just to be safe I reinstalled the latest update to the Mega Pack today and looked again, but still not there.
- Trevor
- Posts: 515
- Joined: Thu Dec 04, 2014 7:11 pm
hmm, I assume that XWA uses "texel" mapping (lets say a UV of (0.5,0.75) on a 64x64 = s32,t48) so, could s and t's be hooked and replaced by original texture / st * new texture (hope that math is right

Trev