New Sprite guide (Full Version)

All Forums >> [New Releases from Matrix Games] >> Armored Brigade >> MODS and Scenarios



Message


Issue8 -> New Sprite guide (11/24/2018 1:10:55 PM)

New Sprite guide
a5.jpg


This is a quick guide on how to introduce new sprites in the game, if anyone wants to customize or make their own versions. In this example, I will just re-paint an existing sprite, although completely new sprites can be made using this system. The pic below has a repainted T-72 Polish sprite.

I will use the painting program Gimp as an example, because it is freely available. Other programs (like Photoshop) can also be used in a similar way.

Before starting, I need to make a custom mod folder. It is exremely simple, but it should be done first, and the instructions are here:
http://www.matrixgames.com/forums/tm.asp?m=4558585
[img]https://i.imgur.com/ZbNYStO.jpg[/img]




Issue8 -> RE: New Sprite guide (11/24/2018 1:11:29 PM)

The first thing to do is find a sprite that I want to repaint. Vehicle sprites can be found in the folder data->graphics->vehicle, where the sprites are separated by faction folders. For example, the West German sprites are in the 'de' folder, the US sprites are in the 'us' folder, and the Polish sprites are in the 'pl' folder . . . The suffixes also identify what the sprites are. Usually _td means 'Turret Desert', _ts means 'Turret Summer', and _tw means 'Turret Winter.' Suffixes like _hs, _hd, and _hw are for the hull graphics. This is the game's naming convention, but any name can be used.

*note--unlike games such as Close Combat, where vehicle graphics are locked into files and must be extracted by third-party tools, AB sprites are simple png files and easy to access.

In this example, I will repaint a T-72 sprite.

It is best to find a sprite that doesn't have a camo pattern already, because that is easier to repaint. The Polish summer units are a general green color, so that makes them easier to work with. In the 'pl' folder I open the pl_t72_hs.png and the pl_T72_ts.png:

a1.jpg
[img]https://i.imgur.com/3zRsH16.jpg[/img]




Issue8 -> RE: New Sprite guide (11/24/2018 1:12:24 PM)

The next step is to desaturate the sprites, by going color->desaturate. I usually pick the 'luminance' option. If a desert sprites is used, like a desert M1a1, then sometimes the gray sprite needs to be darkened a bit by going colors->brightness and contrast, and then darkening the gray sprite a bit, but the Polish T72 is about the correct darkness:

a2.jpg
[img]https://i.imgur.com/p7jvi6X.jpg[/img]




Issue8 -> RE: New Sprite guide (11/24/2018 1:13:14 PM)

My next step is to create a new layer above they gray sprite, usually in 'overlay' or 'soft light' layer mode and use the paintbrush tool to paint new camo patterns.

a3.jpg
[img]https://i.imgur.com/zsoOWfr.jpg[/img]
a4.jpg
[img]https://i.imgur.com/R4YwGAg.jpg[/img]




Issue8 -> RE: New Sprite guide (11/24/2018 1:13:56 PM)

NOW--How do you get this in game?

I have exported my new T72 hull and turret, and I named them 'pl_t72_h_camo.png' and 'pl_t72_t_camo.png' to the 'pl' folder in the 'vehicle' folder. (For sprites, Armored Brigade uses the png file format.) That's great, but AB needs to know about these new sprites before it can display them.

Letting AB know which sprites are in the game is done via the resources_custom.xml in the custom dataset folder. EVERY sprite for every vehicle is named and registered in the file.

b2.jpg
[img]https://i.imgur.com/agwl4BY.jpg[/img]




Issue8 -> RE: New Sprite guide (11/24/2018 1:14:46 PM)

If I want to assign my new sprite to a unit, I must open the resources_custom.xml in a text editor and add the unit to the list. Usually, I just add the sprite names to the end of the list, following this format by simply copy/pasting another and changing the names. The lines include the new names and the file locations.

b3.jpg
[img]https://i.imgur.com/wKnxNjz.jpg[/img]

OK! now I can start the game with my custom dataset.

b4.jpg
[img]https://i.imgur.com/cdEmIa6.jpg[/img]




Issue8 -> RE: New Sprite guide (11/24/2018 1:15:21 PM)

