Page 2 of 6 FirstFirst 123456 LastLast
Results 21 to 40 of 116

Thread: Texture Atlas Files

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Johan217's Avatar Campidoctor
    Join Date
    Jan 2005
    Location
    Gent, Belgium
    Posts
    1,965

    Default Re: Texture Atlas Files

    I was able to make a new unit show up correctly. The key appears to be in the uniforms table.

    In this example, I cloned the existing Portuguese Line Infantry (Inf_Line_Portuguese_Infantry) into a new unit named AOR_Inf_Line_Portuguese_Infantry and made it recruitable by Spain. Without any further changes to the units or unit_stats_land tables, I added this to the uniforms table:

    Code:
    Inf_Line_Portuguese_Infantry	spain	Portugal_Inf_Line_Portuguese_Infantry	AOR_Inf_Line_Portuguese_Infantry
    The result:


    Model, texture and unit card/info pic show up correctly. The only problem is that the unit card has its own colour, while the skin uses the faction colour (white for Spain in this case). It seems the musicians, flag bearer and officer models are somehow tied to the unit automatically, because they show up correctly too.

    I made a test pack that adds just this one unit, for reference: http://www.filefront.com/15778337/aortest.zip
    Rock 'n' roll is the only religion that will never let you down

  2. #2

    Default Re: Texture Atlas Files

    Hello Johan, thanks for your example! I experienced the same as I created the "British 95th Rifles" as clones from the vanilla Rifles. They appear in the red faction colour instead of using the "Green Jackets".

    But now we are one step further and can assign vanilla uniforms to custom units.

  3. #3

    Default Re: Texture Atlas Files

    Great work Johan +Rep

    Now we just need to work out how to create our own units that use the individual body parts. Then we can completely customise them. Also being able to add textures to the faction dds files would be handy.


    Quote Originally Posted by Swiss Halberdier View Post
    Hello Johan, thanks for your example! I experienced the same as I created the "British 95th Rifles" as clones from the vanilla Rifles. They appear in the red faction colour instead of using the "Green Jackets".

    But now we are one step further and can assign vanilla uniforms to custom units.

    I believe that may be to do with the colour mask associated with each model part. Perhaps you could create a new version of the parts/textures and somehow get the unit to use those?

    Hello LM, it seems that the table "uniforms" does contain some interesting relations too. Each unit is there listed with the related faction and two other values that are probably pointing to the model/mesh. I didn't have any luck in creating a new unit though.
    Yes I saw this. I tried changing the uniform entry in the db and it causes the game to assign that units texture to whatever model you have specified. I had to change the directories in the unit_variant also, but it is possible to swap the tiles on the dds around between units
    Last edited by Lord Mongsworth; March 09, 2010 at 03:04 AM.


  4. #4

    Default Re: Texture Atlas Files

    Quote Originally Posted by Lord Mongsworth View Post
    Yes I saw this. I tried changing the uniform entry in the db and it causes the game to assign that units texture to whatever model you have specified. I had to change the directories in the unit_variant also, but it is possible to swap the tiles on the dds around between units
    Great work. So you have to make the change both places. This worked for both meshes and textures? Did you try equipment?

  5. #5
    Smirk's Avatar Libertus
    Join Date
    Apr 2009
    Location
    United Kingdom of Great Britain
    Posts
    92

    Default Re: Texture Atlas Files

    To colour your units in game you can add your unit to 'uniforms_to _faction_colours'.

    The three sets of RGB values are for torso, collar/cuffs/second trouser colour, and legs respectively.

    Or specifically: the first field modifies anything RED on the colour mask file for the unit's TORSO, the second modifies anything GREEN on the colour mask file for the unit's TORSO & LEGS, and the third modifies anything RED on the colour mask file for the unit's LEGS.

    Smirk
    Last edited by Smirk; March 09, 2010 at 08:07 AM.

  6. #6

    Default Re: Texture Atlas Files

    double post. delete please.
    Last edited by Lord Mongsworth; March 09, 2010 at 02:34 AM.


  7. #7
    Johan217's Avatar Campidoctor
    Join Date
    Jan 2005
    Location
    Gent, Belgium
    Posts
    1,965

    Default Re: Texture Atlas Files

    I can't open the uniforms_to_faction_colours table in PFM yet (I suppose an update will be coming). It looks like the new system will allow us to make complete overhauls without the need of ever opening Photoshop
    Rock 'n' roll is the only religion that will never let you down

  8. #8
    Smirk's Avatar Libertus
    Join Date
    Apr 2009
    Location
    United Kingdom of Great Britain
    Posts
    92

    Default Re: Texture Atlas Files

    Download the NTW_PFM from the tools thread and add this (in alphabetical order) to the DBFileTypes_0 text doc in the PFM's folder:

    uniform_to_faction_colours [Enter a tab here] Unit ID,String;
    Faction ID,String;
    R1,UInt32;G1,UInt32;B1,UInt32;
    R2,UInt32;G2,UInt32;B2,UInt32;
    R3,UInt32;G3,UInt32;B3,UInt32


    Then you can open the table.

  9. #9

    Default Re: Texture Atlas Files

    Quote Originally Posted by erasmus777 View Post
    Great work. So you have to make the change both places. This worked for both meshes and textures? Did you try equipment?
    Not yet, I may give it a shot

    And It seems to be possible to interchange anything between units of the same faction - whatever is on the atlas files and whatever meshes are used. I haven't tried to add a new one as I wouldn't know what to do with all the hex numbers etc

    Is there anything relating to these parts (groupings/entries for each unit) in the db tables that I can't see in PFM?

    Quote Originally Posted by Smirk View Post
    Download the NTW_PFM from the tools thread and add this (in alphabetical order) to the DBFileTypes_0 text doc in the PFM's folder:

    uniform_to_faction_colours [Enter a tab here] Unit ID,String;
    Faction ID,String;
    R1,UInt32;G1,UInt32;B1,UInt32;
    R2,UInt32;G2,UInt32;B2,UInt32;
    R3,UInt32;G3,UInt32;B3,UInt32


    Then you can open the table.
    Nice one, again +Rep
    Last edited by Lord Mongsworth; March 09, 2010 at 07:17 AM.


  10. #10

    Default Re: Texture Atlas Files

    Quote Originally Posted by Smirk View Post
    To colour your units in game you can add your unit to 'uniforms_to _faction_colours'.

    The three sets of RGB values are for torso, collar/cuffs/second trouser colour, and legs respectively.

    Or specifically: the first field modifies anything RED on the colour mask file for the unit's TORSO, the second modifies anything GREEN on the colour mask file for the unit's TORSO & LEGS, and the third modifies anything RED on the colour mask file for the unit's LEGS.
    Smirk
    Hello Smirk, thanks for this information! +rep

    I added now the right colour scheme to my custom unit.

    Quote Originally Posted by Johan217 View Post
    I can't open the uniforms_to_faction_colours table in PFM yet (I suppose an update will be coming). It looks like the new system will allow us to make complete overhauls without the need of ever opening Photoshop
    Yes that would be great if we could make new uniforms with customized atlas files.

  11. #11
    maxsim666's Avatar Miles
    Join Date
    May 2008
    Location
    Ancona Italy
    Posts
    329

    Default Re: Texture Atlas Files

    Hi pals
    did you try with Hex editor (I use Hex Workshop) to cut and past parts from an atlas file to another, with variant file of same faction it worked fine (I swapped parts from an unit to another of the same faction but for different factions it failed and I guess it is about atlas and dds contained in atlas directory of variantmodels pack file)
    I saw that in atlas files like in variant ones you can plainly read what parts are in them with path strings pointing to the single parts file in variantmodels.pack variantmodels\unitparts\euro\.... such as V.a.r.i.a.n.t.M.o.d.e.l.s./.U.n.i.t.P.a.r.t.s./.E.u.r.o./.H.a.t.s./.F.r.e.n.c.h._.D.r.a.g.o.o.n._.H.e.l.m.e.t./.t.e.x./.t.e.x.t.u.r.e._.c.o.l.o.u.r._.m.a.s.k...d.d.s and
    V.a.r.i.a.n.t.M.o.d.e.l.s./.U.n.i.t.P.a.r.t.s./.E.u.r.o./.H.a.t.s./.F.r.e.n.c.h._.D.r.a.g.o.o.n._.H.e.l.m.e.t./.t.e.x./.t.e.x.t.u.r.e._.c.o.l.o.u.r
    (this two strings are from an atlas colour file but same is for diffuse, gloss and normal atlas file).
    Such strings are easily readable, but the trouble, almost for me, is in dds files coupled to atlas, there are not readable strings, so I need to find out a method to find identical string in dds and atlas files for factions,
    Another issue is that I don't know if characters before path strings in atlas belongs to previous or to subsequent path string like in this example: @>.. ?...=...=...C...C are before string V.a.r.i.a.n.t.M.o.d.e.l.s./.U.n.i.t.P.a.r.t.s./.E.u.r.o./.H.a.t.s./.F.r.e.n.c.h._.G.r.e.n.a.d.i.e.r._.S.h.a.k.o./.t.e.x./.t.e.x.t.u.r.e._.c.o.l.o.u.r
    in file france_colour_mask.atlas .
    In same file are there these strings: ............ with hexadecimal offset 01 00 00 00 00 00 00 00 C0 00 00 00 at the start of it and 8>..`?...<...<...B...B with hexadecimal offset 38 3E 00 00 60 3F 00 00 00 3C 00 00 00 3C 00 00 00 42 00 00 00 42 are there about file start attribute and file end or are informations about mesh and textures?
    My knowledge about file structure is very poor
    Another question: is it a limited number of entry such as hats, legs, torsos, heads, hands, belts in atlas and dds file in variantmodels\atlas directory or you can add how many as you like? I ask so because there are some entries like this B.l.a.n.k.T.e.x.t.u.r.e that makes me thinking that are reserved fot further and new entries such as new DLC's units
    Last edited by maxsim666; March 14, 2010 at 05:27 AM.
    "In hostem celerrime volant"


    - Voloire -

  12. #12

    Default Re: Texture Atlas Files

    The format for these files is as follows:

    8 bytes: identifier, should be 01 00 00 00 00 00 00
    4 bytes: (ulong) number of items in the atlas
    then for each item:
    512 bytes: zero-padded wide string containing category
    512 bytes: zero-padded wide string containing file name of the texture if it had not been put in the atlas, the game uses this file name to look for the texture.
    8 bytes: (two floats) top left corner in texture units of the part the atlas texture that is for this texture
    8 bytes: (two floats) width and height in texture units
    8 bytes: (two floats) width and height in pixels.

    What an example may look like (this is the first part of france_diffuse.atlas and the associated .dds from the NTW demo), see also the attachment for a visual explanation.
    01 00 00 00 00 00 00 00
    6A 00 00 00: 106 items
    -- Item 1 --
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 48 00 65 00 61 00
    64 00 73 00 2F 00 4E 00 61 00 70 00 6F 00 6C 00 65 00 6F 00 6E 00 5F 00 48 00 65 00 61 00 64 00
    2F 00 54 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    : VariantModels/UnitParts/Euro/Heads/Napoleon_Head/Tex/texture
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 48 00 65 00 61 00
    64 00 73 00 2F 00 4E 00 61 00 70 00 6F 00 6C 00 65 00 6F 00 6E 00 5F 00 48 00 65 00 61 00 64 00
    2F 00 54 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 5F 00 64 00 69 00 66 00
    66 00 75 00 73 00 65 00 2E 00 64 00 64 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    : VariantModels/UnitParts/Euro/Heads/Napoleon_Head/Tex/texture_diffuse.dds
    00 00 00 00 00 00 00 00: 0.0 x 0.0
    00 00 00 3E 00 00 00 3E: 0.125 x 0.125 -> so the bottom right of this atlas item is one eighth of the atlas texture width to the right and one eighth of the atlas texture height down (starting from the previous coordinate).
    00 00 00 44 00 00 00 44: 512.0 x 512.0 -> this part of the atlas is 512x512 pixels in size.
    -- Item 2 --
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 4C 00 65 00 67 00
    73 00 2F 00 42 00 72 00 69 00 74 00 69 00 73 00 68 00 5F 00 4C 00 69 00 67 00 68 00 74 00 5F 00
    49 00 6E 00 66 00 61 00 6E 00 74 00 72 00 79 00 5F 00 54 00 72 00 6F 00 75 00 73 00 65 00 72 00
    73 00 2F 00 74 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    : VariantModels/UnitParts/Euro/Legs/British_Light_Infantry_Trousers/tex/texture
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 4C 00 65 00 67 00
    73 00 2F 00 42 00 72 00 69 00 74 00 69 00 73 00 68 00 5F 00 4C 00 69 00 67 00 68 00 74 00 5F 00
    49 00 6E 00 66 00 61 00 6E 00 74 00 72 00 79 00 5F 00 54 00 72 00 6F 00 75 00 73 00 65 00 72 00
    73 00 2F 00 74 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 5F 00 64 00 69 00
    66 00 66 00 75 00 73 00 65 00 2E 00 64 00 64 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    : VariantModels/UnitParts/Euro/Legs/British_Light_Infantry_Trousers/tex/texture_diffuse.dds
    00 00 00 3E 00 00 00 00: 0.125 x 0.0
    00 00 00 3E 00 00 00 3E 0.125 x 0.125
    00 00 00 44 00 00 00 44 512.0 x 512.0
    etc.

    If you want to copy and paste from one atlas to another you would copy from the name of the category up to (but not including) the name of the next item's category. Be sure to also fix the coordinates, otherwise you'd get some random part of another texture.

  13. #13

    Default Re: Texture Atlas Files

    Quote Originally Posted by just View Post
    The format for these files is as follows:

    8 bytes: identifier, should be 01 00 00 00 00 00 00
    4 bytes: (ulong) number of items in the atlas
    then for each item:
    512 bytes: zero-padded wide string containing category
    512 bytes: zero-padded wide string containing file name of the texture if it had not been put in the atlas, the game uses this file name to look for the texture.
    8 bytes: (two floats) top left corner in texture units of the part the atlas texture that is for this texture
    8 bytes: (two floats) width and height in texture units
    8 bytes: (two floats) width and height in pixels.

    What an example may look like (this is the first part of france_diffuse.atlas and the associated .dds from the NTW demo), see also the attachment for a visual explanation.
    01 00 00 00 00 00 00 00
    6A 00 00 00: 106 items
    -- Item 1 --
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 48 00 65 00 61 00
    64 00 73 00 2F 00 4E 00 61 00 70 00 6F 00 6C 00 65 00 6F 00 6E 00 5F 00 48 00 65 00 61 00 64 00
    2F 00 54 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    : VariantModels/UnitParts/Euro/Heads/Napoleon_Head/Tex/texture
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 48 00 65 00 61 00
    64 00 73 00 2F 00 4E 00 61 00 70 00 6F 00 6C 00 65 00 6F 00 6E 00 5F 00 48 00 65 00 61 00 64 00
    2F 00 54 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 5F 00 64 00 69 00 66 00
    66 00 75 00 73 00 65 00 2E 00 64 00 64 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    : VariantModels/UnitParts/Euro/Heads/Napoleon_Head/Tex/texture_diffuse.dds
    00 00 00 00 00 00 00 00: 0.0 x 0.0
    00 00 00 3E 00 00 00 3E: 0.125 x 0.125 -> so the bottom right of this atlas item is one eighth of the atlas texture width to the right and one eighth of the atlas texture height down (starting from the previous coordinate).
    00 00 00 44 00 00 00 44: 512.0 x 512.0 -> this part of the atlas is 512x512 pixels in size.
    -- Item 2 --
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 4C 00 65 00 67 00
    73 00 2F 00 42 00 72 00 69 00 74 00 69 00 73 00 68 00 5F 00 4C 00 69 00 67 00 68 00 74 00 5F 00
    49 00 6E 00 66 00 61 00 6E 00 74 00 72 00 79 00 5F 00 54 00 72 00 6F 00 75 00 73 00 65 00 72 00
    73 00 2F 00 74 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    : VariantModels/UnitParts/Euro/Legs/British_Light_Infantry_Trousers/tex/texture
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 4C 00 65 00 67 00
    73 00 2F 00 42 00 72 00 69 00 74 00 69 00 73 00 68 00 5F 00 4C 00 69 00 67 00 68 00 74 00 5F 00
    49 00 6E 00 66 00 61 00 6E 00 74 00 72 00 79 00 5F 00 54 00 72 00 6F 00 75 00 73 00 65 00 72 00
    73 00 2F 00 74 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 5F 00 64 00 69 00
    66 00 66 00 75 00 73 00 65 00 2E 00 64 00 64 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    : VariantModels/UnitParts/Euro/Legs/British_Light_Infantry_Trousers/tex/texture_diffuse.dds
    00 00 00 3E 00 00 00 00: 0.125 x 0.0
    00 00 00 3E 00 00 00 3E 0.125 x 0.125
    00 00 00 44 00 00 00 44 512.0 x 512.0
    etc.

    If you want to copy and paste from one atlas to another you would copy from the name of the category up to (but not including) the name of the next item's category. Be sure to also fix the coordinates, otherwise you'd get some random part of another texture.
    As we say in my country, "You are the mother @$%#ing man!"

  14. #14
    maxsim666's Avatar Miles
    Join Date
    May 2008
    Location
    Ancona Italy
    Posts
    329

    Default Re: Texture Atlas Files

    view

    Quote Originally Posted by just View Post
    The format for these files is as follows:

    8 bytes: identifier, should be 01 00 00 00 00 00 00
    4 bytes: (ulong) number of items in the atlas
    then for each item:
    512 bytes: zero-padded wide string containing category
    512 bytes: zero-padded wide string containing file name of the texture if it had not been put in the atlas, the game uses this file name to look for the texture.
    8 bytes: (two floats) top left corner in texture units of the part the atlas texture that is for this texture
    8 bytes: (two floats) width and height in texture units
    8 bytes: (two floats) width and height in pixels.

    What an example may look like (this is the first part of france_diffuse.atlas and the associated .dds from the NTW demo), see also the attachment for a visual explanation.
    01 00 00 00 00 00 00 00
    6A 00 00 00: 106 items
    -- Item 1 --
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 48 00 65 00 61 00
    64 00 73 00 2F 00 4E 00 61 00 70 00 6F 00 6C 00 65 00 6F 00 6E 00 5F 00 48 00 65 00 61 00 64 00
    2F 00 54 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00: VariantModels/UnitParts/Euro/Heads/Napoleon_Head/Tex/texture
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 48 00 65 00 61 00
    64 00 73 00 2F 00 4E 00 61 00 70 00 6F 00 6C 00 65 00 6F 00 6E 00 5F 00 48 00 65 00 61 00 64 00
    2F 00 54 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 5F 00 64 00 69 00 66 00
    66 00 75 00 73 00 65 00 2E 00 64 00 64 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00: VariantModels/UnitParts/Euro/Heads/Napoleon_Head/Tex/texture_diffuse.dds
    00 00 00 00 00 00 00 00: 0.0 x 0.0
    00 00 00 3E 00 00 00 3E: 0.125 x 0.125 -> so the bottom right of this atlas item is one eighth of the atlas texture width to the right and one eighth of the atlas texture height down (starting from the previous coordinate).
    00 00 00 44 00 00 00 44: 512.0 x 512.0 -> this part of the atlas is 512x512 pixels in size.
    -- Item 2 --
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 4C 00 65 00 67 00
    73 00 2F 00 42 00 72 00 69 00 74 00 69 00 73 00 68 00 5F 00 4C 00 69 00 67 00 68 00 74 00 5F 00
    49 00 6E 00 66 00 61 00 6E 00 74 00 72 00 79 00 5F 00 54 00 72 00 6F 00 75 00 73 00 65 00 72 00
    73 00 2F 00 74 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00: VariantModels/UnitParts/Euro/Legs/British_Light_Infantry_Trousers/tex/texture
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 4C 00 65 00 67 00
    73 00 2F 00 42 00 72 00 69 00 74 00 69 00 73 00 68 00 5F 00 4C 00 69 00 67 00 68 00 74 00 5F 00
    49 00 6E 00 66 00 61 00 6E 00 74 00 72 00 79 00 5F 00 54 00 72 00 6F 00 75 00 73 00 65 00 72 00
    73 00 2F 00 74 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 5F 00 64 00 69 00
    66 00 66 00 75 00 73 00 65 00 2E 00 64 00 64 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00: VariantModels/UnitParts/Euro/Legs/British_Light_Infantry_Trousers/tex/texture_diffuse.dds
    00 00 00 3E 00 00 00 00: 0.125 x 0.0
    00 00 00 3E 00 00 00 3E 0.125 x 0.125
    00 00 00 44 00 00 00 44 512.0 x 512.0
    etc.

    If you want to copy and paste from one atlas to another you would copy from the name of the category up to (but not including) the name of the next item's category. Be sure to also fix the coordinates, otherwise you'd get some random part of another texture.


    Hi just glad you explain it!
    Great, a little bit complex, but I think we will find out a way to create new unit.
    I am thinking about to create a new faction, without warring about its playablity, with its own variant and atlas / dds files, so no other faction will be affected by modding.
    seems that its possible to copy and paste single texture from uniparts directory in variantmodels.pack so no problem with making a full new whole faction dds
    +rep to you
    Last edited by maxsim666; March 14, 2010 at 03:33 PM.
    "In hostem celerrime volant"


    - Voloire -

  15. #15

    Default Re: Texture Atlas Files

    Quote Originally Posted by just View Post
    The format for these files is as follows:

    8 bytes: identifier, should be 01 00 00 00 00 00 00
    4 bytes: (ulong) number of items in the atlas
    then for each item:
    512 bytes: zero-padded wide string containing category
    512 bytes: zero-padded wide string containing file name of the texture if it had not been put in the atlas, the game uses this file name to look for the texture.
    8 bytes: (two floats) top left corner in texture units of the part the atlas texture that is for this texture
    8 bytes: (two floats) width and height in texture units
    8 bytes: (two floats) width and height in pixels.

    What an example may look like (this is the first part of france_diffuse.atlas and the associated .dds from the NTW demo), see also the attachment for a visual explanation.
    Spoiler Alert, click show to read: 
    01 00 00 00 00 00 00 00
    6A 00 00 00: 106 items
    -- Item 1 --
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 48 00 65 00 61 00
    64 00 73 00 2F 00 4E 00 61 00 70 00 6F 00 6C 00 65 00 6F 00 6E 00 5F 00 48 00 65 00 61 00 64 00
    2F 00 54 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    : VariantModels/UnitParts/Euro/Heads/Napoleon_Head/Tex/texture
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 48 00 65 00 61 00
    64 00 73 00 2F 00 4E 00 61 00 70 00 6F 00 6C 00 65 00 6F 00 6E 00 5F 00 48 00 65 00 61 00 64 00
    2F 00 54 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 5F 00 64 00 69 00 66 00
    66 00 75 00 73 00 65 00 2E 00 64 00 64 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    : VariantModels/UnitParts/Euro/Heads/Napoleon_Head/Tex/texture_diffuse.dds
    00 00 00 00 00 00 00 00: 0.0 x 0.0
    00 00 00 3E 00 00 00 3E: 0.125 x 0.125 -> so the bottom right of this atlas item is one eighth of the atlas texture width to the right and one eighth of the atlas texture height down (starting from the previous coordinate).
    00 00 00 44 00 00 00 44: 512.0 x 512.0 -> this part of the atlas is 512x512 pixels in size.
    -- Item 2 --
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 4C 00 65 00 67 00
    73 00 2F 00 42 00 72 00 69 00 74 00 69 00 73 00 68 00 5F 00 4C 00 69 00 67 00 68 00 74 00 5F 00
    49 00 6E 00 66 00 61 00 6E 00 74 00 72 00 79 00 5F 00 54 00 72 00 6F 00 75 00 73 00 65 00 72 00
    73 00 2F 00 74 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    : VariantModels/UnitParts/Euro/Legs/British_Light_Infantry_Trousers/tex/texture
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 4C 00 65 00 67 00
    73 00 2F 00 42 00 72 00 69 00 74 00 69 00 73 00 68 00 5F 00 4C 00 69 00 67 00 68 00 74 00 5F 00
    49 00 6E 00 66 00 61 00 6E 00 74 00 72 00 79 00 5F 00 54 00 72 00 6F 00 75 00 73 00 65 00 72 00
    73 00 2F 00 74 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 5F 00 64 00 69 00
    66 00 66 00 75 00 73 00 65 00 2E 00 64 00 64 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    : VariantModels/UnitParts/Euro/Legs/British_Light_Infantry_Trousers/tex/texture_diffuse.dds
    00 00 00 3E 00 00 00 00: 0.125 x 0.0
    00 00 00 3E 00 00 00 3E 0.125 x 0.125
    00 00 00 44 00 00 00 44 512.0 x 512.0
    etc.


    If you want to copy and paste from one atlas to another you would copy from the name of the category up to (but not including) the name of the next item's category. Be sure to also fix the coordinates, otherwise you'd get some random part of another texture.
    The unit_variant file seems to use a similar format

  16. #16
    maxsim666's Avatar Miles
    Join Date
    May 2008
    Location
    Ancona Italy
    Posts
    329

    Default Re: Texture Atlas Files

    Yes Erasmus you are right, big troubles, almost for me, are texture coordinates, that because last texture pieces/parts in each faction dds are skinparts and if we paste at the end of dds the piece/part we want (example: bearskin hat) we have to do a big deal of computations to edit right coordinate for it, since skinparts and other texture pieces have different sizes and if we add it at the end or at the beginning of the section with pieces/parts of same size we have to edit all parts after it both in atlas and in dds.
    if someone could make an atlas and variant editor it would be like climbing in heaven
    if we succeded in edit atlas files we would be a step forward, but atlas will point to a texture that does not exist in dds file owned by the faction we are modding.
    So what means Just when he explained us structure of atlas file:
    512 bytes:zero-padded wide string containing category
    512 bytes: zero-padded wide string containing file name of the texture if it had not been put in the atlas, the game uses this file name to look for the texture.
    if I am right this means we do not have to edit dds faction texture file, because game will search in variantmodels.pack unitparts directory/section for us. It would be wonderfull because some faction texture dds in atlas section of variantmodels.pack are quite full and there is little room left for adding new texture pieces such as britain diffuse dds.
    I also noticed that in variant files the two 512 bytes sections are one for texture and the other for mesh, and there are no coordinates data in it for mesh related one, so question is: does variant mesh definition string point directly to mesh file in unitparts section of variantmodels.pack only by path string?
    if that's true, urrah, only thing is needed to be done in atlas file, it is to copy and paste whole item sections from one atlas to another atlas and then to clear coordinate data at the end of the section of each item:
    8 bytes: (two floats) top left corner in texture units of the part the atlas texture that is for this texture
    8 bytes: (two floats) width and height in texture units
    8 bytes: (two floats) width and height in pixels.
    and game will point directly to unitparts section/directory of variantmodels.pack.
    I hope it is so, it will be really very very simple
    Last edited by maxsim666; March 15, 2010 at 08:44 AM.
    "In hostem celerrime volant"


    - Voloire -

  17. #17
    maxsim666's Avatar Miles
    Join Date
    May 2008
    Location
    Ancona Italy
    Posts
    329

    Default Re: Texture Atlas Files

    Hi tried to make a chasseurs unit for france with corsican plumed hats like austrian landesschutzen militia. But it does not worked. Only corsican hat shows well right in my new unit.
    I edit chasseurs variant files and all four dds and atlas files for france faction but with no evident success since austrian_plumes_1 texture will not appears.
    I upload my little test mod if someone want to take a look and find what is wrong
    "In hostem celerrime volant"


    - Voloire -

  18. #18
    maxsim666's Avatar Miles
    Join Date
    May 2008
    Location
    Ancona Italy
    Posts
    329

    Default Re: Texture Atlas Files

    Quote Originally Posted by just View Post
    The format for these files is as follows:

    8 bytes: identifier, should be 01 00 00 00 00 00 00
    4 bytes: (ulong) number of items in the atlas
    then for each item:
    512 bytes: zero-padded wide string containing category
    512 bytes: zero-padded wide string containing file name of the texture if it had not been put in the atlas, the game uses this file name to look for the texture.
    8 bytes: (two floats) top left corner in texture units of the part the atlas texture that is for this texture
    8 bytes: (two floats) width and height in texture units
    8 bytes: (two floats) width and height in pixels.

    What an example may look like (this is the first part of france_diffuse.atlas and the associated .dds from the NTW demo), see also the attachment for a visual explanation.
    01 00 00 00 00 00 00 00
    6A 00 00 00: 106 items
    -- Item 1 --
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 48 00 65 00 61 00
    64 00 73 00 2F 00 4E 00 61 00 70 00 6F 00 6C 00 65 00 6F 00 6E 00 5F 00 48 00 65 00 61 00 64 00
    2F 00 54 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00: VariantModels/UnitParts/Euro/Heads/Napoleon_Head/Tex/texture
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 48 00 65 00 61 00
    64 00 73 00 2F 00 4E 00 61 00 70 00 6F 00 6C 00 65 00 6F 00 6E 00 5F 00 48 00 65 00 61 00 64 00
    2F 00 54 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 5F 00 64 00 69 00 66 00
    66 00 75 00 73 00 65 00 2E 00 64 00 64 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00: VariantModels/UnitParts/Euro/Heads/Napoleon_Head/Tex/texture_diffuse.dds
    00 00 00 00 00 00 00 00: 0.0 x 0.0
    00 00 00 3E 00 00 00 3E: 0.125 x 0.125 -> so the bottom right of this atlas item is one eighth of the atlas texture width to the right and one eighth of the atlas texture height down (starting from the previous coordinate).
    00 00 00 44 00 00 00 44: 512.0 x 512.0 -> this part of the atlas is 512x512 pixels in size.
    -- Item 2 --
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 4C 00 65 00 67 00
    73 00 2F 00 42 00 72 00 69 00 74 00 69 00 73 00 68 00 5F 00 4C 00 69 00 67 00 68 00 74 00 5F 00
    49 00 6E 00 66 00 61 00 6E 00 74 00 72 00 79 00 5F 00 54 00 72 00 6F 00 75 00 73 00 65 00 72 00
    73 00 2F 00 74 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00: VariantModels/UnitParts/Euro/Legs/British_Light_Infantry_Trousers/tex/texture
    56 00 61 00 72 00 69 00 61 00 6E 00 74 00 4D 00 6F 00 64 00 65 00 6C 00 73 00 2F 00 55 00 6E 00
    69 00 74 00 50 00 61 00 72 00 74 00 73 00 2F 00 45 00 75 00 72 00 6F 00 2F 00 4C 00 65 00 67 00
    73 00 2F 00 42 00 72 00 69 00 74 00 69 00 73 00 68 00 5F 00 4C 00 69 00 67 00 68 00 74 00 5F 00
    49 00 6E 00 66 00 61 00 6E 00 74 00 72 00 79 00 5F 00 54 00 72 00 6F 00 75 00 73 00 65 00 72 00
    73 00 2F 00 74 00 65 00 78 00 2F 00 74 00 65 00 78 00 74 00 75 00 72 00 65 00 5F 00 64 00 69 00
    66 00 66 00 75 00 73 00 65 00 2E 00 64 00 64 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00: VariantModels/UnitParts/Euro/Legs/British_Light_Infantry_Trousers/tex/texture_diffuse.dds
    00 00 00 3E 00 00 00 00: 0.125 x 0.0
    00 00 00 3E 00 00 00 3E 0.125 x 0.125
    00 00 00 44 00 00 00 44 512.0 x 512.0
    etc.

    If you want to copy and paste from one atlas to another you would copy from the name of the category up to (but not including) the name of the next item's category. Be sure to also fix the coordinates, otherwise you'd get some random part of another texture.
    Hi Just
    many thanks for your job, great!
    one think
    I highlighted red this
    4 bytes: (ulong) number of items in the atlas
    its right for all normal diffuse and gloss dds and also in colour_mask it returns in austria_colour_mask.atlas 133 ulong; in france_colour_mask.atlas 192 ulong and so on for all others colour_mask.atlas. The fact and problem is why are there more items then in other atlas with the same prefix and what is odd is that the most of items are blank_texture
    any idea about this? colour_mask are the only atlas with the blank_texture
    cheers
    Last edited by maxsim666; March 19, 2010 at 05:21 PM.
    "In hostem celerrime volant"


    - Voloire -

  19. #19
    maxsim666's Avatar Miles
    Join Date
    May 2008
    Location
    Ancona Italy
    Posts
    329

    Default Re: Texture Atlas Files

    Hi dear mates take a look this mod http://www.megaupload.com/?d=ZVQUNCSE seems we found keystone for new textures and it was simpler then we could ever guess
    "In hostem celerrime volant"


    - Voloire -

  20. #20
    Zaitochisan's Avatar Civis
    Join Date
    Nov 2009
    Location
    London, UK
    Posts
    155

    Default Re: Texture Atlas Files

    britain_gen_duke_of_wellington.officer.unit_variant

    I have been exploring the Wellington textures because I couldn't understand why there were 3 versions of the texture in NTW files and I am redoing his skin and uniform.

    britain_gen_duke_of_wellington.officer.unit_variant
    Spoiler Alert, click show to read: 

    VRNT
    h a n d s
    H e a d s
    b e l t s
    H a t s
    P l u m e s
    s h o u l d e r s
    T o r s o s
    e q u i p m e n t _ p r i m a r y _ w e a p o n
    e q u i p m e n t _ s e c o n d a r y _ w e a p o n

    VariantModels/Unit Parts/Euro/_skinparts_english/hands/hands_english/mesh
    VariantModels/UnitParts/Euro/_skinparts_english/tex1_is/texture

    VariantModels/UnitParts/Euro/Heads/Wellington_Head/mesh
    VariantModels/UnitParts/Euro/Heads/Wellington_Head/Tex/texture

    VariantModels/UnitParts/Euro/belts/Wellington_Belt/mesh
    VariantModels/UnitParts/Euro/belts/Wellington_Belt/Tex/texture

    VariantModels/UnitParts/Euro/Hats/Wellington_Hat/mesh
    VariantModels/UnitParts/Euro/Hats/Wellington_Hat/Tex/texture

    VariantModels/UnitParts/Euro/Legs/Wellington_leg/mesh
    VariantModels/UnitParts/Euro/Legs/Wellington_leg/Tex/texture

    VariantModels/UnitParts/Euro/Torsos/Wellington_Coat/mesh
    VariantModels/UnitParts/Euro/Torsos/Wellington_Coat/Tex/texture

    rigid_equip_euro_straightsabre01


    \variantmodels\units
    britain_gen_duke_of_wellington.soldier.unit_variant
    britain_gen_duke_of_wellington.officer.unit_variant
    britain_gen_duke_of_wellington.musician.unit_variant

    (NB: Now although these file paths suggest VariantModels/UnitParts/Euro is the souce of the seen textures actually in game the source is the \variantmodels\units\atlas)



    The Three locations:


    Version1

    \variantmodels\unitparts\euro
    \variantmodels\unitparts\euro\belts\wellington_belt\tex
    \variantmodels\unitparts\euro\hats\wellington_hat\tex
    \variantmodels\unitparts\euro\heads\wellington_head\tex
    \variantmodels\unitparts\euro\legs\wellington_leg\tex
    \variantmodels\unitparts\euro\_skinparts_english\tex1_is
    \variantmodels\unitparts\euro\torsos\wellington_coat\tex

    =single sections as per listed in eg britain_gen_duke_of_wellington.officer.unit_variant above

    Version2

    \unitmodels\textures
    campaign_wellington_diffuse.dds
    campaign_wellington_gloss_map.dds
    campaign_wellington_normal.dds

    Used version in Game

    \variantmodels\units\atlas
    britain_diffuse.atlas
    britain_diffuse.dds
    britain_colour_mask.atlas
    britain_colour_mask.dds
    britain_gloss.atlas
    britain_gloss.dds
    britain_normal.atlas
    britain_normal.dds



    Interesting examination of britain_gen_duke_of_wellington.officer.unit_variant shows
    Spoiler Alert, click show to read: 


    00000000 56 52 4E 54 00 00 00 00 0A 00 00 00 14 00 00 00 B4 14 00 00 68 00 61 00 6E 00 64 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 VRNT................h.a.n.d.s..............
    0000002B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ...........................................
    00000056 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ...........................................
    00000081 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ...........................................
    000000AC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ...........................................
    000000D7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ...........................................
    00000102 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ...........................................
    0000012D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ...........................................
    00000158 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ...........................................
    00000183 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ...........................................
    000001AE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ...........................................
    000001D9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ...........................................
    00000204 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
    48 00 65 00 61 00 64 00 73 00 00 ................................H.e.a.d.s..
    0000022F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    0000025A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000285 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000002B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000002DB 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000306 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000331 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    0000035C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000387 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000003B2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000003DD 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000408 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 01 00 00 ...........................................
    00000
    433 00 62 00 65 00 6C 00 74 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .b.e.l.t.s.................................
    0000045E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000489 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000004B4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000004DF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    0000050A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000535 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000560 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    0000058B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000005B6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000005E1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    0000060C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 ...........................................
    00000637
    00 00 00 00 00 01 00 00 00 02 00 00 00
    48 00 61 00 74 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .............H.a.t.s.......................
    00000662 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    0000068D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000006B8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000006E3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    0000070E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000739 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000764 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    0000078F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000007BA 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000007E5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000810 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    0000083B 00 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 4C 00 65 00 67 00 73 00 00 00 00 00 00 00 00 00 00 00 .........................L.e.g.s...........
    00000866 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000891 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000008BC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000008E7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000912 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    0000093D 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000968 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000993 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000009BE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    000009E9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000A14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...........................................
    00000A3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 04 00 00 00 50 00 6C 00 75 00 .....................................P.l.u.
    00000A6A 6D 00 65 00 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 m.e.s......................................



    The 00 underscore is a fill replacing 01 with 00 resulting in the removal of the hat texture from the game, note that the mesh is still there so a shadow is still cast across face
    So as mentioned before re the atlas
    first 8 are the individual element ID,
    Next 4 would appear to be a switch "use texture" or perhaps "use default atlas?",
    next 4 would appear to be "Atlas entry reference code"?

    So link these entries with the Atlas entries:
    but they are not ina straight numerical order however in atlas we see
    three sets of 8:

    Head: no prefix first entry of atlas
    Leg_:_____00 00 40 3F 00 00 00 00_____00 00 00 3E 00 00 00 3E_____00 00 00 44 00 00 00 44
    Coat:_____00 00 00 3F 00 00 C0 3E_____00 00 00 3E 00 00 00 3E_____00 00 00 44 00 00 00 44 (*)
    Hat_:_____00 00 90 3E 00 00 38 3F_____00 00 C0 3D 00 00 C0 3D_____00 00 C0 43 00 00 C0 43
    Belt_:_____00 00 A0 3E 00 00 50 3F_____00 00 00 3D 00 00 80 3D_____00 00 00 43 00 00 80 43

    (* NB used as prefix for next entry in atlas too, for Kilt)

    As you might see there are definate patterns suggesting a coding for each entry might next look to compare for example hat vs Hat in atlas entries might show more of the pattern.
    .
    .
    .
    Last edited by Zaitochisan; March 17, 2010 at 09:59 PM.

Page 2 of 6 FirstFirst 123456 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •