Dwight's Camo Sprayshop

A forum to discuss custom scenarios, campaigns and modding in general.

Moderators: Slitherine Core, Panzer Corps Moderators, Panzer Corps Design

jmacnamara
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 132
Joined: Mon Nov 28, 2011 9:27 am

Re: Dwight's Camo Sprayshop

Post by jmacnamara »

The batching works perfectly! I am very pleased because it will save me a lot of manual stuff.

Planes render okay, except the same four planes that gave me trouble and for much the same reason: Wing clipping.

Me323_Gigant: Wing clipped on large and small icon.
He_177A, He_111H2, Ju_52: Wing clipped on small icon.
iceFlame
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 300
Joined: Sat Feb 01, 2014 4:11 am

Re: Dwight's Camo Sprayshop

Post by iceFlame »

rezaf wrote:Ok, I dug out the source code and released the version with aircraft skinning.
Sounds great, thanks very much! :)
Image
Go deep here: slitherine.com/forum/viewtopic.php?f=147&t=49469
rezaf
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1487
Joined: Mon Aug 15, 2011 3:27 pm

Re: Dwight's Camo Sprayshop

Post by rezaf »

jmacnamara wrote:The batching works perfectly! I am very pleased because it will save me a lot of manual stuff.

Planes render okay, except the same four planes that gave me trouble and for much the same reason: Wing clipping.

Me323_Gigant: Wing clipped on large and small icon.
He_177A, He_111H2, Ju_52: Wing clipped on small icon.
Heh, will you be very mad if I don't fix this, at least not right away?
It makes your utility remain useful, too! :wink:

DCS started out as something SO much simpler that was initially only a working tool for myself (without a frontend, initally) and it relies on relatively specific (one might say crude) parameters in some cases - just the thought of adding logic to try and recognize clippings and work around that makes me shudder. I'll take a look at your sourcecode but ... yeah, I'd probably have to do major restructuring, and thus I'm going to say: Don't count on this issue being fixed anytime soon.
Maybe it'd be better to "fix" the airplane icons to prevent overlapping. Or just use your utility.

Sorry for the bad news. :oops:
_____
rezaf
guille1434
Major-General - Jagdtiger
Major-General - Jagdtiger
Posts: 2856
Joined: Sun Jul 01, 2012 5:32 pm

Re: Dwight's Camo Sprayshop

Post by guille1434 »

Rezaf: Would you be so kind to consider sometime to add the posibilty of organizing the icon images in folders, in the same way as the skin files can be organized at present? That would be useful when you have lots of icons in the program folder(s).

By the way, with every release of the planes I made, I included pretty well detailed masks and base icons for them, so anyone can add them to the program.
Thanks for the update to the software!
Last edited by guille1434 on Mon Apr 14, 2014 2:25 pm, edited 1 time in total.
asuser
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 628
Joined: Tue May 28, 2013 8:48 pm

Re: Dwight's Camo Sprayshop

Post by asuser »

Big Thanks to jmacnamara and rezaf!

Nice idea to include (finally) the function also for planes into the great DCS!

Now we can airbrush our lovely planes with the right fun! :D
jmacnamara
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 132
Joined: Mon Nov 28, 2011 9:27 am

Re: Dwight's Camo Sprayshop

Post by jmacnamara »

I just couldn't help myself. Been playing LOV and every time I had a bunch of Italian units assigned to my force to "help", I thought of them being skinned with these.
_HelloKitty_Thumb.png
_HelloKitty_Thumb.png (7.4 KiB) Viewed 4876 times
_HelloKitty.png
_HelloKitty.png (25.37 KiB) Viewed 4876 times
iceFlame
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 300
Joined: Sat Feb 01, 2014 4:11 am

Re: Dwight's Camo Sprayshop

Post by iceFlame »

