Page 1 of 2 12 LastLast
Results 1 to 20 of 28

Thread: integrate a custom Model into the game

  1. #1

    Icon1 integrate a custom Model into the game

    Hi ,



    this tutorial will explain how to integrate a new model to the game.

    You will need basic knowledge on how to use 3DS Max and how to use

    the PackFileManager and the tool BOB.i will not explain how to build a Model.

    In this example we will integrate a Hat-model as a helmet.



    But first we have to clarify what software we need to doing this.




    1. Autodesk 3DS Max 2009 or 2010 . ( in this tutorial i use Max 2010 )




    1. Assembly Kit – this is the official Mod Tools-Pack from the developers.
    2. PackFileManager



    Autodesk give the possibility to use a free student-version .


    The Assembly Kit you can download at Steam.
    Among others it contains the very useful tool „ BOB „, and the CS2 Converter-file :



    " cs2_exporter.dle "



    this dle file you have to put into the " plugins " folder of 3DS Max.



    you will need the data inside of the " required Tutorial-Data " 7zip file too.
    you can find it at the bottom of this post.



    we will use the .max file " Suji_Bachi_Kabuto " as a base.

    it is included in the " required Tutorial-Data " zip file.

    Generally you can get the same max.file and others by yourself,this files are
    included in the Assembly Kit.but the problem is,these files you can only open
    with 3DS Max 2013.then you have to save it as a 2010 max.file .
    So,download the version i have uploaded,and you can open it directly with Max2010.

    PackFileManager you can download here at Total War Center .

    and last but not least the Model we use for this Tutorial,you can download
    the " required Tutorial-Data " - 7zip file here in this thread.the Model and other stuff we
    will need is inside of this zip file.



    when you have done this,we can start.



    Start 3DSMax2010 and open the " Suji_Bachi_Kabuto " -max.file.



    you will see the helmet.
    There are 4 versions of the helmet.


    Suji_Bachi_Kabuto_LOD01
    Suji_Bachi_Kabuto_LOD02
    Suji_Bachi_Kabuto_LOD03
    Suji_Bachi_Kabuto_LOD04


    LOD01 is the version the game will use when you look from close to,and have the
    highest polygon-count.
    The other versions the game will use when you look from more distance.
    LOD04 will always have the lowest polygon-count,because this is used when you
    look from the maximal distance in game.


    You will see a green object on the helmet too ,it is called " AP_crests " .

    this will tell the game where to place an external crest on the helmet.

    External crest means,a single-objected Crest you can choose in Unit Editor.


    But In this case here we can delete the AP_crests object,because
    we dont want to add a external crest later.


    When you unhide all,you will see the skeleton too.

    A skeleton is necessary,it makes it possible that the Model move when the soldier
    move.


    The Shogun2-Skeleton contains the following Bones:


    Hips
    Spine
    Spine1
    Spine2
    Neck
    Head
    Left_Mouth
    Right_Mouth
    Jaw
    Right_Brow
    Eyes
    Left_Brow
    LeftShoulder
    LeftArm
    LeftForeArm
    LeftForearmRoll
    LeftHand
    LeftHandThumb1
    LeftHandThumb2
    LeftHandThumb3
    LeftHandMiddle1
    LeftHandMiddle2
    LeftHandMiddle3
    LeftHandIndex1
    LeftHandIndex2
    LeftHandIndex3
    RightShoulder
    RightArm
    RightForeArm
    RightForearmRoll
    RightHand
    RightHandThumb1
    RightHandThumb2
    RightHandThumb3
    RightHandIndex1
    RightHandIndex2
    RightHandIndex3
    RightHandMiddle1
    RightHandMiddle2
    RightHandMiddle3
    Sashimono
    LeftUpLeg
    LeftLeg
    LeftFoot
    LeftToeBase
    Tail
    RightUpLeg
    RightLeg
    RightFoot
    RightToeBase
    Armor_Front


    that is the complete skeleton.but enough to the skeleton for now.





    We want to import a completely new model,so we can delete the 4 LODīs of the
    helmet now.so there is only the skeleton left.

    Now we click on import,and import the Hat-Model as a obj.file . ( it is in the " required Tutorial-Data " zip file )



    Use the standard-preferences , change only the Units/Scale field,and activate convert,and
    and set Model Units to meters . ( Image 1 )




    Now you can see the Hat – Model is there.
    Yes,it is tooooo big,so we scale it to : ( yes,it is better to scale not.instead of this,it is better to model
    the model in the right size,so you dont need to scale )


    but in this tutorial,we scale :


    X : 8,0
    Y : 8,0
    Z : 9,544


    (you dont have to be 100 % exactly at this point,remember this is a tutorial )


    and we rotate it :


    X: -1,014
    Y: -3,06
    Z: -180,00


    and we move it :


    X: -0,074
    Y: -0,058
    Z: 0,745


    the result you can see at Image 2





    and here is our Hat-Model.


    But we have to take care of the polygon-count.
    For LOD01 about 1500 polygons should be ok.
    The Hat-Model have 1.847 polygons.thats a bit more , but

    this should be ok.



    Actually you now have to add a Material and to create a UV-Map.


    a UV-Map is necessary,it tells the game where to place the texture on the model right,

    but i will not explain the UV-Mapping here,for this you should use a external tutorial.


    Here is one :


    http://avaxhome.ws/ebooks/eLearning/...7n76t87ro.html




    lets say , this Hat - Model looks good enough,the polycount is ok,and it have a UV-Map,because

    i made one before.


    We give the Hat -Model the name " HAT_LOD01 "



    now our Hat_LOD01 is completed.


    Now we have to make Hat_LOD02.


    So we want to copy the Hat.
    So right-click and choose Clone .
    In the popup-window choose Copy ,
    and type in the name „ HAT_LOD02.


    We now have to reduce the polycount only for the LOD_02 .
    To doing this,there are several methods.but because this is a tutorial and we
    only want to see our Model in game,we will use a fast but problematic method :


    we add the ProOptimizer and click on calculate.
    Here at vertex% we type in the 40,0 .
    now it should be reduced to 658 polygons.
    That should be ok.




    We repeat this step from copy to polycount-reduction for LOD3 and 4.


    for HAT_LOD3 we type in 10,0 .
    now we have 131 polygons for LOD_3 .


    For HAT_LOD4 we type in 4,5 .
    now we have 60 polygons for LOD_4 .


    Now the polygon-count is ok.


    In 3DS Max the position of the Hat looks optimal.
    (when you import a head from the game you have a good orientation)
    But in game this will not looks that optimal.
    I figured out that in most cases we have to move a Model a bit to the back-side.
    Mostly about 0,015 .
    So we change the y-axis value from -0,058 to -0,043 .
    but in this case here at the end it will look better,when we change
    it to -0,041. this could vary from the case arises.


    The next step is to add a Skin-Modifier.
    When we have add one,we have to add the bones from the skeleton.
    Which bones you have to add vary from the unit part and the Model you want to integrate
    into the game.
    In this case,we want to integrate a Hat.
    So the kind of unit part is a helmet.
    For the most helmets you only have to add the " Head " bone.

    luckily,In this case too.



    So we add to every LOD- variant a Skin Modifier,and then add the Head – bone
    to it.


    Now we can export it.
    We export it as CS2.file .
    When you have put the cs2_exporter.dle file into the right folder,your 3DSMax should
    be able to export it as CS2.
    By the export we give it the name menpo_1.
    Then we have to put this exported CS2 file into the folder
    you have the Assembly Kit installed in,and then into a specific folder :


    In my computer , it is :


    C: / Official_Mod_Tools / ( the folder i have Assembly Kit installed )


    and then :


    / raw_data / art / battle / land / models /soldiers /

    VariantModels / UnitParts / Japan / masks / Menpo_1


    when you have done this,we can start BOB .
    Here at the left field, the Raw_data field,we have to choose the very same folder we have
    put our CS2 file in.


    So click click click on the + symbol until you have the Menpo_1 folder .

    Here we activate the box of the Menpo_1.CS2



    now go to the Working data field,and click click click always on the + symbol :


    VariantModels / unitparts / japan / masks / and click on the box of masks.
    in the upcoming window let the Provider actions field like it is,and in the Consumer actions field

    activate the box of : Pack/Create pack file ( mod.pack ) .

    now you can click on Start .
    BOB convert now the CS2 file into the variant_part_mesh format , which is used
    by the game.BOB create a pack.file too,and in this pack.file the converted file will
    be in.
    When BOB have done this,at the left side of the Window „ Cs2 „ should be
    coloured in orange.then it was successfully.when it is coloured in red ,
    then there is something wrong.but at Image 3 you see : the Color is Orange.


    So it was successfully and we can exit BOB.


    The mod.pack BOB have created you will find into


    the folder you have Assembly Kit installed.
    So in my case again :


    C / Official_Mod_Tools / retail / data / and here is your mod.pack in.



    This pack-file we open with Pack File Manager,and go to


    variantmodels / unitparts / japan / masks / menpo_1


    here is our variant_part_mesh file now.converted,and ready for use.

    So extract it into your Assembly Kit-folder :


    again,in my case :


    C / Official_Mod_Tools / working_data / VariantModels / unitparts / japan / masks /
    Menpo_1 /


    when it ask you, choose overwrite.



    Now we create a new folder here at working_data / VariantModels / unitparts / japan /
    helmets / .


    we copy a folder that already exist in this folder and give it the name „ AAAHat1 „


    in this folder you put the variant_part_mesh file and choose overwrite .


    Now we put the textures here into the „ tex „ folder .


    The textures i have uploaded too,you can find them in the zip file in folder " tex " .



    now we are ready to open Unit Editor and take a look on what we have made !



    We choose the Default_Katana_Samurai .


    Choose the ashigaru_head02 as head and our AAAHat1 as helmet .


    At image 4 you can see that i forgot to move the Hatīs Y-axis from -0,058 to – 0,041 .

    so the position of the Hat is not optimal.
    But lets say : this is ok,because it is a tutorial .



    Click on Save and exit the Unit Editor .
    This will create a Unit-Variant-file . In this case :


    " Samurai_Inf_Katana_Samurai.soldier.unit_variant "



    This file and our „ AAAHat1 „ folder we have to import into a pack.file .

    This you can do with PackFileManager again.you can use the mod.pack again.

    but first delete in the pack-file you want to use the " samurai_inf_katana_samurai.soldier.unit_variant " file,
    if it is in this pack file.the reason is we want that the game use our " Samurai_Inf_Katana_Samurai.soldier.unit_variant " ,and not
    the standard-version.

    put the mod.pack or the pack file you have imported the AAAHat1 folder and the " Samurai_Inf_Katana_Samurai.soldier.unit_variant " file into the
    data folder of Shogun2.



    And now,let us start the game,make a custom battle and choose the katana Samurai Unit.
    Lets take a look at our Hat in the game.


    Look at image 5 and 6.



    good.the Samurai wear the Hat !




    Here is only one problem,when you look at the Samurai from close to,
    the Hat have the right texture,but when you look from more Distance,you will
    see : oh no,the Hat is all grey , the texture is not on the Hat .


    The reason for this problem is the way we used the ProOptimizer.
    When you want to use the ProOptimizer to reduce the polygoncount,then make sure that you activate the following boxes:

    -ProtectBorders
    -Keep Material Boundaries
    -Keep Textures
    -Keep UV Boundaries

    this is really important.otherwise the Pro Optimizer will destroy the UV-Map.

    regarding the Hat,let us be positive : the Hat-Model is now in the Game !!!

    here are two tutorials about other methods for Polygon-Reduction :

    http://www.youtube.com/watch?v=rQiiEESRM7c

    http://www.youtube.com/watch?v=X88u-Xti39E
    Attached Thumbnails Attached Thumbnails IMAGE6.jpg   IMAGE5.jpg   IMAGE4.png   IMAGE3.png   IMAGE2.png  

    IMAGE1.png  
    Attached Files Attached Files
    Last edited by manolops3; December 27, 2013 at 10:15 AM.

  2. #2

    Default Re: integrate a custom Model into the game

    Thanks for the guild. Can you upload the Equipment.max(in Assembly Kit\raw_data\art\battle\land\models\soldiers\VariantModels\UnitParts\Japan\equipment) which saved in 3dsmax2010 format? Since my bandwidth is limited, I'm a bit reluctantly to download the whole 3dsmax 2013 just for format converting

  3. #3

    Default Re: integrate a custom Model into the game

    you can download and use Spartan Warriors Equipment.max file,thats the one i use too for weapons.

    here is the link :

    http://www.twcenter.net/forums/showt...ications/page2

    you can find it at Post 25 .

    if you want to integrate new equipment like weapons,Vikus Van de Merwe made a special tutorial about this.
    my tutorial is more about integrate new armor-parts.some things are different between weapons or armors.

    here is the link :

    http://www.twcenter.net/forums/showt...-into-Shogun-2
    Last edited by manolops3; February 13, 2014 at 01:08 PM.

  4. #4

    Default Re: integrate a custom Model into the game

    I'm still learning some 3DSmax, planning to try my first new model for S2TW soon, so I'm really happy to see this tutorial here. Thank you!

  5. #5

    Default Re: integrate a custom Model into the game

    i wish you success !! questions are welcome , will try to help with problems if needed .

  6. #6

    Default Re: integrate a custom Model into the game

    @Weierstrass

    here are the files in a zip-packfile.
    Attached Files Attached Files

  7. #7

    Default Re: integrate a custom Model into the game

    @Weierstrass

    here are the new files.for the Shogun-Cavalry the unit is build of several unitparts.i packed them all into the zip-archive.
    dont forget to post some screenshots when the work is done.
    Attached Files Attached Files

  8. #8

    Default Re: integrate a custom Model into the game

    Thanks you. In this week I'm going to send you a few picks

  9. #9

    Default Re: integrate a custom Model into the game

    and here are the heads.
    Attached Files Attached Files

  10. #10
    [N2]Kami's Avatar Semisalis
    Join Date
    May 2011
    Location
    Viet Nam
    Posts
    433

    Default Re: integrate a custom Model into the game

    Thank you for your last reply for the gloss_map
    I'm just wondering how can you take those shogun cav part from the game? I'm can't find a way to convert the mesh file in the model2.pack

  11. #11

    Default Re: integrate a custom Model into the game

    Quote Originally Posted by [N2]Kami View Post
    Thank you for your last reply for the gloss_map
    I'm just wondering how can you take those shogun cav part from the game? I'm can't find a way to convert the mesh file in the model2.pack
    i think this deserve a stand-alone Tutorial,but its not difficult.

    follow the following steps:

    1.open with Pack File Manager the models2.pack,and export all the unitparts-models you need.
    2.buy and use " Ultimate Unwrap 3D " with the ETW-plugin , and use it to open the model file ( variant_part_mesh -format )
    3.export it as an obj.file.
    4.open 3DS Max and use the max-file of my tutorial as a base,then import the obj.file into Max.use the import options :

    at " Units/Scale "

    Convert needs to be activated.
    and for "Model Units" set it to " Meters " .

    5.edit the model !

    Thats it.

  12. #12
    [N2]Kami's Avatar Semisalis
    Join Date
    May 2011
    Location
    Viet Nam
    Posts
    433

    Default Re: integrate a custom Model into the game

    Well, it cost like 2 new shogun 2 game on steam =)
    So, can I ask you a favor? Can you export the Kiyomasa helmet for me please? I need only that part of the game ( for now).
    It's in this file kato_kiyomlasa_helmet.

  13. #13

    Default Re: integrate a custom Model into the game

    Quote Originally Posted by [N2]Kami View Post
    Well, it cost like 2 new shogun 2 game on steam =)
    So, can I ask you a favor? Can you export the Kiyomasa helmet for me please? I need only that part of the game ( for now).
    It's in this file kato_kiyomlasa_helmet.
    no problem . i will upload them tomorrow .

  14. #14

    Default Re: integrate a custom Model into the game

    @N2Kami

    here is the helmet.
    Attached Files Attached Files

  15. #15
    [N2]Kami's Avatar Semisalis
    Join Date
    May 2011
    Location
    Viet Nam
    Posts
    433

    Default Re: integrate a custom Model into the game

    Quote Originally Posted by manolops3 View Post
    @N2Kami
    Quote Originally Posted by manolops3 View Post

    here is the helmet.

    Thanks man. I'm trying to make a custom model base on this character but I'm stuck with the helmets =) and the vanilla one is a little small.
    Spoiler Alert, click show to read: 



    http://steamcommunity.com/sharedfiles/filedetails/?id=236075303
    And I'm finding thing is getting hard for someone with almost zero skill in Photoshop and 3dsmax.

  16. #16

    Default Re: integrate a custom Model into the game

    modeling is generally no easy work.but when you keep on trying you will find ways to come closer to the result you want.step by step.
    actually im not a modeler,but i tried a lot things because i wanted to have a look and designs i wanted,and i still need very much time to finish models,but when im keep on trying,then almost i get
    results im really pleased with.i try until it look like i want it to look.

  17. #17

    Default Re: integrate a custom Model into the game

    Ok, I'm running into the issue of the named part not showing up in the unit editor. I even tried just replacing the variant_part_mesh file with my new one over the Menpo_1.. just to replace the geometry, and the old one still shows up.

    I believe I'm missing a step somewhere, but your instructions get a little muddy towards the end. Especially concerning where to place the extracted mesh file.

    Ex.
    Now we create a new folder here at working_data / VariantModels / unitparts / japan /
    helmets / .


    we copy a folder that already exist in this folder and give it the name „ AAAHat1 „


    in this folder you put the variant_part_mesh file and choose overwrite .
    What folder to copy? And from where?
    Also, why overwrite the Menpo_1.CS in the raw data? Can't you just create a new folder in the helmets for the hat with the same setup as the rest? Or is there a bunch of script adjusting to do in order for that to work?

  18. #18

    Default Re: integrate a custom Model into the game

    1.what folder to copy ? and from where ?

    go into the folder working_data / VariantModels / unitparts / japan /
    helmets / . ( in your directory where you have Assembly Kit installed ) .
    here you copy some folder...anyone,doesnt matter which folder.you should have a lot of helmets-folders there with variant_part_mesh and tex folder inside.

    and here you replace the variant_part_mesh with your one,and the textures with your ones,but the textures must bhave the same names than before , so :

    texture_diffuse
    texture_normal
    texture_gloss_map ( this 3 textures you need,without them the model will not found in Unit Editor )

    and perhaps the texture_colour_mask ( but this texture is not needed )


    2.Also, why overwrite the Menpo_1.CS in the raw data?

    because the helmets-one never worked for me....but the menpo_1 does . i think thats not a big problem to use menpo_1 instead....

    you could also try to put your folder with variant_part_mesh and the tex-folder inside into the directory of your Shogun2 game

    in my case : ....../SteamApps/common/Total War SHOGUN2/data/variantmodels/unitparts/japan/helmets/

    i hope you understand me,and this will help,please tell me then.....

    and ask more questions if you still have problems .

  19. #19

    Default Re: integrate a custom Model into the game

    also,have you followed this step :


    So it was successfully and we can exit BOB.


    The mod.pack BOB have created you will find into


    the folder you have Assembly Kit installed.
    So in my case again :


    C / Official_Mod_Tools / retail / data / and here is your mod.pack in.



    This pack-file we open with Pack File Manager,and go to


    variantmodels / unitparts / japan / masks / menpo_1


    here is our variant_part_mesh file now.converted,and ready for use.

    So extract it into your Assembly Kit-folder :


    again,in my case :


    C / Official_Mod_Tools / working_data / VariantModels / unitparts / japan / masks /
    Menpo_1 /


    when it ask you, choose overwrite.

  20. #20

    Default Re: integrate a custom Model into the game

    Thanks for the very quick reply.

    I got it to finally work. What was throwing me off was new helmets folder that needed to be created and copying an existing folder over. I was looking in the raw data of the modding folder, to copy, and those files do no have the variant_part_mesh file in them. (at least in mine) And in the main installation folder of the game only has the .pak files. So that was confusing me, as I was looking for a folder with that file.

    What I ended up doing is going into the models2.pak in the game installation folders and extracting a file out of there.

    I believe it would be easier just to create the / helmets folder.. create the / AAAHat1 folder.. create the / tex folder...
    place the texture files like you said, then just paste in the variant_part_mesh file in. No copying of an existing folder required.

    Again, thanks for the help.

Page 1 of 2 12 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
  •