Jump to content

Modding Career Portraits - Progress


Recommended Posts

Posted (edited)

Ive been experimenting with my idea of replacing the face parts with full frame photos, and its not as straight-forward as I hoped. I figured I should share what I found tho in case someone else wanna take a look as Ive kinda hit a wall.

 

The face parts are located in two places. as tidy .png files in /swf/il2/characterphotos/ separated in folders by faction and face part like /101/mouth/ etc. but those are mostly not used as far as I can tell. instead there is another set in /swf/cache/il2/characterphoto_#.dds where # is 1 to 5, where all the parts are randomly thrown together in five 1024x1024 dds images. each characterphoto_#.dds got a matching characterphoto_#.atlas, a plain text file with a list of which parts of the image contains which parts of the face.

 

textures: characterphoto_1.png
/102/background/2.png	351	0	350	350	0	0	350	350	
/102/background/1.png	0	351	350	350	0	0	350	350	
/201/background/7.png	351	0	350	350	0	0	350	350	
/201/background/2.png	351	0	350	350	0	0	350	350	
/201/background/3.png	351	351	350	350	0	0	350	350	
/102/background/3.png	351	351	350	350	0	0	350	350	
/103/background/3.png	351	351	350	350	0	0	350	350	
/103/background/1.png	0	351	350	350	0	0	350	350	
/103/background/2.png	351	0	350	350	0	0	350	350	
/103/background/5.png	0	0	350	350	0	0	350	350	
/201/background/1.png	0	351	350	350	0	0	350	350	
/101/background/2.png	351	0	350	350	0	0	350	350	
/101/background/1.png	0	351	350	350	0	0	350	350	
/101/background/3.png	351	351	350	350	0	0	350	350	
/103/head/4.png	702	0	319	350	31	0	350	350	
/201/head/1.png	702	351	305	334	45	16	350	350	
/103/head/2.png	729	686	294	329	56	21	350	350	
/102/head/5.png	378	702	350	321	0	29	350	350	
/102/head/3.png	27	702	350	321	0	29	350	350	
/103/signs-flipped/4.png	0	702	26	22	184	276	350	350	
/103/signs-flipped/2.png	1022	0	0	0	350	350	350	350	
/103/signs-flipped/1.png	1022	0	0	0	350	350	350	350	

Im not 100% sure what each number is, but it seems to be like this

"image path"	"vertical pixel where the image starts"	"horizontal pixel ditto"	"size of part"	"this one Im not sure"	"this neither"	"the last two are always 350, havent tried messing with them yet"

even if you delete the cache file, it doesnt generate a new one, seemingly because it also exists in the compressed swf.gtp. so Ive changed the portraits by just modifying the characterphoto_#.dds and .atlas files, changing the ones in /swf/il2/characterphoto/ doesnt seem to do anything.

 

and so Ive successfully changed the .dds and .atlas files to replace the mouth parts with portraits and made the other parts transparent. but turns out the largest problem is that the game skews the portraits, surely because it theoretically gives more randomness to the original parts which it would if they didnt all look like terrifying ghosts anyway, so the portraits look very wonky.

 

I have searched heaven and earth among the files to try and find where the game decides how to use the parts and hopefully how many parts there are so you can add more, but I havent found a thing. best clue I got is a value called "avatarPath" in /bin/game/careerProcessor.dll, but that might be a red herring. otherwise there is no relevant mentions of "mouth", "characterphoto", "avatar" or anything else Ive been able to think of in any data files.

 

Ill probably experiment a bit more, but Im really at a loss so maybe someone else has some ideas

Edited by DeathDaisy
  • Like 3
  • Thanks 1
  • Upvote 2
Posted

I wish you much success ...I just  esp.hate the Luftwaffe pilots portraits sooooooo much!

 

Enemy ace.jpg

  • Haha 1
  • Upvote 1
Posted

+ 1 !!!

The portraits really look weird & ugly. 

  • Like 2
  • Haha 1
  • Upvote 5
Posted (edited)

Good initiative.

Edited by sevenless
  • Upvote 1
  • 10 months later...
Posted

Any news on this? Just trolled the forum looking for exactly this topic. The new plane skins look so great and these portraits are right out of 1991. They look positively awful. Wish the developer would drop the randomization and let us put our own png files in. Would be such an easy fix.

Posted

I wonder if we can ask the devs to make this as easy as it it to add skins or change the cabin photos. It would be nice to add more stories or countries. 

  • Like 1
  • 4 months later...
Posted (edited)
On 1/12/2020 at 4:57 PM, DeathDaisy said:

Ive been experimenting with my idea of replacing the face parts with full frame photos, and its not as straight-forward as I hoped. I figured I should share what I found tho in case someone else wanna take a look as Ive kinda hit a wall.

 

The face parts are located in two places. as tidy .png files in /swf/il2/characterphotos/ separated in folders by faction and face part like /101/mouth/ etc. but those are mostly not used as far as I can tell. instead there is another set in /swf/cache/il2/characterphoto_#.dds where # is 1 to 5, where all the parts are randomly thrown together in five 1024x1024 dds images. each characterphoto_#.dds got a matching characterphoto_#.atlas, a plain text file with a list of which parts of the image contains which parts of the face.

 







textures: characterphoto_1.png
/102/background/2.png	351	0	350	350	0	0	350	350	
/102/background/1.png	0	351	350	350	0	0	350	350	
/201/background/7.png	351	0	350	350	0	0	350	350	
/201/background/2.png	351	0	350	350	0	0	350	350	
/201/background/3.png	351	351	350	350	0	0	350	350	
/102/background/3.png	351	351	350	350	0	0	350	350	
/103/background/3.png	351	351	350	350	0	0	350	350	
/103/background/1.png	0	351	350	350	0	0	350	350	
/103/background/2.png	351	0	350	350	0	0	350	350	
/103/background/5.png	0	0	350	350	0	0	350	350	
/201/background/1.png	0	351	350	350	0	0	350	350	
/101/background/2.png	351	0	350	350	0	0	350	350	
/101/background/1.png	0	351	350	350	0	0	350	350	
/101/background/3.png	351	351	350	350	0	0	350	350	
/103/head/4.png	702	0	319	350	31	0	350	350	
/201/head/1.png	702	351	305	334	45	16	350	350	
/103/head/2.png	729	686	294	329	56	21	350	350	
/102/head/5.png	378	702	350	321	0	29	350	350	
/102/head/3.png	27	702	350	321	0	29	350	350	
/103/signs-flipped/4.png	0	702	26	22	184	276	350	350	
/103/signs-flipped/2.png	1022	0	0	0	350	350	350	350	
/103/signs-flipped/1.png	1022	0	0	0	350	350	350	350	

Im not 100% sure what each number is, but it seems to be like this







"image path"	"vertical pixel where the image starts"	"horizontal pixel ditto"	"size of part"	"this one Im not sure"	"this neither"	"the last two are always 350, havent tried messing with them yet"

even if you delete the cache file, it doesnt generate a new one, seemingly because it also exists in the compressed swf.gtp. so Ive changed the portraits by just modifying the characterphoto_#.dds and .atlas files, changing the ones in /swf/il2/characterphoto/ doesnt seem to do anything.

 

and so Ive successfully changed the .dds and .atlas files to replace the mouth parts with portraits and made the other parts transparent. but turns out the largest problem is that the game skews the portraits, surely because it theoretically gives more randomness to the original parts which it would if they didnt all look like terrifying ghosts anyway, so the portraits look very wonky.

 

I have searched heaven and earth among the files to try and find where the game decides how to use the parts and hopefully how many parts there are so you can add more, but I havent found a thing. best clue I got is a value called "avatarPath" in /bin/game/careerProcessor.dll, but that might be a red herring. otherwise there is no relevant mentions of "mouth", "characterphoto", "avatar" or anything else Ive been able to think of in any data files.

 

Ill probably experiment a bit more, but Im really at a loss so maybe someone else has some ideas

 

Did you get any further with this? I'd like to figure out hoe to change a characters face (not in relation to career),

i tried to get some high ranking nazi jerk in a FW190, or maybe a horch-automobile, just to get something worthwhile to shoot at in a mission

 

It seems indeed a mixture of affairs where the game makes a decision what to combine for a character in the game according to it's role,

guided by the .atlas file settings.

 

F.i. you would need to know which items are selected for a nazi FW190d9 and which for a Bf109f4.

I guess that with out a tool for combining the assets (JSGME output-able?) you won't get very far.

 

PS there's also an empty characters folder here: ......... IL-2 Sturmovik Great Battles\data\graphics

And something here: .... IL-2 Sturmovik Great Battles\data\graphics UnGTP123\textures\common (UN-GTP-ed all three graphics in one heap)

 

Edited by jollyjack
Posted (edited)

 

Would be great to know how I can get rid of those Dr Frankenstein pilot creations and exchange them by something human looking. 

 

 

Edited by Dutch2
Posted (edited)

Me too would to replace Frankenstein face with mine. It would be enough devs should introduce the possibility to change stock characters with a jpeg or png pictures.

 