jmacnamara wrote:I just couldn't help myself. Been playing LOV and every time I had a bunch of Italian units assigned to my force to "help", I thought of them being skinned with these.
Not a bad idea. Everybody loves kitties, so maybe the enemy will take it easy on them. :wink:
Image
Go deep here: slitherine.com/forum/viewtopic.php?f=147&t=49469
Wellingham
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 91
Joined: Sun Apr 27, 2014 8:24 pm
Location: France

Re: How to create a unit mask

Post by Wellingham »

rezaf wrote:Tutorial: How to create a unit mask

Ok, I'm going to try and outline the process of creating a custom image mask in this post.
Note that I'm using Paint.NET, but if you're more familiar with another graphics program, like Gimp, Photoshop or Corel Draw, for example, you can use that instead.
Then it's up to you to find the relevant commands and options, though.

First of all, let's open a unit icon. The process is the same for any kind of unit, but it's considerably more complicated for wheeled units and/or units with lots of small details.
For the purposes of this tutorial, I just picked a Tiger tank. Unmodified, the icon looks like this:
Image

The mask tells DCS which areas of an icon to apply a camouflage to and which areas of an icon are to be painted in secondary or tertiary color.
The area of the image the mask should ignore alltogether is painted in black in the mask file.
To ceate this are, we switch to the Magic Wand tool.
Image

Really good tutorial! Helped me a lot!

~Ulisses Montagna

Make sure Tolerance is set to 50%. Sometimes, a little fiddling around might be neccessary, but usually, this default setting works just fine.
Image

Click on any "empty space" in the icon. This will result in a selection that looks like this:
Image

As you can see, the selection includes transparent parts of the image (the checkered pattern) as well as shadows - this is actually the most important part of the selection, as otherwise applying a skin to the image can result in the camo pattern being visible in the unit's shadow, and obviously that's not how it's supposed to be.

Obviously, we don't want to paint the mask directly onto actual icon, so we add a new layer to the image. The layer window is toggled with F7, if you have any troubles spotting it.
Image

Adding a new layer will automatically switch focus to it, but at any point of this process, it's a good idea to make sure you have the correct layer selected.
If it isn't already active, switch your current color to Black (RGB 0/0/0). Remember, this is the part of the mask that tells DCS to ignore these parts of the image.
If you can't find the colors dialog, it's toggled with F8.

Image

Now, fill the selection with the active color.

Image

The icon should now look like this:

Image

Now it's a good idea to invert the selection. The parts already painted in black are obviously not very interesting for us any longer, they're supposed to be ignored, and inverting the black selection means we can safely paint on the remainder of the image without accidentally repainting anything black.

Image

Next, we can color parts of the image we want the second color applied to. With tanks, this is usually the area around the tracks, but it'll be different for other units. For open vehicles, for instance, it's usually a good idea to choose this color to paint the interiors. You'll get a feel for it in time.
For now, just switch the active color to pink (RGB 255/0/220).

Image

To paint larger areas of the image, the Brush is a good tool. Size is up to you, but I find 10 is a good choice for the big icons - make sure to disable Antialiasing (the second to right icon in the toolbar allows you to do so).
Image

Just paint away over the areas you think should be colored in the solid color. Like I wrote, for tanks, that's usually the tracks. You won't be able to spot the camouflage on anything that's black or so dark that it's close to black, so you don't have to be too thorough.

Image

To mask finer details, the Pencil is a better utility. It's size is only one pixel and you don't have to worry about Antialiasing.

Image

I use it, for example, to mask the insignia or small details like tools attached to the hull of a vehicle, also the guns (see below). You'll quickly be able to select the right tool for the job yourself, don't worry.

Image

For guns, I usually use the tertiary color. It's designated in a mask with the Cyan color (RGB 0/255/255). Btw., be careful to pick the right colors, otherwise DCS won't be able to properly work with the mask.

Image

Once everything has be masked correctly, the process has to be repeated for the opposite big icon and for the two small icons below. Note that the official icons have been created from 3D models, so the details you can see from the other side are usually a little differend - this means you can't just copy-paste the mask you created for one side and flip it around the x axis.
Anyway, once you're done, your file should look like this:

Image

Now all that's left to do is to throw out the original layer. On the layers window, switch to it (It should be labeled "Background") and select delete (the red "X" on the bottom of the layer window).

Image

Your image should now look like this:

Image

Select File->Save As and save the mask to a file. It has to bear the exact name the original icon had, only with _Mask appended to it, and it needs to be a 32 Bit PNG image.
In Paint.NET, once you've entered your new filename and pressed enter, a Dialog will pop up in which normally, auto-detect is selected. Make sure to switch this to 32 Bit!

Image

And that's it, we're done.
You can now copy both the icon you masked and the Mask file into the BaseIcons directory of the DCS application. Next time you start it, it'll automatically detect the new icons and you can skin them too.

One more thing that might be worth mentioning: Skinning doesn't work well when the base icon already has a color of it's own (like green for the soviet icons, for example). Icons that are already camouflaged will usually look horrible - don't bother making a mask for them. Units which are just colored can be adjusted to work well with the app, though - I'll cover this in a different tutorial.

I hope you can understand this tutorial, if any questions remain, feel free to ask.
_____
rezaf
~UM
Wellingham
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 91
Joined: Sun Apr 27, 2014 8:24 pm
Location: France

Re: How to create a unit mask

Post by Wellingham »

rezaf wrote:Tutorial: How to create a unit mask

Ok, I'm going to try and outline the process of creating a custom image mask in this post.
Note that I'm using Paint.NET, but if you're more familiar with another graphics program, like Gimp, Photoshop or Corel Draw, for example, you can use that instead.
Then it's up to you to find the relevant commands and options, though.

First of all, let's open a unit icon. The process is the same for any kind of unit, but it's considerably more complicated for wheeled units and/or units with lots of small details.
For the purposes of this tutorial, I just picked a Tiger tank. Unmodified, the icon looks like this:
Image

The mask tells DCS which areas of an icon to apply a camouflage to and which areas of an icon are to be painted in secondary or tertiary color.
The area of the image the mask should ignore alltogether is painted in black in the mask file.
To ceate this are, we switch to the Magic Wand tool.
Image

Really good tutorial! Helped me a lot!

~Ulisses Montagna

Make sure Tolerance is set to 50%. Sometimes, a little fiddling around might be neccessary, but usually, this default setting works just fine.
Image

Click on any "empty space" in the icon. This will result in a selection that looks like this:
Image

As you can see, the selection includes transparent parts of the image (the checkered pattern) as well as shadows - this is actually the most important part of the selection, as otherwise applying a skin to the image can result in the camo pattern being visible in the unit's shadow, and obviously that's not how it's supposed to be.

Obviously, we don't want to paint the mask directly onto actual icon, so we add a new layer to the image. The layer window is toggled with F7, if you have any troubles spotting it.
Image

Adding a new layer will automatically switch focus to it, but at any point of this process, it's a good idea to make sure you have the correct layer selected.
If it isn't already active, switch your current color to Black (RGB 0/0/0). Remember, this is the part of the mask that tells DCS to ignore these parts of the image.
If you can't find the colors dialog, it's toggled with F8.

Image

Now, fill the selection with the active color.

Image

The icon should now look like this:

Image

Now it's a good idea to invert the selection. The parts already painted in black are obviously not very interesting for us any longer, they're supposed to be ignored, and inverting the black selection means we can safely paint on the remainder of the image without accidentally repainting anything black.

Image

Next, we can color parts of the image we want the second color applied to. With tanks, this is usually the area around the tracks, but it'll be different for other units. For open vehicles, for instance, it's usually a good idea to choose this color to paint the interiors. You'll get a feel for it in time.
For now, just switch the active color to pink (RGB 255/0/220).

Image

To paint larger areas of the image, the Brush is a good tool. Size is up to you, but I find 10 is a good choice for the big icons - make sure to disable Antialiasing (the second to right icon in the toolbar allows you to do so).
Image

