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

Thread: How to add a new Cannon Model

  1. #1
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default How to add a new Cannon Model

    Hey,

    welcome to my little Tutorial about how to add a completly new Cannon Model for Empire and Napoleon.
    This isn't a tutorial about the Basics of Empire Modding. So i won't explain how to open Packs with the PFM or how to work with the DB Editor, or create a Mod.
    You also need the basics of 3D modeling and texturing, which also won't be covered here.

    I will use Milkshape as Tool, since this is the most used one in the TWC Community. A Tutorial for 3ds Max will follow.

    It's recommed to place all your exported Models and Textures in the same Directory as the Vanilla Models, means:

    Data/enginemodels/xyz.animatable_rigid_model
    Data/enginemodels/textures/xyz_diffuse; xyz_gloss_map; xyz_normal

    Anyway, lets start:


    Topics:


    1. Chapter 1: What you need
    2. Chapter 2: The Model Structure
    3. Chapter 3: Bone Assignment
    4. Chapter 4: Export the Model
    5. Chapter 5: Adding DB Entries


    Chapter 1: What you need

    1. A 3D modelling application
      • Recommed Programs: 3ds Max (all Versions), Maya, Milkshape 3D, Softimage Modtool (free Version of the Softimage Package)

    2. A full Version of Ultimate Unwrap (needed for opening and exporting), the Plugins for im/exporting models to your modeling Package, and of course Plugins for the Empire Files

    3. The Pack File Manager by Lt. Chambers, The Vicar and Erasmus777 and or the DB Editor




    Chapter 2: The Empire Enginemodel Structure
    Before we start the exporting process we need enough knowledge about the thing we want to export and how the Engine „reads“ the file.
    So my first step is always opening up the model and studying how its build, how are the parts named and so on.
    So open up any Fieldcannon model you want and have a look on it:


    1. Groups
      1. Here are your model parts listed. At the moment they are all named RigidMeshx but during your model process you can have any name you want. It will get converted automaticly

    2. Materials
      1. Self explaining. You can use as much materials as you want, but this isn't recommed. I would suggest not to use more then 3. The Name has always to be finished with a _diffuse.

    3. Bones
      1. Bones are used by the engine for animating a model part. Every Part can only have one Bone, but doesn't need one. But then you also don't have any animations.
        At the moment we have 4 Bones which are used for animations. Which bone animates which Part will be discussed later. Adding more Bones should be possible, but this will require a complete overwork of the Animations.




    Chapter 3: Bone Assignemt (Milkshape)
    Pivot Points Before importing our Model, we have to make shure that it it's Pivot Points are in the Right Place.


    • The Pivotpoint of Wheel Hub and the Axle Tree has to be placed at 0/0/0
    • The Pivotpoint of the Cannon Barrel has to be placed at 0/0/0 and the Barrel has to be rotated 90°



    Preperations Ok, after understanding the Model Architecture, we need a starting point for our own Model.

    Open any Field Cannon Model with Ultimate Unwrap 3D (Plugins needed) and save it as Ms3D (Plugin needed) wherever you want.

    Open the Vanilla Field Cannon model and merge your Cannon model. If your Model is to large scale it down. You can also doublecheck if your Model Parts are correctly placed. Simply compare it with the Vanilla Model.

    Now you can hide the Vanilla Cannon Models but not the Bones.

    We will now start to assign our Cannon Parts to their bones. Some notes:



    • Don't connect a Model Part with Bone0. Also do not delete it!
    • Every Model Part can only be connected with one Bone!
    • Connect every Model Part with the right Bone!



    Bone Assignemt A list which Bone controls which Model Part Animation:

    • Bone 0 - Position/Rotation of the complete Model
    • Bone 1 - Carriage
    • Bone 2 - Wheel right
    • Bone 3 - Wheel left
    • Bone 4 - Cannon Barrel

    How to assign a Model Part to a Bone:

    Very easy in Milkshape: Select the complete Model Part, change to the Joints Tab, select the Bone you want and press Assign.
    Repeat this for all Model Parts and connect them to their Bones.



    Chapter 4: Material Assignement and exporting
    Material Assignemnt After you assigned every Part with their Bones, you can now save delete the Vanilla Models and save your Model.

    Open it with Ultimate Unwrap 3D.

    Now we have to get the Materials right:

    If there are no entrys in the Material slot, right cklick on Materials and choose Add Materials. Then Right-Click on the newly created Material, choose Rename and type in the same Name you choosed for your Texturemaps (eg. my_cannon_diffuse, my_cannon_gloss_map, my_cannon_normal)

    After that, you have to create the texture path.

    Again Right_click, choose Properties, change the diffuse slot to Bitmap, press change and search for your textures.

    Standardpath: /data/enginemodes/textures/xyz_diffuse

    Attachment 129343

    To assign a Material to Model Part simply right_click on the Modelpart, press Select, then right_click on the Material and choose Assign. Voila.


    Export Options So, now before exporting, check if...


    1. All Model Parts are assigned to their Bones
    2. You have a Material
    3. It's correclty named (xyz_diffuse)
    4. You assigned your Material to all Model Parts

    If so, we can now start exporting.

    Go to Save as , choose a directory (default Empire Enginemodels directory recommed), enter a name and choose Empire: Total War (variant_weighted_models) as Filetype, press save.
    If you don't have this Filetype you didn't installed the Empire Plugin.

    Press Save and choose the option as in my example window:

    Congratulations! The Model Part is now done. You can now add your Models and Textures to a Modpack.

    If you want to add a new cannon model without overwriting an existing one, you can also have a look on the DB Tables, where you have to add an entry for your cannon.


    Chapter 5: DB Tables
    If you don't want to replace a Vanilla Model, you need DB Entries in following tables:

    • gun_type_to projectile
    • gun_types
    • animated_lod
    • warscape_animated_table
    • unit_stats_land (under Artilley1 and Gun_type)

    You have to make shure that the ModelID is the same in all Red-marked Cells and the GunID is the same in all Blue-marked Cells

  2. #2

    Default Re: How to add a new Cannon Model

    Thanks for this tutorial Primergy
    In all deinen Schlachten zu kämpfen und zu siegen ist nicht die größte Leistung.
    Die größte Leistung besteht darin, den Widerstand des Feindes ohne einen Kampf zu brechen.
    (Sun Tsu)

  3. #3
    B-DizL's Avatar TGW Lead Modeller
    Patrician

    Join Date
    May 2009
    Location
    America
    Posts
    5,900

    Default Re: How to add a new Cannon Model

    This is great thanks + rep

  4. #4

    Default Re: How to add a new Cannon Model

    great, now the great war mod will release the "grande bertha"!

    3 questions for primergy:
    -if we take a cannon with its horse and we replace the cannon by a cart, will it advance?
    -the only thing that can advance in the game is horse + cannon so... for tanks: is there a way to replace the cannon by the tank (in position of fire he can fire) and in position of deplacement, is there a way to integrate the horses in (without seing them of course....
    -is there a way to make a model occupable like tanks, bunkers, towers (I am sure not but if you have an idea...)
    Last edited by panzerschreck; January 31, 2011 at 09:33 AM.

  5. #5
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: How to add a new Cannon Model

    Quote Originally Posted by panzerschreck View Post
    great, now the great war mod will release the "grande bertha"!

    3 questions for primergy:
    -if we take a cannon with its horse and we replace the cannon by a cart, will it advance?
    -the only thing that can advance in the game is horse + cannon so... for tanks: is there a way to replace the cannon by the tank (in position of fire he can fire) and in position of deplacement, is there a way to integrate the horses in (without seing them of course....
    -is there a way to make a model occupable like tanks, bunkers, towers (I am sure not but if you have an idea...)

    1. I'm confident that the cart will advance. But don't wonder if the cart starts shooting
    2. Yes you could make the horses invisibe, when you replacing them with a tiny box with flipped sides or moving it 6 feet under the earth. But the easiest way to implement a tank is still to make the carriage as mount and the turret as rider.
    3. You are talking about models in general? i think Buildings can be made occupieable in the models_building table with adding a new ef_spline there. But things like cannons can't be made "mountable" as you see it in FPS Games (where soldiers sitting direclty behind and moving the parts). Maybe with creating an animation where the guy is direclty behind, but i tend to believe that as soon as the "cannon" is rotated few degrees he will sit in the Air.

  6. #6
    ♔Icebear77♔'s Avatar Biarchus
    Join Date
    Jan 2009
    Location
    Switzerland and Germany
    Posts
    673

    Default Re: How to add a new Cannon Model

    Thanks for that tutorial. +REP Hope you give me a hand if ill struggle...

  7. #7
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: How to add a new Cannon Model

    Of course, feel free to ask .

  8. #8
    ♔Icebear77♔'s Avatar Biarchus
    Join Date
    Jan 2009
    Location
    Switzerland and Germany
    Posts
    673

    Default Re: How to add a new Cannon Model

    Do you know a free 3D-Software that i can use for my first trials? I never did that before and dont want to buy a software as my first step.

  9. #9
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: How to add a new Cannon Model

    I suggest the Softimage XSI Modtool, it's based on the Softimage Package bei Autodesk and has all needed tools for Game development and many scripts for the proffesional package are working there too.

    Blender is free, too, but some say it has a horrible interface. But here you have the advantage that you can also create renders.

  10. #10
    B-DizL's Avatar TGW Lead Modeller
    Patrician

    Join Date
    May 2009
    Location
    America
    Posts
    5,900

    Default Re: How to add a new Cannon Model

    I have a question,

    every time i assign the materials to the model and save it as animatable_rigid_model all the materials get merged into one material with no texture assigned to it, i followed the instructions exactly but this happens every time i save in uu3d, is there a setting im not doing right that isnt mentioned in the tutorial?

  11. #11
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: How to add a new Cannon Model

    Maybe you overread this?:

    Again Right_click, choose Properties, change the diffuse slot to Bitmap, press change and search for your textures.

    The Material name has to be the same as the texture name.... eg field_cannon_diffuse.dds = field_cannon_diffuse Material.

    Do the texture show up in the viewport? If not mabye you have to assign the mat first to the model parts.

  12. #12
    B-DizL's Avatar TGW Lead Modeller
    Patrician

    Join Date
    May 2009
    Location
    America
    Posts
    5,900

    Default Re: How to add a new Cannon Model

    Quote Originally Posted by Primergy View Post
    Maybe you overread this?:

    Again Right_click, choose Properties, change the diffuse slot to Bitmap, press change and search for your textures.

    The Material name has to be the same as the texture name.... eg field_cannon_diffuse.dds = field_cannon_diffuse Material.

    Do the texture show up in the viewport? If not mabye you have to assign the mat first to the model parts.
    Yeah i did all of that too one strange thing tho when i add the diffuse texture it shows up on the model itself in uu3d but when i add the other 2 textures (gloss and normal) the model changes and only show a silver texture shows...

    Josst is helping me too, hes looking at the texture files themselves to make sure theres nothing wrong with them.

  13. #13
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: How to add a new Cannon Model

    Just to make sure, you also add gloss and normal textures to the material?

    If yes thats not necessary, uu3d automaticly writes the path for those and they get loaded as long as they are in the same directory of the example_texture_diffuse and share the same name: example_texture_gloss_map // example_texture_normal

    Besides that.... when you are loading the animatable_rigid_model in uu3d, you also have to put the texture in the same directory of the model, because if you haven't UU3D won't load the texture, when loading a mesh.

    But if you have them in different locations you don't have to worry, because the game loads the texture from the path you applied before exporting.

  14. #14
    B-DizL's Avatar TGW Lead Modeller
    Patrician

    Join Date
    May 2009
    Location
    America
    Posts
    5,900

    Default Re: How to add a new Cannon Model

    Ok ill gave that a try tonite thanks

  15. #15
    B-DizL's Avatar TGW Lead Modeller
    Patrician

    Join Date
    May 2009
    Location
    America
    Posts
    5,900

    Default Re: How to add a new Cannon Model

    Awesome it worked

    I did just what you said and loaded the first texture only and it auto loaded the other textures...

    Spoiler Alert, click show to read: 



  16. #16
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: How to add a new Cannon Model

    Awesome it worked

    I did just what you said and loaded the first texture only and it auto loaded the other textures...
    Great! Yes it took me also some time until i realised this

  17. #17
    S-te-Fan's Avatar Primicerius
    Join Date
    Jun 2008
    Location
    Diessen, The Netherlands, Near the belgium border.
    Posts
    3,905

    Default Re: How to add a new Cannon Model

    I wanted to make a wasserfall rocket but it seems you'll have to pay for the software...

    Oh well...

    Or someone else has to do this step for me. Anyone willing? I already have the model. The Projectile would be the rocket and the launch platform will be the "cannon".

  18. #18

    Default Re: How to add a new Cannon Model

    I figured out how to move the cannon models from ntw into etw. looks alot better.

    Download link here:http://www.twcenter.net/forums/attac...4&d=1310161116
    Last edited by General Hizzy; August 28, 2011 at 11:13 AM.


  19. #19
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: How to add a new Cannon Model

    Does anyone known how to add a limber model and its destruction and destructed models.

    unit_stats_land tables
    • Limber column : limber_model (limber model name from warscape_animated_lod and warscape_animated tables)
    • Ammo Train Battle Entity column: ammo_caisson_small (battle entity ID from battle_entities tables)
    • Carriage Battle Entity column : gun_train_2_horses (battle entity ID from battle_entities tables)


    warscape_animated_lod and warscape_animated tables :
    • limber_model (limber_lod1 to 4 animatable_rigid_model files)
    • Ammo_Caisson_destruction (limber_destruction animated_rigid_model)


    warscape_rigid_model_lod and warscape_rigid tables :
    • Ammo_Caisson_destructed (limber_destroyed rigid_model)


    battle_entities tables :
    • ammo_caisson_small (refer to an ammo_caisson role)


    If I can change the limber model, I can not find were Ammo_Caisson_destructed and Ammo_Caisson_destruction are used.
    Last edited by wangrin; January 13, 2012 at 04:31 AM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  20. #20
    PunitorMaximus's Avatar TWTEAW Mod Leader
    Join Date
    Dec 2010
    Location
    Austria (that one in europe)
    Posts
    2,881

    Default Re: How to add a new Cannon Model

    is there any other possibility to im/export the models? i dont want to buy uu3d because i think its too expensive....

    if not who would like to do this for me? its for our ww1 mod.

    if no one wants to do this: is there anyone who has already made some ww1 guns or who woud like to do this for me?

    just PM me
    Last edited by PunitorMaximus; February 10, 2012 at 06:46 AM.

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
  •