M

Edited by Marvel
  • Upvote 1
  • 3 weeks later...
jollyjack
Posted (edited)
On 1/12/2020 at 4:57 PM, DeathDaisy said:

.......... even if you delete the cache file, it doesnt generate a new one, seemingly because it also exists in the compressed swf.gtp. so Ive changed the portraits by just modifying the characterphoto_#.dds and .atlas files, changing the ones in /swf/il2/characterphoto/ doesnt seem to do anything.

 

and so Ive successfully changed the .dds and .atlas files to replace the mouth parts with portraits and made the other parts transparent. but turns out the largest problem is that the game skews the portraits, surely because it theoretically gives more randomness to the original parts which it would if they didnt all look like terrifying ghosts anyway, so the portraits look very wonky.

 

I have searched heaven and earth among the files to try and find where the game decides how to use the parts and hopefully how many parts there are so you can add more, but I havent found a thing. best clue I got is a value called "avatarPath" in /bin/game/careerProcessor.dll, but that might be a red herring. otherwise there is no relevant mentions of "mouth", "characterphoto", "avatar" or anything else Ive been able to think of in any data files.

 

 

 

Quote

Ill probably experiment a bit more, but Im really at a loss so maybe someone else has some ideas

 

Stupid Q of course. Did you try to use the swf folder unGTP-ed? And also at the same time disable the swf.gtp folder (rename the extension).

 

Guess you will have to exchange all the facial parts with your edits. Each eye and mouth, nose etc individually.

Must be tough, with the new GAZ AA truck i saw a gunners face changing to a being bored expression when he sat down on his traveling seat.

 

The only thing i can think of is that the game expects the exact & correct file size for the changed facial parts. It's the same with previews.

But how these atlas files work beats me, i don't think they are addressed in the .mission file. Pilot faces probably comes linked with a loaded plane.

But what eventual file addresses that ...

 

ADDED: Jus' thinking out loud: the characterphoto_5.dds in photoshop measures 1024x1024 pixels.

Maybe the characterphoto_5.atlas file directs the running game where to grab the parts like mouth, eyes, lips etc.from the similar named dds file? ...

Opening the .atlas file in notepad; the line /103/nose/1.png    0    538    78    76    110    115    350    350  

might address a place on that DDS picture file.

 

Nose location.jpg

 

In a graphics folder \graphics\textures\common there are general 2048x2048 pilot dds files ... but how are they linked with the stuff above ?

 

pilot_ru_su.jpg

 

furter reading on Photoshop pixel locations: https://superuser.com/questions/318061/how-to-get-the-coordinates-for-a-selection-in-photoshop

 

Edited by jollyjack
  • 2 weeks later...
Posted (edited)

My cousin and I found the face-part files some months ago and ended up creating a nightmarish flesh creature which was somehow still less creepy looking than some of the autogenerated ones we have in game.

I must say though that I am somewhat partial to the random face generation.  Its a neat idea I think, and the addition of some more variety with a bit of refinement might make it somewhat more feasible outside the realm of the uncanny valley. 

Granted, having spent hundreds of hours in career mode I'm rather desensitized to all but the creepiest of the faces by now.
If you guys really want to see something strange though, check out what happens when you run one of them through an AI image enhancer:

Spoiler

Stock:148062155_StockFace.png.fb475f7e768a5d303b5db10974195fe0.png
AI:ENHANCE.jpg.bdc3ca7bce433650d52487585d56632f.jpg

 

Edited by Ram399
  • 1CGS
Posted (edited)
30 minutes ago, Ram399 said:

I must say though that I am somewhat partial to the random face generation.  Its a neat idea I think, and the addition of some more variety with a bit of refinement might make it somewhat more feasible outside the realm of the uncanny valley. 

 

Yeah, I think the idea behind them has improved since the originals - the ones for the RAF and USAAF are IMO an improvement especially over the German ones. Hopefully, one day the GUI can be improved so we can have ID cards that look like the originals - the current style just doesn't fit the era:

 

i284852689462656999._szw1280h1280_.thumb.jpg.43d9397dd2e1c7864e51dd8ffc35178d.jpg

Edited by LukeFF
  • 4 months later...
Posted

Hi all.. can anyone shed light where these images live within the game directory?  I see /swf/il2/characterphoto/ listed above, but when i navigate there on my system all I see are  'strorage' and 'userdata' folders.  Do i need to install something additional, e.g. a campaign?

Posted

a general BUMP: any one got any further?

  • 3 weeks later...
Posted

yeah another bump, wish it were editable and normal pictures

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...