Just paint away over the areas you think should be colored in the solid color. Like I wrote, for tanks, that's usually the tracks. You won't be able to spot the camouflage on anything that's black or so dark that it's close to black, so you don't have to be too thorough.

Image

To mask finer details, the Pencil is a better utility. It's size is only one pixel and you don't have to worry about Antialiasing.

Image

I use it, for example, to mask the insignia or small details like tools attached to the hull of a vehicle, also the guns (see below). You'll quickly be able to select the right tool for the job yourself, don't worry.

Image

For guns, I usually use the tertiary color. It's designated in a mask with the Cyan color (RGB 0/255/255). Btw., be careful to pick the right colors, otherwise DCS won't be able to properly work with the mask.

Image

Once everything has be masked correctly, the process has to be repeated for the opposite big icon and for the two small icons below. Note that the official icons have been created from 3D models, so the details you can see from the other side are usually a little differend - this means you can't just copy-paste the mask you created for one side and flip it around the x axis.
Anyway, once you're done, your file should look like this:

Image

Now all that's left to do is to throw out the original layer. On the layers window, switch to it (It should be labeled "Background") and select delete (the red "X" on the bottom of the layer window).

Image

Your image should now look like this:

Image

Select File->Save As and save the mask to a file. It has to bear the exact name the original icon had, only with _Mask appended to it, and it needs to be a 32 Bit PNG image.
In Paint.NET, once you've entered your new filename and pressed enter, a Dialog will pop up in which normally, auto-detect is selected. Make sure to switch this to 32 Bit!

Image

And that's it, we're done.
You can now copy both the icon you masked and the Mask file into the BaseIcons directory of the DCS application. Next time you start it, it'll automatically detect the new icons and you can skin them too.

One more thing that might be worth mentioning: Skinning doesn't work well when the base icon already has a color of it's own (like green for the soviet icons, for example). Icons that are already camouflaged will usually look horrible - don't bother making a mask for them. Units which are just colored can be adjusted to work well with the app, though - I'll cover this in a different tutorial.

I hope you can understand this tutorial, if any questions remain, feel free to ask.
_____
rezaf
~UM
jmacnamara
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 132
Joined: Mon Nov 28, 2011 9:27 am

Re: Dwight's Camo Sprayshop

Post by jmacnamara »

Something constructive to make up for my Hello Kitty skin. I'm creating a grand unit mod, for the moment purely for my own entertainment, as I am not content with the way the Amulet mod has turned out. Most of the time I adjust someone else's work to suit my purposes, but on rare occasions I create something of my own. There is a skirted JagdPanther out there, but I don't like it, so I took the vanilla JagdPanther, used Panther D skirts and came up with this:
JagdpantherB.png
JagdpantherB.png (91.82 KiB) Viewed 4773 times
JagdpantherB_Mask.png
JagdpantherB_Mask.png (2.37 KiB) Viewed 4773 times
Feel free to use, distribute and adjust as you see fit.

And a question. DCS includes some of the experimental models. (The E series, Coelian, Lowe etc). Unfortunately they look distinctly 'off' when skinned with DCS, especially compared to the vanilla stock. I have de-saturated, applied vanilla color schemes, darkened or out-right replaced the tracks and done some other minor adjustments. The results are very good and when a skin is applied, they can pass for vanilla units with the same skin. Done are the e-10, e-25, e-50, Coelian and SturmTiger ATY.

May I upload them here, or is adjusting someone else's (I believe Churchlakecity and Guille) work frowned upon?
jmacnamara
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 132
Joined: Mon Nov 28, 2011 9:27 am

Re: Dwight's Camo Sprayshop

Post by jmacnamara »

Just a sample of what I have done. Like Amulet I use a Heer, Elite/SS, SE scheme. Vanilla units included in the picture for comparison purposes.
unit_demo.jpg
unit_demo.jpg (101.9 KiB) Viewed 4773 times
guille1434
Major-General - Jagdtiger
Major-General - Jagdtiger
Posts: 2856
Joined: Sun Jul 01, 2012 5:32 pm

