Help with Packing Sprites

This is where our experts try to teach you the very flexible modding system for our previous release - SOW Gettysburg and its add-ons. It's powerful, but dangerous. Post your tips and your questions.
Stu
Reactions:
Posts: 2
Joined: Tue Oct 08, 2013 11:31 pm

Help with Packing Sprites

Post by Stu »

Hello,

I hope that someone may be kind enough to give me some help with how to get new sprites packed up and into the game.

I have owned and played SoW for a long time and enjoy it very much. I have never played mulitplayer or posted here at the forum but I have taken advantage of the brilliant mods and maps that have been created.

I have done some modding in the past. Mainly for American Conquest with the Hawks Club. I am interested in giving modding for Sow a go. I like to start of small and learn how to do things properly so I am just trying to figure out how to pack sprites and get them in the game.

I have looked through the forum and found references to the Texture Packer program that is used but I could not find a tutorial or guide which is what I very much need. I looked on the Take Command forum and found a very old guide to sprite creation and packing that was helpful but I think things have probably moved on since that was written and it is not specifically for SoW.

The advice I need relates to two topics:

1. Rendering (not camera set up or the 16 angles required etc, that is self explanatory) but what type of file should I render to and what size do the individual images need to be?

2. Once everything is rendered how to then go about getting the images packed up and into the game. If someone could explain the process that would be great.

Thanks in advance. Modding, I know is difficult and requires bundles of patience, I don't know whether I will be able to successfully create anything but I would certainly like to try with your help.

Below are a couple of examples of some models I have created and animated.

Stu

Image

Image

Image

Image
Grog
Reactions:
Posts: 248
Joined: Sat Mar 20, 2010 10:09 pm

Re: Help with Packing Sprites

Post by Grog »

Nice work Stu.

I, and some others, would be very interested too.

Gunship very kindly released the rest of the unpacked sprites for the Nap mod and it would be good to get these into game in the packed format.

I downloaded the aforementioned sprite packer, which is available to try out for 7 days freely, if I remember right.

Not had chance to give it a real try but it would be good to get a few pointers, especially since some of the walkthroughs on the site relate to its use with other engines.

Best of luck :)
gunship24
Reactions:
Posts: 728
Joined: Mon Jan 31, 2011 1:31 am

Re: Help with Packing Sprites

Post by gunship24 »

Hi Stu,

Modding requires a bit of time but is great when you get it right. The program you should ultimately use to make the sprite sheets is Texture Packer (its a bout $25 i think). Once you have all the individual angles and frames rendered out in png (i recall that is what texture packer uses) from whatever program you are using import those into texture packer and start making sprite sheets. To understand what is required for the game take a look at the existing sprite sheets and csv files (you will need the SDK). From these you can work out what the format of everything that is required.
Last edited by gunship24 on Thu Oct 10, 2013 1:45 am, edited 1 time in total.
Grog
Reactions:
Posts: 248
Joined: Sat Mar 20, 2010 10:09 pm

Re: Help with Packing Sprites

Post by Grog »

Thanks Gunship

One question re converting your other sprites for packing.

I presume that the individual images (which I believe, offhand, are 120x120 pix)will need to be copied and saved as individual png files and then put in folders containing all 64 for that sheet. I also presume this folder can be just dragged over onto Texture Packer.

WOULD I KEEP THIS FOLDER NAME THE SAME AS THE NAME OF THE ORIGINAL SHEET?

WOULD EACH OF THE 64 IMAGES NEED INDIVIDUALLY NAMING? Perhaps just numbering them 1-64 would be OK?

Thanks
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

Re: Help with Packing Sprites

Post by Davinci »

I presume that the individual images (which I believe, offhand, are 120x120 pix)will need to be copied and saved as individual png files and then put in folders containing all 64 for that sheet. I also presume this folder can be just dragged over onto Texture Packer.
Grog - hey, how is everything going!

Are you sure that the images would have to be cut into single files and then place into the Texture packer ?

After reading this, I move a whole sheet of one of the units into the TP and it seemed to accept it.

I didn't go any farther than that, so I'm not sure if it would work correctly, but cutting the units into single sheets would be a thousand individual images for each uniform.

It's sort of hard to believe that someone on the team would have done it that way!

Thoughts?

davinci
The only true logic is that, there is no true logic!
Grog
Reactions:
Posts: 248
Joined: Sat Mar 20, 2010 10:09 pm

Re: Help with Packing Sprites

