3d models skins

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Re: 3d models skins

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Jan 03, 2021 1:17 pm

UPDATE

Hello,
I've updated the 32bpp hook.

I've fixed a bug with the skins mipmaps.

User avatar
Haakan
Cadet 2nd Class
Posts: 81
Joined: Sun Jul 14, 2019 1:36 am

Post by Haakan » Fri Jan 08, 2021 3:00 am

CatMouthwash wrote:
Thu Dec 31, 2020 4:19 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.
I tried with the same texture but nothing...I even painted it all blue to see if I was skipping it but can't see anything online
Lt. Colonel A. Araujo
Commander, 7th SpecOps Squadron "Alpha"
Battlegroup I
Emperor's Hammer.

CMDR/LC Alejandro Araujo/Alpha/Wing I/ISDII Hammer/BGI

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Fri Jan 08, 2021 7:44 am

I think the error is with the texture name:
The textures don't need the OPT name in them. Basically the way they are displayed when you open the OPT in OPT Editor

The correct path is FlightModels\Skins\CorellianTransport2\TEX00***.png
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

CatMouthwash
Cadet 4th Class
Posts: 11
Joined: Sat Jul 11, 2020 9:10 pm

Post by CatMouthwash » Sun Jan 10, 2021 7:18 pm

Thanks for the idea Vince, I think I must still have something off.

Should the skin show up in the craft viewer or just in mission?

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Sun Jan 10, 2021 8:25 pm

As far as I understand it's all on a mission.ini basis, so it should not appear in the craft viewer. It is just another means of applying a FG color within a mission.

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14045
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Sun Jan 10, 2021 10:39 pm

Driftwood is correct, Any craft viewers only read the OPT files itself, to see the skins you must load it in a mission.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Mon Jan 11, 2021 1:40 am

Under the previous way in XwaOptEditor, if you click on the mini {Face Groups:0} tab, that would show you all textures FG0 thru X on the current mesh you have selected. Then you can easily delete, or add new FG skins, or change the order of them etc. Now the extra FG textures are no longer on the model itself, it's being dynamically dressed on the model like Vince said per how the ship's .ini file is setup and/or the missionname.ini files. Quite clever hook.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

CatMouthwash
Cadet 4th Class
Posts: 11
Joined: Sat Jul 11, 2020 9:10 pm

Post by CatMouthwash » Mon Jan 11, 2021 3:15 am

Ahhh! That makes so much sense now. I misunderstood JeremyaFr's original post. I assumed that it was an either/or option. Thank you all for your feedback! I'll try that now.

Edit: I was going to wait till the weekend but I couldn't resist, that got it. Again, thank you all for your advice, this is really awesome.

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Tue Jan 12, 2021 5:12 am

The ship's .ini or objects.txt file is the baseline static profile. To deviate from that you make your changes via the mission.tie 's .ini or .txt file where you can hide/render meshes. Or use the objects hook to replace an existing .opt file too with understanding the temporary replacement model inherits the original models' stats. Perhaps swapping one xwing type for another. The new Skins hook is a similar process but deals with dynamic texture swapping. Sort of sets up a storyline of cool things you can do like battle damaged burn marks and so forth on about any model.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Jan 18, 2021 5:17 pm

UPDATE

Hello,
I've updated the 32bpp hook.

I've fixed a bug with the skins feature in the Tech Library.

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Mon Jan 18, 2021 6:10 pm

Wait, hold up, did you add skin selection buttons the tech library?
Image Image Image Image Image

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Jan 18, 2021 6:59 pm

No, I didn't.
The Tech Library will display the Default skin.

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Mon Jan 18, 2021 7:07 pm

Ok, well that would be an awesome idea nonetheless. Give players the opportunity to see available FG colors without needing to use your 3rd party programs. But given the new skin tech, it might actually be outdated, considering it wouldn't show all available options.
Image Image Image Image Image

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7824
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Tue Feb 23, 2021 3:39 pm

CatMouthwash wrote:
Mon Jan 11, 2021 3:15 am
Ahhh! That makes so much sense now. I misunderstood JeremyaFr's original post. I assumed that it was an either/or option. Thank you all for your feedback! I'll try that now.

Edit: I was going to wait till the weekend but I couldn't resist, that got it. Again, thank you all for your advice, this is really awesome.
Just to say as Skins is a really new feature it came out after our last update.
With the next Update we will have a better tutorial on how to use Skins in missions. Also some decent examples so you can see how they are laid out as textures.
We don't have a skin creation tutorial yet but will look into it and hopefully everyone can give hints. We are still working out little issues.

I also would like to see some FG colours on the YTs so I look forward to seeing what you and others come up with :)
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Feb 25, 2021 5:41 pm

UPDATE

Hello,
I've updated the 32bpp hook.