Open the database editor from the main screen, and find the Polish T-72 in the units tab to assign the new sprites. (The unit ID# is 686)
Remember to save the changes when finished.

b5.jpg
[img]https://i.imgur.com/TaOEnYs.jpg[/img]




Issue8 -> RE: New Sprite guide (11/24/2018 1:15:55 PM)

If done correctly, then new sprite should show up in the purchase screen and in-game.

b6.jpg
[img]https://i.imgur.com/YGgRiy5.jpg[/img]
b7.jpg
[img]https://i.imgur.com/pM9CYUX.jpg[/img]




exsonic01 -> RE: New Sprite guide (11/24/2018 3:35:00 PM)

Great tutorial! Is this photoshop you used to change colors and patterns? May I ask how do you change camouflage patterns from photoshop?




Issue8 -> RE: New Sprite guide (11/24/2018 4:01:12 PM)


quote:

ORIGINAL: exsonic01

Great tutorial! Is this photoshop you used to change colors and patterns? May I ask how do you change camouflage patterns from photoshop?


This example is with Gimp, but Photoshop does a fine job also.


The major steps to re-painting a sprite is to
(1) Find a suitable starting sprite to repaint that is generally a single color like green or desert yellow.
(2) Make the sprite black and white by desaturating it. In Photoshop this can be done with a Hue/Saturation/Value adjustment. Just slide the Saturation value all the way down.
(3) create a new layer on top for the camo color, usually in 'overlay' or 'soft light' mode.
(4) paint it however you like and export it as a png file.
(5) register the sprite in the resources_custom.xml and then assign it in the database editor.

Any raster editor can work, as long as it can create png image files.





O.Schmidt -> RE: New Sprite guide (1/1/2019 9:09:57 AM)

I almost finished Stridsvagn 103 (Sweden)! Do I have to consider a size (scale)? This is 9,80m x 3,60m!
How do I translate this into pixels?

[image]local://upfiles/48169/F92617B11B3C44308162FF9BED52E2A9.jpg[/image]




22sec -> RE: New Sprite guide (1/1/2019 5:45:15 PM)


quote:

ORIGINAL: O.Schmidt

I almost finished Stridsvagn 103 (Sweden)! Do I have to consider a size (scale)? This is 9,80m x 3,60m!
How do I translate this into pixels?

[image]local://upfiles/48169/F92617B11B3C44308162FF9BED52E2A9.jpg[/image]


The sprite scale is 25.6, so multiply the size by 25.6 to get number of pixels.




Veitikka -> RE: New Sprite guide (1/2/2019 3:24:05 PM)


quote:

ORIGINAL: 22sec

The sprite scale is 25.6, so multiply the size by 25.6 to get number of pixels.


Every unit has the 'spriteScale' attribute that can be adjusted in the data editor.




Perturabo -> RE: New Sprite guide (1/2/2019 10:49:16 PM)

Does anyone know any tutorial for making vehicle sprites from scratch in GIMP or something similar?




SchnelleMeyer -> RE: New Sprite guide (1/3/2019 12:07:41 PM)

Here are some tips:
http://www.closecombatseries.net/CCS/modules.php?name=Forums&file=viewtopic&t=8238&postdays=0&postorder=asc&highlight=mod+tanks&start=60

Edit: For best results why not go for free 3D models that you render out in Blender as 2D images. That will take care of light, shadow and the whole depth of the vehicle - giving a realistic resulting sprite. This is also how the original game sprites were made.




O.Schmidt -> RE: New Sprite guide (1/23/2019 5:54:20 PM)

Finish with the Swedish Strv 103/0 / B / C!
Zip File is coming!
Thanks for your help!

[image]local://upfiles/48169/4B1E0A629A2E4E6E979CB0873FC157FC.jpg[/image]




O.Schmidt -> RE: New Sprite guide (1/23/2019 5:59:10 PM)

The Zip File!




nikolas93TS -> RE: New Sprite guide (1/23/2019 6:07:57 PM)

Great looking sprite!




Jace11 -> RE: New Sprite guide (9/29/2019 3:36:18 PM)

Had a quick try at this in Photoshop to make a camo scheme for the Russian T-80BV..



[image]https://i.imgur.com/GzQmx5G.png[/image]




Jace11 -> RE: New Sprite guide (10/1/2019 8:24:43 PM)

Here is the sprite from the pic above. If you want to install it, copy it to your data/graphics/vehicle/su folder. It will overwrite the original green version, so back those up first.




MGK4167 -> RE: New Sprite guide (4/27/2020 8:43:43 PM)

Team

I've found out how to move the location of the turret around the hull, and how to move the commander so that he appears over his hatch, but can I change the point of rotation of the turret itself? The turret seems to rotate around the centre of the turret png but, because of the gun, this can make the rear of the turret swing outside of the hull. How can I change the centre of rotation of the turret please? Thank you




Mr_Luxury_Yacht -> RE: New Sprite guide (4/27/2020 10:11:53 PM)

Extend the sprite with empty transparent space so that the center of the sprite (including the space) is the pivot point of the turret.

Take a look at some of the base game sprites to see what I mean. Notice how the turret sprite ends at the gun at the top but extends past it at the bottom? That's how you adjust the point around where the turret will turn.




MGK4167 -> RE: New Sprite guide (4/29/2020 5:16:38 AM)

Brilliant! Did the trick!
Thank you for your prompt and useful response.

Cheers




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.859375