Results 1 to 4 of 4

Thread: Help with variant models

  1. #1

    Default Help with variant models

    Hi!
    I've started playing around with the variant models using PFM but despite having read all the tutorials im still struggling with the basics. For a bit of practice, i wanted to change the hats for all black watch soldiers to something different. From what I understand this is far simpler when changing to a hat already stored in the britain atlas files, so when i just changed the hat directory in unit.variants it worked fine and the new hat appeared in game.. so far so good. What i'm having trouble with is changing to a hat from another nation which isnt already used by british troops. I created a mod that looks something like this:

    test.pack
    -variantmodels
    -units
    -atlas
    britain_colour_mask.atlas
    britain_colour_mask.dds
    britain_diffuse.atlas
    britain_gloss.atlas
    britain_normal.atlas
    britain_diffuse.dds
    britain_gloss.dds
    britain_normal.dds
    denmark_colour_mask.atlas
    denmark_colour_mask.dds
    denmark_diffuse.atlas
    denmark_gloss.atlas
    denmark_normal.atlas
    denmark_diffuse.dds
    denmark_gloss.dds
    denmark_normal.dds
    britain_inf_elite_british_black_watch.soldier.unit_variant
    denmark_inf_elite_republican_guards.soldier.unit_variant

    I changed the black watch hat to the danish one I wanted to try in the unit_variant file, both the mesh and texture. I then went into all the britain atlas files and added a new row for the danish hat, copying the directory for both strings from the equivalent danish files along with the corresponding coordinates.
    When I go in game the hat model has changed fine but the texture is wrong. It's not the same as what a lot of people seem to get where the entire dds file is covered all over the hat like patchwork, but it clearly doesn't fit and it's the wrong colours, almost like a jacket was pasted onto the mesh instead of the correct hat. I'm pretty sure there's an important step i'm missing here but I can't figure out why and I have looked hard before posting. I should probably emphasise im not yet trying to create a new unit with different textures, im just trying to permanently modify all black watch units with slightly different equipment and clothing ( I can't stand those floppy hats ). A lot of people talk about changing prefixes but surely that's only necessary when you wanted a new unit added to the game? Any help would be really appreciated!
    Thanks

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

    Default Re: Help with variant models

    Reading what you wrote, you did not added the danish hat in britain dds, all four dds, you must add texture in dds exactly in coordinates you edited in related atlas, so if you simply added it at the end of atlas, in dds it should be added after last _skinparts.
    meshes are not referenced in atlas but only in unit_variant.
    texture are referenced both in atlas and unit_variant, the atlas are the map for game unit editor, atlas tell exactly where in dds are located the texture. so if you do not edit dds, or you give no exact coordinates, napoleonTW will apply wrong texture to meshes with odd wierd results as you experienced.
    Check if there is enough room for the hat texture (384x384 pixel) since britain vanilla dds are already quite full. If there is not enough room, then you must swap one hat with the danish hat, but acting so you will affect all britain prefixed units using swapped hat.
    about changing prefix, it is an escape when, like in the case above, you want to swap texture in atlas and dds, without affecting all the other units with same vanilla prefix.
    Last edited by maxsim666; April 21, 2010 at 01:59 PM.
    "In hostem celerrime volant"


    - Voloire -

  3. #3

    Default Re: Help with variant models

    Hi Maxsim, Thanks for the reply
    Clearly i've completely misunderstood the whole concept of changing textures... Surely if I edit the .dds file and paste the new texture onto it there's no need to do any of the things i've done, all I'd need to change is the .dds file and make sure the .atlas file has the correct coordinates, there would be no need to include any of the files for denmark, just copy the necessary texture and it's done? So from what I understand in order to make changes to a faction texture, either I edit the original .dds file and all units that used to use the original texture get the new one, or I create a new .dds file for my custom unit, in which case I need to change all prefixes, including a whole load of things in the db file, am i correct or hopelessly stupid?

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

    Default Re: Help with variant models

    Quote Originally Posted by Bastiantw View Post
    Hi Maxsim, Thanks for the reply
    Clearly i've completely misunderstood the whole concept of changing textures... Surely if I edit the .dds file and paste the new texture onto it there's no need to do any of the things i've done, all I'd need to change is the .dds file and make sure the .atlas file has the correct coordinates, there would be no need to include any of the files for denmark, just copy the necessary texture and it's done? So from what I understand in order to make changes to a faction texture, either I edit the original .dds file and all units that used to use the original texture get the new one, or I create a new .dds file for my custom unit, in which case I need to change all prefixes, including a whole load of things in the db file, am i correct or hopelessly stupid?
    Yes now you are correct. It is not simple to understand. CA makes it a little bit too complicate
    you have to edit both mesh and texture references, if you not edit mesh references you will have vanilla model with new texture, that will not match exactly to vanilla mesh/model.
    So you have to edit references for mesh in unit_variant
    edit texture references in unit_variant
    edit texture references (both) in atlas
    edit texture in dds
    cheers
    "In hostem celerrime volant"


    - Voloire -

Posting Permissions

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