Page 1 of 4 1234 LastLast
Results 1 to 20 of 63

Thread: Texture Files: What We Know So Far

  1. #1

    Default Texture Files: What We Know So Far

    Pooling our collective knowledge worked well for the .pack files, so I figured I do the same thing for the texture files.

    Please post anything that you've figured out about any of the files. That way, we'll be able to sort out how the system works.

    Unit_Variant Files
    Think of each unit as a slice of SPAM (the meat kind, not the email kind): the whole is assembled from a variety of parts. The unit_variant files seem to piece together the various model and texture parts into a single unit. Here's what I've figured out about the files so far:


    • There are 4 integers followed by the model parts. If you'd like to read along in your hex editor, each integer is 4 bytes long (e.g. "07 00 00 00") and immediately precedes the strings.
    • There are 10 model parts: hands, head, belts, hats, legs, plumes, shoulders, torsos, equipment_ambient (backbacks, ammoboxes, etc), equipment_primary_weapon
    • Each body part is mapped to a mesh (the model) and a texture (the colored bit): the hands and head meshes are in VariantModels\Skinparts, the rest is in VariantModels\Unitparts.
    • Several equipment variants are provided for each category.

    Here's a screen shot with the four integers highlighted:
    Spoiler Alert, click show to read: 


    Presumably you can mix and match all these components: changing the mesh mapping will give you a different model for that part of the unit; changing the texture will apply a new appearance to the mesh. (My guess is that the unit editor may work by generating custom unit_variant files since they're very lightweight.)

    My question atm is: what do the integers represent? I though maybe they correlated to the number of equipment variants, but I don't think that's right. Any thoughts?
    Last edited by erasmus777; March 08, 2010 at 02:15 PM.

  2. #2

    Default Re: Texture Files: What We Know So Far

    Ok,

    So It would seem the atlas files hold data on which texture files should be a assigned to each section of it . Here is an example (Thanks Rudovich ) -

    Q 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 / L e g s / G e r m a n _ C a v a l r y _ T r o u s e r s _ W i t h _ B o o t s / t e x / t e x t u r e
    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 / L e g s / G e r m a n _ C a v a l r y _ T r o u s e r s _ W i t h _ B o o t s / t e x / t e x t u r e _ d i f f u s e . d d s
    There are two entries (like those above) for each tile on the dds. Also each entry has some strange characters in front of it (possibly the coordinates of where to place the texture?).

    I tried copying and renaming the individual texture files in the variantmodels pack so I could possibly use those single files for the unit. I then changed the directories for said body part in the unit_variant file. This just caused the entire faction dds to appear on the one section of the body.

    I also tried changing the directory to another texture on the faction dds. I then changed the entry to the corresponding unit in that position in the uniforms table in PFM. This worked fine and the other units texture was splashed onto the unit. So it is possible to switch around different textures that already exist on the main faction dds files. How can we add new ones?

    There must also be something in the db that ties all of this together (as some people have already found)

    It seems Johan was able to create a clone unit here - http://www.twcenter.net/forums/showt...=338963&page=2

    This unit appears to use the inidividual textures in the variantmodels pack instead of the main faction dds. I wonder if cloning the textures aswell and renaming them for the unit is possible? Of course it would be a pain to texture each body part individually, so they would need to be added to one of the big dds files somehow.

    I had more info but have forgotten it lol I will post it up when I remember

    (hope that all makes sense)


  3. #3

    Default Re: Texture Files: What We Know So Far

    More later, but I think the numbers before the texture colors in the atlas file are 4 byte floats (e.g. "00 00 00 3E" = 0.125). Thanks to just for pointing out that I was missing the floats.

  4. #4

    Default Re: Texture Files: What We Know So Far

    Nice!

    So that could mean they are coordinates or could it mean they are something else?

    Perhaps the other two threads 'retextures' and 'texture atlas files' could be merged with this one to keep all info in one place?


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

    Default Re: Texture Files: What We Know So Far

    Hi boys, I palyed around a little bit with variant model files a I find out that somehow is there something odd in merging part of units from different factions, when I try to merge parts from same faction I succeded when I used different faction I failed with funny and weird results
    If you like I will upload my funny mistakes
    "In hostem celerrime volant"


    - Voloire -

  6. #6
    Miles
    Join Date
    Nov 2008
    Location
    The Netherlands, Brabant. close to Eindhoven.
    Posts
    306

    Default Re: Texture Files: What We Know So Far

    when I used different faction I failed with funny and weird results
    That might be because you you now started to use the different textures from different atlas files.. not sure but it's just an idea .

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

    Default Re: Texture Files: What We Know So Far

    I think and guess trouble is exactly in atlas directory files (both dds and atlas), I saw that in atlas file - opened in hex editor - there are many entries B.l.a.n.k.T.e.x.t.u.r.e as I posted here http://www.twcenter.net/forums/showt...33#post6951633 I also put up with some attempt in making a highland light infantry unit as I posted here http://www.twcenter.net/forums/showt...66#post6952166 with the same result, when I use something from another faction atlas file result is funny wild crazy wierd eerie.
    so if we want create variant file for new unit taking parts (hats, coats, legs ...) from different factions we had to find a solution for "atlas affair"
    "In hostem celerrime volant"


    - Voloire -

  8. #8

    Default Re: Texture Files: What We Know So Far

    Any progress Erasmus??

    The lack of variety (and possibilities) between units is so frustrating


  9. #9

    Default Re: Texture Files: What We Know So Far

    Quote Originally Posted by Lord Mongsworth View Post
    Any progress Erasmus??

    The lack of variety (and possibilities) between units is so frustrating
    I've started programming editing abilities for the PFM. It'll take a while, though, due to RL issues.

  10. #10

    Default Re: Texture Files: What We Know So Far

    Quote Originally Posted by erasmus777 View Post
    I've started programming editing abilities for the PFM. It'll take a while, though, due to RL issues.
    Thanks a lot for your huge effort and ongoing process on updating the community tools! +rep

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

    Default Re: Texture Files: What We Know So Far

    Hi erasmus
    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 -

  12. #12

    Default Re: Texture Files: What We Know So Far

    Quote Originally Posted by erasmus777 View Post
    I've started programming editing abilities for the PFM. It'll take a while, though, due to RL issues.
    Fantastic!

    Indeed, thanks for putting in the effort for everyone. It is much appreciated I will be sure to rep you when i can next


  13. #13
    ♔KillZoneGB♔'s Avatar Ducenarius
    Join Date
    Jun 2009
    Location
    Gloucester UK
    Posts
    939

    Icon14 Re: Texture Files: What We Know So Far

    erasmus777

    1st thing i admire people who Hex Edit (nice Art to learn)

    2nd i admire people who can strip/decompile exe (non encrypted exe) and recode and add JSR or two

    3rd have some rep

    ------------
    erasmus777

    Have you found the scaling byte? just thinking if we could have models X2 there default size.
    System
    OS: Windows 7 Home Premium 64-bit (TBA Win7 Prof)
    Processor: i7 4820K Ivy E @ 4.4Ghz (Mild OC), MB Sabertooth X79
    Memory: Kingston HyperX Fury Red 16GB DDR3-1600 Dual Kit (TBA to 64GB Quad 8X8GB)
    GPU: NVIDIA GTX 670 Phantom (TBA SLI Nvida xxx)
    Water Cooled


  14. #14

    Default Re: Texture Files: What We Know So Far

    Quote Originally Posted by ♔KillZoneGB♔ View Post
    erasmus777

    1st thing i admire people who Hex Edit (nice Art to learn)

    2nd i admire people who can strip/decompile exe (non encrypted exe) and recode and add JSR or two

    3rd have some rep

    ------------
    erasmus777

    Have you found the scaling byte? just thinking if we could have models X2 there default size.
    Thanks. I wish I were better at parsing, but I only started doing this stuff about 8 months ago. Also, thankfully the gents that made the PFM and DBE are big believers in open source (as am I), so they've made all their code available without.

    In the cases where the code isn't available, .NET applications are extremely easy to disassemble with the right utility. I was looking at an editor for Football Manager 2010 and the author was refusing to share his code. I felt kinda bad for him, because he had written it in C#, which uses the .NET framework, and I don't think he realized that it could be disassembled in about 30 seconds.

    I haven't found any info on scaling. I'll keep an eye open, though.

  15. #15

    Default Re: Texture Files: What We Know So Far

    So, here's some news.

    I think it's news, anyway.

    I was screwing around, trying to get the basic Prussian musketeer to use a Bicorne. I typed in the Bicorne path (the Prussia atlas file says it has it, so...) in the first 2 hat entries in the variant model file (there are 4 hat entries for the Prussian musketeer. Not sure what that's about). After importing the unit into my pack file, this is what showed up in the game:

    Spoiler Alert, click show to read: 




    As you can see, those are the Prussian Musketeers from E:TW.

    Somehow, I made a mistake (obviously). The interesting part is that then the game defaulted to E:TW textures rather than the N:TW ones.

    No, I don't even have E:TW installed. This is all within N:TW. And no, it's not a joke.

    And also no, I haven't the foggiest idea what I did or what caused it to occur. What I do know is that Hex Workshop crashed while I was saving this file. But then I re-opened it, and it seemed to have saved fine. So I imported it into the game. This is the result.
    Every day takes figuring out all over again how to live.

  16. #16

    Default Re: Texture Files: What We Know So Far

    Quote Originally Posted by The Vicar View Post
    So, here's some news.

    I think it's news, anyway.

    I was screwing around, trying to get the basic Prussian musketeer to use a Bicorne. I typed in the Bicorne path (the Prussia atlas file says it has it, so...) in the first 2 hat entries in the variant model file (there are 4 hat entries for the Prussian musketeer. Not sure what that's about). After importing the unit into my pack file, this is what showed up in the game:

    Spoiler Alert, click show to read: 




    As you can see, those are the Prussian Musketeers from E:TW.

    Somehow, I made a mistake (obviously). The interesting part is that then the game defaulted to E:TW textures rather than the N:TW ones.

    No, I don't even have E:TW installed. This is all within N:TW. And no, it's not a joke.

    And also no, I haven't the foggiest idea what I did or what caused it to occur. What I do know is that Hex Workshop crashed while I was saving this file. But then I re-opened it, and it seemed to have saved fine. So I imported it into the game. This is the result.
    maxsim666 also found that you can use ETW models and textures in NTW, meaning one could theoretically import all of ETW and do things like a 7 Years' War mod.

  17. #17
    MorganH.'s Avatar Finis adest rerum
    Join Date
    Dec 2007
    Location
    Netherlands
    Posts
    4,659

    Default Re: Texture Files: What We Know So Far

    @Erasmus777; Great,Very Interesting and some groundbreaking work Sir !
    All of us will benefit from it eventually !
    +rep

    Best regards

  18. #18

    Default Re: Texture Files: What We Know So Far

    Quote Originally Posted by erasmus777 View Post
    maxsim666 also found that you can use ETW models and textures in NTW, meaning one could theoretically import all of ETW and do things like a 7 Years' War mod.
    Ah, dammit. So I was beaten to the punch.
    Every day takes figuring out all over again how to live.

  19. #19

    Default Re: Texture Files: What We Know So Far

    Quote Originally Posted by The Vicar View Post
    Ah, dammit. So I was beaten to the punch.
    Codiscoverers, bro. It's like many of the major innovations in human history. One of you is Netwon, the other is Leibniz. As for who made the discovery first, I'll leave the two of you to set up the calculus to sort it out

    Spoiler Alert, click show to read: 
    Last edited by erasmus777; March 19, 2010 at 09:29 AM.

  20. #20

    Default Re: Texture Files: What We Know So Far

    A duel perhaps??



Page 1 of 4 1234 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
  •