Post by Grog »

All good thanks Dav

Yourself? What's keeping you busy these days?

I'm doing the final stages of the Nap portraits mod. Should be up by the end of the week but no promises ;)

After a period of refining the mod and converting some oob's, I will have a go at converting the sprites, if that's ok with Gunship24

If successful, the Russian and Prussian portraits will get finished.


Dragging the whole sheets over to TP will, as you said, save a whole lot of time. I presumed Gun had the individual images.

Thank you for this info, fella :)

Mike
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

Re: Help with Packing Sprites

Post by Davinci »

Yourself? What's keeping you busy these days?
The 10MileMap as usual, I'm up to 6000 fences, and 1100 structures, I'm still trying to find the breaking point.
Dragging the whole sheets over to TP will, as you said, save a whole lot of time. I presumed Gun had the individual images.
I think that you are correct, I've just tried dragging multiple sheets into the TP and it didn't work out too well. They placed each sheet on top of the previous one.

The only way that I could some-what get it to work was to expand the sheets into 4096x4096 but it didn't save properly.

But, then-again.....I have absolutely no knowledge about what I'm doing, or suppose to be doing!

davinci
The only true logic is that, there is no true logic!
Grog
Reactions:
Posts: 248
Joined: Sat Mar 20, 2010 10:09 pm

Re: Help with Packing Sprites

Post by Grog »

Dude, when you retire you could be the official battlefield guide. I'll campaign on your behalf to conserve areas from development or freeway construcion :)

Looking forward to seeing the next version. I really liked the new trees. Perhaps another Frapps fly over vid? The one I did last year got a lot of views.

Shame about the sprite prob. I recon copying each one might not be too bad with aid of a multiple clipboard programme.
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

Re: Help with Packing Sprites

Post by Davinci »

Looking forward to seeing the next version. I really liked the new trees. Perhaps another Fraps fly over vid? The one I did last year got a lot of views.
Great Idea, and thanks for the last one that you did!
Shame about the sprite prob. I recon copying each one might not be too bad with aid of a multiple clipboard program.
The only problem that I see is that it has to be done exactly right, any mess-up means that you would have to start over since there is not a way of inserting a single frame into that program. Or to put that another way, they have to be in an exact order to function properly.

So, the purpose of the Program is to reduce the amount of files that the game will use to render a soldier, correct?

I'm wondering if it matters if the game uses three png files to render a solder, or if the game uses ten png files to render that same soldier. Would this slow down the game.

Hmm, I'll probably keep experimenting with this off and on to see if I can come up with another way of doing it that doesn't require splicing a thousand individual sprites per uniform.

BTW - If you purchased the TP when it first came out, there was an Update from the developer not too long ago.

davinci
The only true logic is that, there is no true logic!
gunship24
Reactions:
Posts: 728
Joined: Mon Jan 31, 2011 1:31 am

Re: Help with Packing Sprites

Post by gunship24 »

Thanks Gunship

One question re converting your other sprites for packing.

I presume that the individual images (which I believe, offhand, are 120x120 pix)will need to be copied and saved as individual png files and then put in folders containing all 64 for that sheet. I also presume this folder can be just dragged over onto Texture Packer.

WOULD I KEEP THIS FOLDER NAME THE SAME AS THE NAME OF THE ORIGINAL SHEET?

WOULD EACH OF THE 64 IMAGES NEED INDIVIDUALLY NAMING? Perhaps just numbering them 1-64 would be OK?

Thanks
Hi Grog,
Its time consuming but can be done. Yes you would need to 'cut up' all the non-packed sprite sheets to individual 120x120 pngs, then taking one animation at a time rename the sprites something sensible like "FR_Inf_Firingxxxx", where xxxx is a number from 0000 to 9999 (for a 16 frame, 16 angle animation this will be 0000 to 0256, starting at frame 1 angle 1 to frame 16 angle 16). Note: what ever you call them will be used by the csv files. Once you have done all that for all animations you can then import them into texture packer, save the sprite sheets as what ever you want and convert to dds, voila!

I dont have individual sprites for the old stuff because i wrote a script in 3dsmax that created the whole sheet in one go.

Note: texture packer has a "feature" that if you import to many sprites at once and it cant fit them into the specified file size then it will stack them all on top of each other. try deleting some to cure this problem.
Last edited by gunship24 on Sun Oct 13, 2013 1:55 pm, edited 1 time in total.
Post Reply