Re: Dwight's Camo Sprayshop

Post by guille1434 »

jmacnamara: There is no poblem about modifiyng the icons I uploaded an uploading them by yourself. Feel free to create with them... After all, most of the ones I published are derived from or inspired by other's people work.
jmacnamara
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 132
Joined: Mon Nov 28, 2011 9:27 am

Re: Dwight's Camo Sprayshop

Post by jmacnamara »

guille1434 wrote:jmacnamara: There is no poblem about modifiyng the icons I uploaded an uploading them by yourself. Feel free to create with them... After all, most of the ones I published are derived from or inspired by other's people work.
Thanks. I'll start uploading then. I will credit the creator (-- if known --) of the icon I changed.
jmacnamara
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 132
Joined: Mon Nov 28, 2011 9:27 am

Re: Dwight's Camo Sprayshop

Post by jmacnamara »

The JagdPanther B again. I adjusted the mask to include the entire gun.
JagdpantherB.png
JagdpantherB.png (91.82 KiB) Viewed 4728 times
JagdpantherB_Mask.png
JagdpantherB_Mask.png (5.13 KiB) Viewed 4728 times
jmacnamara
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 132
Joined: Mon Nov 28, 2011 9:27 am

Re: Dwight's Camo Sprayshop

Post by jmacnamara »

The Coelian by Churchlakecity. Desaturated and recolored. Tracks removed and transplanted from a vanilla Panther.
Coelian.png
Coelian.png (98.21 KiB) Viewed 4727 times
Coelian_Mask.png
Coelian_Mask.png (5.62 KiB) Viewed 4727 times
jmacnamara
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 132
Joined: Mon Nov 28, 2011 9:27 am

Re: Dwight's Camo Sprayshop

Post by jmacnamara »

The Jagdpanzer E-10. Original by Churchlakecity. Desatured and recolored. Track brightness toned down significantly.
e10.png
e10.png (102.25 KiB) Viewed 4727 times
e10_Mask.png
e10_Mask.png (4.81 KiB) Viewed 4727 times
jmacnamara
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 132
Joined: Mon Nov 28, 2011 9:27 am

Re: Dwight's Camo Sprayshop

Post by jmacnamara »

Jagdpanzer E-25 by churchlakecity. Desaturated and recolored. Track brightness significantly reduced.
e25.png
e25.png (100.62 KiB) Viewed 4727 times
e25_Mask.png
e25_Mask.png (4.94 KiB) Viewed 4727 times
jmacnamara
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 132
Joined: Mon Nov 28, 2011 9:27 am

Re: Dwight's Camo Sprayshop

Post by jmacnamara »

The Panzer E-50 by guille1434. Desaturated and recolored. Track brightness reduced.
e50.png
e50.png (91.28 KiB) Viewed 4727 times
e50_Mask.png
e50_Mask.png (5.19 KiB) Viewed 4727 times
jmacnamara
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 132
Joined: Mon Nov 28, 2011 9:27 am

Re: Dwight's Camo Sprayshop

Post by jmacnamara »

Panzer E-75 by churchlakecity. Desatured and recolored. Track brightness reduced. Sharpened. Well, this one was hard and I'm still not entirely pleased by the result. Churchlakecity's model was just so good, I had to make the attempt.
e75.png
e75.png (98.42 KiB) Viewed 4727 times
e75_Mask.png
e75_Mask.png (4.98 KiB) Viewed 4727 times
jmacnamara
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 132
Joined: Mon Nov 28, 2011 9:27 am

Re: Dwight's Camo Sprayshop

Post by jmacnamara »

The Jagdpanzer E-90 Krokodil by churchlakecity. Desaturated and recolored. Tracks darkened.
e90.png
e90.png (31.54 KiB) Viewed 4727 times
e90_Mask.png
e90_Mask.png (5.02 KiB) Viewed 4727 times
Post Reply

Return to “Panzer Corps : Scenario Design”