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.
Grog
Reactions:
Posts: 248
Joined: Sat Mar 20, 2010 10:09 pm

Re: Help with Packing Sprites

Post by Grog »

Thank you Gunship24

Just the answer I was asking for, although perhaps not the answer that I would have liked most :)

Makes me realise just how much work you put into this mod. Thanks again for all that hard work.

It will be some time before I even get started on this but if I get any done successfully, I will post them here.
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

Re: Help with Packing Sprites

Post by Davinci »

Thank you Gunship24

Just the answer I was asking for, although perhaps not the answer that I would have liked most :)
WOW.....I was dead-wrong on this one, I can't even imagine how long that would take to do multiple uniforms.

I think that I will pass on converting the TC2M uniforms into the packed-format!

Good Luck Grog .....You have a bit more patience than I have.

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 »

It is a long procress :(.

Sprite sheet cutting-up aside, i did things to speed up the process. I created a script in 3dsmax that rendered out every frame and angle in sequence labelled 1 to 256 (for 16 frames). Then using a free file rename program i added a prefix that automatically renamed everything at the click of a button keeping the number sequence. Then i would bulk import the png's into texture packer until the sprite sheet was full, save and then repeat until all sprites were in sheets (about 3 or 4 sheets in total). Then bulk convert the sheets to dds. Once I was at the point to rendering out it only took about 20mins to create the sheets.

There might be a free bulk cutting program.

With TC2M is was even quicker since my script in 3dsmax actually made the sprite sheet for me. All i had to do was convert to dds.

90% of the time was the 3d import and adjustment in 3dsmax. That probably explains why i did so many units.
Last edited by gunship24 on Wed Oct 16, 2013 10:19 pm, edited 1 time in total.
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

Re: Help with Packing Sprites

Post by Davinci »

gunship24 - Thanks, for the info.

Question - did you have to go back over the units and add in the Alpha-Channel ?

I remember doing that with the ground-textures since the png files don't have an Alpha-Channel.

But, it is possible that I did it wrong.

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 »

Hi Davinci.

I have heard people talking about alpha channels. To be honest i dont know what they are, nor did i do anything with them. I created pngs files straight off the bat and compressed them to DDS DX5, seemed to work for me. Maybe i should have used them?
Davinci
Reactions:
Posts: 3034
Joined: Wed Jul 02, 2008 12:53 pm

Re: Help with Packing Sprites

Post by Davinci »

I created pngs files straight off the bat and compressed them to DDS DX5, seemed to work for me. Maybe i should have used them?
OK, Thanks gunship for the information, the Version of Photoshop that I'm using only gave me the options of Saving As - [None] or [Interlaced] , so that might have something to do with going back and adding the Alpha-Channel .

Hopefully, Grog has a work-around with doing the files.

davinci
The only true logic is that, there is no true logic!
Stu
Reactions:
Posts: 2
Joined: Tue Oct 08, 2013 11:31 pm

Re: Help with Packing Sprites

Post by Stu »

Thank you for the help so far.

I have been experimenting with the texture packer and packing the sprite animations seems to work fine and I can come up with a sprite sheet png file that looks good.

However, when I convert them to DDS format the quality goes completely and the sprites become very pixellated and blocky.

Is this a problem with the way in which I originally rendered them or a problem with the conversion to DDS do you think?

I use Poser and I rendered the sprite animations in 128 x 128 pixel images as png files using high standard render settings.

To convert to DDS I used a freeware program. I tried a couple of others but the results were the same...

Any help or thoughts would be appreciated,

thanks,

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

Re: Help with Packing Sprites

Post by Grog »

Stu

From my understanding, there is likely to be some deterioration when converting to dds. I use GIMP and convert (export) using the dx5 setting, as gunship states. Mipmaps off. My portraits havnt been changed much in quality.

Make any changes on the png copy and just export once to dds to reduce loss of quality.


Other than this, I cant help more.

Gimp is a free program. Much recommended.
Marching Thru Georgia
Reactions:
Posts: 1769
Joined: Mon Mar 29, 2010 9:56 pm

Re: Help with Packing Sprites

Post by Marching Thru Georgia »

I wrote a couple of scripts for Gimp which somewhat automates the process of converting the TC2M sprites into the new packed version. One takes a TC2M sheet and creates separate PNGs each named and numbered properly. Since it's a batch program, it will handle as many sheets all at once as you like. On my machine, it will create ~2500 pngs,(one infantry class), in a couple of minutes. The second script will take the packed sheets that Texture Packer creates and convert them into dds files. Again it is a batch program, so it will do as many as it is given. It only takes a second to do the conversion.

The real bottleneck is Texture Packer and the practical needs of player's computers. I converted Gunship's Prussian sprites in just a couple hours and put them on large sheets of 4096X 2048 & 4096X4096. SOW ran them very well. Then Norb threw cold water on me and told me that older graphics cards had problems running such large textures. So I need to redo them and jigger the sprites around so they will fit on 2048X2048 sheets. That's what takes time. Bummer. :(

Now we just need to convince Gunship to create a few more sprites to flesh out the armies.
I can make this march and I will make Georgia howl.
Grog
Reactions:
Posts: 248
Joined: Sat Mar 20, 2010 10:09 pm

Re: Help with Packing Sprites

Post by Grog »

Great news MTG!

Now, I'm just gonna have to finish the Prussian and Russian portraits. Damn you, you guys work me too hard :laugh:

Hang round for 30mins, Nap portrait mod (lite version coming up) ;)
Post Reply