Door Kickers 2

Door Kickers 2

Door Kickers 2 Workshop
Unlimited gameplay via our in-game mission editor and extensive game moddability.
Testing an automated image to DK2 UI icon workflow
For the last couple days I've been playing around with a method to automatically generate DK2 UI icons from images.

Some examples here:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3429967927
And some side-by-side comparisons including the source images (not posting these to the community hub as I'm not sure about licensing issues. The source images are mainly from https://www.imfdb.org, no copyright infringement intended):

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3430264968

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3430446973

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3430782113

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3430846384

These icons have not been manually reworked in any way, you just choose a source picture, enter the desired longer side of the icon to be generated (for weapons that would usually be width) in pixels, and render the icon.

This is very much in a proof-of-concept-stage currently, I wonder if anybody would have use for a thing like this.

Also, the result will never be as nice as the work of a skilled artist, but it might give you a starting point, or be a good way to quickly check how a specific weapon might look in game.

If anybody's interested drop me a line, or if you want to throw some images at me for testing, feel free to do so!

All the best and happy modding!

---

[Update: Added guide & download link here:]

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3432159264
Last edited by knoedelsalat; 21 Jul @ 9:50am
< >
Showing 1-15 of 24 comments
panguino  [developer] 14 18 Feb @ 12:51pm 
Hey, this looks like a very useful tool, great job!
Hey man, thanks!! Still testing this, I will write up some documentation and a guide on how to use the workflow in the next few days.

It's also a whole lot of fun to churn these out :)

[Edit: moved comparison picture to first post]]
Last edited by knoedelsalat; 21 Feb @ 1:40am
Another batch of tests, source images are again mainly from imfdb.org

[Edit: moved comparison picture to first post]]
Last edited by knoedelsalat; 19 Feb @ 11:14pm
Added a few more tests and comparison images to the original post.

Note that there's no need no alpha-mask the source image, the background detection works pretty well even for noisier pictures.

Currently the workflow will give you a set of images, these are:

gun_name_00-source.png
the source image as reference
gun_name_01-body.png
the dark brown background
gun_name_02-lineart.png
the fine line art inside of the icon
gun_name_03-outline.png
the thick outline around the icon
gun_name_04-icon.png
all layers combined into one image

All images are alpha-masked and sized, and can be opened as layers in GIMP or Photoshop to manually fine-tune the results.

I'll write up some documentation, still wondering what they best way of making this accessible will be. Probably GitHub?
Last edited by knoedelsalat; 20 Feb @ 3:09am
Great!
For my shotgun mod I draw icons but were awful as you may expect.
Hey man! It'll take me a couple days to get this out,

If you want, you could send me a list of the guns you need, or source images if you have any.

This would be great for some additional testing!
If possible the two guns, I'd appreciate.

KSG Shotgun (without fore grip)
https://www.imfdb.org/wiki/Kel-Tec_KSG

Stevens 311R (sawed-off)
https://www.imfdb.org/wiki/12_Gauge_Double_Barreled_Shotgun#Short_barreled_Side_by_Side_Shotgun_.28Sawed_Off.29

This is my awful icons.
Judge and Raging Judge seems OK for super noob me, maybe.
https://staticdelivery.nexusmods.com/mods/4184/images/224/224-1685369042-1037694465.png

(Sorry for murmuring. Summerized them.)

P.S.
And this is the new icons.
https://staticdelivery.nexusmods.com/mods/4184/images/224/224-1740270860-89744361.jpeg
Crude Sawed-off Shotgun is retouched by me, because of the jagged wooden texture, but easy work.
Other 3 are raw outputs.
Last edited by Takeshi, made in Mom; 23 Feb @ 3:50pm
Hi Takeshi, running these with default settings will look something like this
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3430915829
I'm eyeballing the sizes right now, the KSGs are ~380, the Stevens ~280 pixels wide.. Let me know what you think and I can send you the files!
Put in the Judges as well, just for giggles. Also rotated the source image of the Stevens R slightly to straighten out the barrel
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3430949957
Wow just woke up on midnight to find the work done!
Seems great.
Stevens 311R need some retouch but I can do it with some minutes.

Size is a difficult problem, but IMO it's my bussiness so you don't need to worry about it so much.
If you send me the image as a large png or dds file, I will trim, retouch, resize etc.

This is icons of my guns and vanilla ones.
I resized (Raging) Judge because they were bigger than KSG (lol),
but still seem too big.
https://imgur.com/a/7LtCE80

My Mod guns;
KSG 400x152
Mafia's Sawed-Off 245x58
Raging Judge 256x121
Judge 193x116

Vanilla ones;
M1014 404x84
Sawed-Off 280x72
Hushpuppy 252x116
M9 168x112


imgur accepts 5MB PNG.
or via discord, my name is takeshi_without_castle.
Sorry I'd be better to sleep again.
Last edited by Takeshi, made in Mom; 20 Feb @ 6:39pm
No problem, that's pretty much exactly what this method is meant to do ;)

Thing is, the workflow will always render a 2 px outline around the icon, and 1px lineart everywhere else, so if you scale down the result these lines will start to fall apart pretty quickly.

It would be better to re-run the icons with the proper desired width.

I'll do another batch tomorrow, could you check what dimensions your original icons are?
Last edited by knoedelsalat; 21 Feb @ 1:41am
As you suggest, "KSGs are ~380, the Stevens ~280 pixels wide" sounds good to me.
Not so different from my KSG(400) and vanilla Sawed-off(280).
(My Sawed-off was Over/Under. Stevens and vanilla one is SxS)

Raging Judge ~230 and Judge ~180 would be fine.
https://imgur.com/a/2EWaQ8A

I think the standard of size would be grips: not so different between different guns.
If the grip is not too big or small compared to similar guns, the whole would not seem ugly.
Hey @Takeshi, gave this another run after fine-tuning the output sizes, here's what I got this time, including some new variations:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3431393234
This is really simple to do, you literally just enter a new output size and execute the workflow again.

Also, I think I got the orientation part wrong, as weapons seem to point right instead of left in game.

Still leaving out the flipping upside-down part though, guess that should best be left for after the manual cleanup :)
Last edited by knoedelsalat; 21 Feb @ 1:25am
Good job, it's nice to resize easily!

If I draw 3d models, KSG Gen 2 is my favorite.
But sadly I have never tried 3d drawing, so somebody zoom up enough, he would find my KSG was M500 :steamfacepalm:

Anyway, I appreciate your work and owe you, so when I publish my mod here, I acknowledge and introduce your work.
You're good bro, this was a nice little test case! Learned some things along the way and even tweaked the workflow a bit.

I'm currently setting up the GitHub repo, will post here when it's done.

Also, if you want I can PM you the files so you can check if the layering works in your editing software.
< >
Showing 1-15 of 24 comments
Per page: 1530 50