Need Info to Decipher the Texture Packer
Need Info to Decipher the Texture Packer
Hey, Anyone - can someone explain the process of how the files are packed and what the settings are to pack the files into the new png format!
Also, can you give examples along with the settings in the various csv files?
Thanks,
davinci
Also, can you give examples along with the settings in the various csv files?
Thanks,
davinci
Last edited by Davinci on Fri Dec 30, 2011 4:30 am, edited 1 time in total.
Reason: Spelling Error - again!
Reason: Spelling Error - again!
The only true logic is that, there is no true logic!
Re: Ned Info to Decipher the Texture Packer
Hi Davinci, I dont think the settings are too important as I have managed to get sprites into the game using the default settings. What is important is how you create the sprite sheet and the files which you use to do that have to be named correctly. Its easy to understand in my head but writing in words is abit tricky but hopefully it will make some sense.
I've only done it for units which is a different file to map textures but it should be the same and goes something like this:
For Units:
The old format of linking files was unitmodel -> unitgfx -> sprite sheet
The new format is unitmodel -> unitpack -> plist -> sprite sheet
Unitpack lists all the actions like stand, charge, melee, shoot etc that are listed in unitmodel. Here is the walk example for a Union infantry sprite in unitpack.
GFX_USA_Inf_01-1_Walk UI01W 1 0.8 16 14 30 0
Each action is associated with a Prefix, in this case UI01W. The game scans all the plists files to find this prefix. This means that when you first create your sprite sheet you have to name each file you import into Texture Packer first with the correct Prefix followed by 0001 for frame1 angle1, 0002 for frame1 angle2 etc untill all frames and angles are done. The numbering must be in the 4 digit format or the games crashes as i found out. If you browse the plist in wordpad you will see a long list of entries and you will see the Prefix and the numbering. At the end of the file is the physical sprite sheet that the plist is linked to, ignore the .png bit. Note it doesnt matter what you call the sprite sheet or the plist.
For textures:
Im not sure on the file linking but the followig might help you:
Lets say you have a picture of a tree, 1 angle and 1 frame. Name that picture say TREE0001.png. Load that into Texture Packer on a 512x512 and publish it using any filename and plist name of your choice. Convert the published png to dds. Then in the csv file for textures copy a tree entry and set angles and frames to 1. In the Prefix column put TREE. The game then looks at the plists files for the TREE prefix and loads up the angles and frames following the numbering, in this case there is only 1 frame and angle.
Hope that helps.
EDIT:
De-select Allow Rotation.
I've only done it for units which is a different file to map textures but it should be the same and goes something like this:
For Units:
The old format of linking files was unitmodel -> unitgfx -> sprite sheet
The new format is unitmodel -> unitpack -> plist -> sprite sheet
Unitpack lists all the actions like stand, charge, melee, shoot etc that are listed in unitmodel. Here is the walk example for a Union infantry sprite in unitpack.
GFX_USA_Inf_01-1_Walk UI01W 1 0.8 16 14 30 0
Each action is associated with a Prefix, in this case UI01W. The game scans all the plists files to find this prefix. This means that when you first create your sprite sheet you have to name each file you import into Texture Packer first with the correct Prefix followed by 0001 for frame1 angle1, 0002 for frame1 angle2 etc untill all frames and angles are done. The numbering must be in the 4 digit format or the games crashes as i found out. If you browse the plist in wordpad you will see a long list of entries and you will see the Prefix and the numbering. At the end of the file is the physical sprite sheet that the plist is linked to, ignore the .png bit. Note it doesnt matter what you call the sprite sheet or the plist.
For textures:
Im not sure on the file linking but the followig might help you:
Lets say you have a picture of a tree, 1 angle and 1 frame. Name that picture say TREE0001.png. Load that into Texture Packer on a 512x512 and publish it using any filename and plist name of your choice. Convert the published png to dds. Then in the csv file for textures copy a tree entry and set angles and frames to 1. In the Prefix column put TREE. The game then looks at the plists files for the TREE prefix and loads up the angles and frames following the numbering, in this case there is only 1 frame and angle.
Hope that helps.
EDIT:
De-select Allow Rotation.
Last edited by gunship24 on Fri Dec 30, 2011 4:39 am, edited 1 time in total.
Re: Ned Info to Decipher the Texture Packer
The only downside that I can see is that some units are jumpy. Because the texture packer frame size is inconsistent, the units seem to jump a little. I've got to figure this one out, as their has to be a good solution.
Re: Need Info to Decipher the Texture Packer
Gunship24 - Thanks, I'll try out the procedure and post back if I have any problems.
I'm still a little bit confused, but that's about normal for me !
Norb - not that I know which units you are speaking of, but shouldn't all of the units that are packed together be the same height?
Or are you saying that this doesn't matter; some of the units still jump ?
Jumping Topic - it's not even the new year and the forum seems to be jumping with a variety of new things to do, new things to download, and new information to absurd, it’s going to be a very good year!
davinci
I'm still a little bit confused, but that's about normal for me !
Norb - not that I know which units you are speaking of, but shouldn't all of the units that are packed together be the same height?
Or are you saying that this doesn't matter; some of the units still jump ?
Jumping Topic - it's not even the new year and the forum seems to be jumping with a variety of new things to do, new things to download, and new information to absurd, it’s going to be a very good year!
davinci
The only true logic is that, there is no true logic!
Re: Need Info to Decipher the Texture Packer
They are the same height, but I draw them from their base I think. And their base can change based on how much the packer was able to drop from the frame. Only a few units are noticeable, but it's something that I have to look into.
Re: Need Info to Decipher the Texture Packer
From afar it doesnt look to bad and even gives them a more individual feel to each sprite.
Re: Ned Info to Decipher the Texture Packer
gunship24 - Hey, I'm running into several problems.Convert the published png to dds.
If a tree is already in the dds format, am I supposed to convert it into a png format , and then load it into the TexturePacker as a png file.
How - does the png file convert back into the dds format from the program?
Thanks,
davinci
The only true logic is that, there is no true logic!
Re: Ned Info to Decipher the Texture Packer
I would just get the program and see how it works best for you. All we need is the output dds and plist.
Re: Need Info to Decipher the Texture Packer
Norb - I have the TexturePacker Program installed along with the code , I'm just not understanding how it works.I would just get the program and see how it works best for you. All we need is the output dds and plist.
davinci
Last edited by born2see on Sun Jan 01, 2012 11:11 am, edited 1 time in total.
The only true logic is that, there is no true logic!
Re: Need Info to Decipher the Texture Packer
Hi Davinci, now the SDK is out (thanks norb) I can see it a bit better. I think I answered your questions below.
To get a tree (that is one angle and frame) in the game I would do this:
1) First convert the tree to a png. Texture Packer doesnt import dds.
2) Before doing anything else you have to name the tree png precisely to how you want to reference it in the csv file followed by a precise numbering system used by the game. The format required is PrefixNNNN.png
Prefix is what you will put in gfxpack.csv column B so name is something useful.
NNNN is a number that must start at 0001, then go up for angles and frames. It needs to be four digits.
For example name your png DavTree0001.png, where DavTree is the Prefix that is required later and there is only one frame and angle.
3) Add the the tree into texture packer.
I use the following settings 4) Publish the png and plist file using any name so long as you dont edit it afterwards in windows.
5) Convert the published png to dds in an editor, photoshop, gimp etc
DDS now done the next part is editing the csv files.
5) Open gfxpack.csv and copy and paste the GFX_Orchard_1 entry
6) In column A name is something useful like GFX_DavTree1.
In column B replace Orchard_ with DavTree, as noted earlier this is the Prefix for the new tree sprite.
7) Put your dds, plist and gfxpack.csv into the mod folder
You now can add the new tree just like the others wherever they are called from.
To pack many trees into the same file you must name each png before importing into Texture Packer and all with a different Prefix, e.g. DavTreeOak0001.png, DavTreePine0001.png. Add all those into TexturePacker, publish and create the dds then add the appropriate entires into gfxpack for each tree using the Prefix's used. Note this is all based on 1 angle and 1 frame.
Some useful stuff i've found out:
1) You cant simply add a dds to an existing packed dds file because the plist associated with it also needs to be changed.
2) If you crash on "Loading Graphics" it means that there is an invalid entry in a plist somewhere that doesnt use the precise PrefixNNNN.png format which means the file was named incorrectly before it was imported to TexturePacker.
3) I think the game adds the packed sprites by scanning every plist file in the game and mod Packed directory, so remove those that were messed up, especially test ones used to figure it all out.
To get a tree (that is one angle and frame) in the game I would do this:
1) First convert the tree to a png. Texture Packer doesnt import dds.
2) Before doing anything else you have to name the tree png precisely to how you want to reference it in the csv file followed by a precise numbering system used by the game. The format required is PrefixNNNN.png
Prefix is what you will put in gfxpack.csv column B so name is something useful.
NNNN is a number that must start at 0001, then go up for angles and frames. It needs to be four digits.
For example name your png DavTree0001.png, where DavTree is the Prefix that is required later and there is only one frame and angle.
3) Add the the tree into texture packer.
I use the following settings 4) Publish the png and plist file using any name so long as you dont edit it afterwards in windows.
5) Convert the published png to dds in an editor, photoshop, gimp etc
DDS now done the next part is editing the csv files.
5) Open gfxpack.csv and copy and paste the GFX_Orchard_1 entry
6) In column A name is something useful like GFX_DavTree1.
In column B replace Orchard_ with DavTree, as noted earlier this is the Prefix for the new tree sprite.
7) Put your dds, plist and gfxpack.csv into the mod folder
You now can add the new tree just like the others wherever they are called from.
To pack many trees into the same file you must name each png before importing into Texture Packer and all with a different Prefix, e.g. DavTreeOak0001.png, DavTreePine0001.png. Add all those into TexturePacker, publish and create the dds then add the appropriate entires into gfxpack for each tree using the Prefix's used. Note this is all based on 1 angle and 1 frame.
Some useful stuff i've found out:
1) You cant simply add a dds to an existing packed dds file because the plist associated with it also needs to be changed.
2) If you crash on "Loading Graphics" it means that there is an invalid entry in a plist somewhere that doesnt use the precise PrefixNNNN.png format which means the file was named incorrectly before it was imported to TexturePacker.
3) I think the game adds the packed sprites by scanning every plist file in the game and mod Packed directory, so remove those that were messed up, especially test ones used to figure it all out.
- Attachments
-
- tp.jpg (24.43 KiB) Viewed 440 times
Last edited by gunship24 on Sun Jan 01, 2012 9:39 pm, edited 1 time in total.