I've added the skin name as a suffix for the textures names.

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, or the name of the skin appended, and dimensions of the original texture.
The supported image formats are bmp, png, jpg. Use the png format to get transparency.
For example, if the name of the skin is "Skin1", the name of the texture is "Tex00000", and the texture extension is ".png", then the texture filename can be "Tex00000_Skin1.png" or "Tex00000.png"

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Mar 19, 2021 12:08 pm

UPDATE

Hello,
I've updated the32bpp hook.

I've replaced "_fg_" with "_fgc_" for the skins.

User avatar
theonegalen
Cadet 2nd Class
Posts: 74
Joined: Mon May 18, 2020 11:39 pm

Post by theonegalen » Fri Sep 17, 2021 8:48 pm

@JeremyaFr, I was thinking about this last night: would it be incredibly difficult to have a skin applied dynamically while playing a mission? For example, capital ships could have "damaged" skins that would be automatically applied when their Hull points reach 50%. I know there are few models that have "battle damage" skins so far, but could this be made to work with those?

Also, is it possible to have the same opt have two different skins applied for different craft? For example, if I wanted to make a mission that used an Imperial ISD and a New Republic ISD?

User avatar
Forceflow
Fleet Admiral (Administrator)
Posts: 7198
Joined: Wed Oct 20, 1999 11:01 pm
Contact:

Post by Forceflow » Sat Sep 18, 2021 9:17 am

theonegalen wrote:
Fri Sep 17, 2021 8:48 pm
@JeremyaFr, I was thinking about this last night: would it be incredibly difficult to have a skin applied dynamically while playing a mission? For example, capital ships could have "damaged" skins that would be automatically applied when their Hull points reach 50%. I know there are few models that have "battle damage" skins so far, but could this be made to work with those?

Also, is it possible to have the same opt have two different skins applied for different craft? For example, if I wanted to make a mission that used an Imperial ISD and a New Republic ISD?
The latter should already work with skins, you can have those be applied on a per craft basis as far as I know. This is set in the mission in file.
Damage skins are not yet possible and last I remember Jeremy did not know if it's possible or feasible to do so. Never say never, but last I heard there's nothing on the roadmap for that at all right now.
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

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Wed Sep 22, 2021 4:05 am

I think the game engine already "invokes" damaged skins on a limited basis. If you ever shoot say warheads at a capital ship in the same hull area, the original texture is replaced showing a black/burned spot and so forth. I think this also applies to starfighters, but perhaps not on the level we're wishing it could. Another way would be to bury parallel meshes inside of parent meshes with burned textures, so when the outer meshes "get destroyed" then the underlying mesh(es) would then show. This approach might add bloat to the model. A third possibility could be via the special effects, if applicable. If dynamic cockpits can have textures changed based on damaged events, perhaps some of the craft's outer AI textures could be changed dynamically? Add animation textures like smoke, sparks, and small fires burning on structures---it could look pretty slick.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Oct 31, 2021 9:08 pm

UPDATE

Hello,
I've updated the 32bpp hook.

I've improved loading time for OPTs with skins.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Nov 27, 2021 2:04 pm

UPDATE

Hello,
I've updated the 32bpp hook.

I've fixed a bug with skins loading.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Dec 24, 2021 1:44 pm

UPDATE

Hello,
I've updated the 32bpp hook.

You can now add all the texture of a skin into a single archive file. The supported format are zip and 7z.

To reduce the count of textures files, you can compress the directories of skins. If the directory is "FlightModels\Skins\[Model]\[Skin1]\", you can create "FlightModels\Skins\[Model]\[Skin1].zip" or "FlightModels\Skins\[Model]\[Skin1].7z". The textures are at the root of the archive file.

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7824
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Fri Dec 24, 2021 2:26 pm

That sounds a great idea! Look forward to testing it.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7824
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Fri Dec 24, 2021 10:41 pm

JeremyaFr wrote:
Fri Dec 24, 2021 1:44 pm
UPDATE

Hello,
I've updated the 32bpp hook.

You can now add all the texture of a skin into a single archive file. The supported format are zip and 7z.

To reduce the count of textures files, you can compress the directories of skins. If the directory is "FlightModels\Skins\[Model]\[Skin1]\", you can create "FlightModels\Skins\[Model]\[Skin1].zip" or "FlightModels\Skins\[Model]\[Skin1].7z". The textures are at the root of the archive file.
So far this is crashing for me.
By that I mean using any skin as normal and NOT compressed.
The mission crashes before it hits the hangar a few seconds after loading.
As a test I've only used the files in xwa_hook_32bpp.zip. So it's one of those causing an issue.

EDIT: hook_32bpp_net.dll is the issue.
With this new one and the others the game crashes.
With the old hook_32bpp_net.dll, ‎‎27 ‎November ‎2021, and the other new ones then the game loads and the skins show.
It would also help if the file version numbers were updated in the properties Details tab.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Dec 26, 2021 9:20 am

Ace Antilles wrote:
Fri Dec 24, 2021 10:41 pm
So far this is crashing for me.
Hello,
Can you post a crash report from the events viewer?

Post Reply