Page 1 of 6 123456 LastLast
Results 1 to 20 of 116

Thread: Merging parts of models in MilkShape 3D

  1. #1

    Default Merging parts of models in MilkShape 3D

    Greetings! I hope everyone had a great Thanksgiving.

    I recently encountered a thread where a modder complained about not being able to mix and match parts of units. Having done just that, I would like to share my knowledge with the rest of the community. I'm sure some of the more experienced modders are already familiar with this process or have their own way of doing it, and I believe my current process will eventually become obsolete. However, I believe it should suffice for now.

    I'd like to thank KnightErrant for his wonderful model converter. I appreciate the fact that it converts models into the MilkShape (.ms3d) format and does not require the use of 3ds Max; renewing a 3ds Max license is an expensive investment for a poor history major with a minimum wage job, plus I find Milkshape is much easier to use.

    For this tutorial, I will be recreating Sherburne's Additional Regiment from the American Revolution using a Don Troiani painting for reference:
    Spoiler Alert, click show to read: 
    My goal is to mix the body of a line infantry model with the legs, heads, and hats of the minuteman model.



    Tools you'll need

    LtChamber's Pack File Manager - Let's you open, edit, and extract the contents of the .pack files in Empire's data folder. I'll assume you know how to use it.
    KnightErrant's model converter - Converts .variant_weighted_mesh files into the .ms3d format and vice versa.
    MilkShape 3D - A simple 3d modeling program. There's a thirty day trial mode, and after that you can register for thirty-five dollars.



    Tutorial

    Remember to save and make copies of the files you're working with.

    (1) We'll start off by opening the models.pack file with the Pack File Manager. Most of Empire's unit models are located in the "unitmodels" folder, while the "textures" subfolder contains the textures, gloss maps, and normal maps.

    For my unit, I will extract "euro_line_infantry_lod1.variant_weighted_mesh" as well as "euro_minutemen_lod1.variant_weighted_mesh." The other "lod" variants are lower quality models that Empire uses when you zoom out on the battle map or set your graphics settings to low. Because I'm feeling rather lazy at the moment, I've decided to use the same quality model for every "lod" level.


    (2) We can convert the extracted files using KnightErrant's converter. After opening up the converted line infantry model in MilkShape, we see:
    Spoiler Alert, click show to read: 
    You might also see a blue skeleton, but we'll be dealing with that later.

    Clicking on the "Groups" tab in the top-right, you will notice that this model is actually made up of separate body parts. The multiple bodies, legs, heads, and hats give variation to the units in-game. For now, you will have to hide the parts that you do not want in the final model. This can be done by using the "Hide" function in the "Groups" tab.
    Spoiler Alert, click show to read: 
    You can take a quick look at the "Joints" tab if you like. If you do not already see the blue skeleton, click on the "Show skeleton" box near the bottom of the right panel. Now double-click on any one of the joints (part or all of the skeleton should turn green) and hit "SelAssigned". This will select several vertices.
    Spoiler Alert, click show to read: 
    Every vertex in a model is assigned to a joint, and this relates to the unit's animations. We'll ignore this for now and open up the minuteman model.


    (3) Once we've opened up the minuteman in MilkShape, we need to delete the body parts that we do not want merged with the line infantry model. This can be done on individual parts in the "Groups" tab by using the "Delete" function or double-clicking and using the "delete" key. We'll be saving the legs, heads, and one of the hats (because the minuteman's beret just looks silly).
    Spoiler Alert, click show to read: 
    At this point, I like to go to the "Joints" tab and delete any joints that are not being used in the current model. This makes things less messy and cluttered in the next step. We can check by using the "SelAssigned" button mentioned earlier. If no vertices get selected, it's probably safe to delete that particular joint. Likewise, keep any joint that has vertices assigned to it, even if it's only two points.

    Make sure you work from the bottom of the list to the top; it seems some of the joints are "parents" of other joints, and you might accidentally delete necessary joints if you work from top to bottom. In this tutorial, we will be deleting most of the joints relating to the hands and arms and saving the ones related to the head and legs.
    Spoiler Alert, click show to read: 
    We will also go to the "Materials" tab and delete "Figure" and "Attachments" using the "Delete" function. This will save us from having to deal with even more duplicates when we merge the two models. Now save this file under a new name (such as "minutemen_stuff.ms3d") and close it.


    (4) We will now merge the line infantry model with the "minutemen_stuff.ms3d" file. This can be done through "File -> Merge...":
    Spoiler Alert, click show to read: 
    Milkshape will import everything from the original file. Now go to the "Joints" tab. There are now many duplicate joints, and we need to merge them together. Find the joint that's on the bottom of the list and click of "SelAssigned". This should highlight several vertices. Now find the original joint of the same name somewhere higher on the list, click on it, and hit the "Assign" button.
    Spoiler Alert, click show to read: 
    In our case, we will select "Jaw" from the bottom of the list, hit "SelAssigned," select the other "Jaw" joint, and click on "Assign." We can make sure we did it correctly by going back to the original joint and pressing "SelAssigned" again. The joint is safe to delete if no vertices get selected. We will repeat the process for each duplicate item in the joints list.

    Head back to the "Groups" tab. We need to rename the body parts we just imported. This is a simple as copy and pasting the names of the equivalent originals (that we hid in Step 2). For example, the "Head01" group from the minuteman model will be renamed as "head_nohair01" in accordance to the line infantry naming conventions. We will delete the unused body parts after we are done.

    Our model is now ready to be used in-game. You might, however, want to make some small changes to the unit. For example, I played around with the coat length and made several duplicates of the hat, changing the direction and tilt of each one.

    After quickly making a texture and converting the model back into the ".variant_weighted_mesh" format, we get Sherburne's Regiment:
    Spoiler Alert, click show to read: 
    It turns out I made the coats too short.


    Feel free to point out any mistakes I may have made in the tutorial. If you found it helpful, I would appreciate a thank you. You don't have to mention me in your mod, though I would be grateful if you did. Happy modding everyone!

    God bless.
    Jeff C
    Last edited by ProvostGuard; December 01, 2009 at 11:16 PM.

  2. #2

    Default Re: Merging parts of models in MilkShape 3D

    Wow ! This is great stuff !

  3. #3

    Default Re: Merging parts of models in MilkShape 3D

    Quote Originally Posted by ProvostGuard View Post
    At this point, I like to go to the "Joints" tab and delete any joints that are not being used in the current model. This makes things less messy and cluttered in the next step. We can check by using the "SelAssigned" button mentioned earlier. If no vertices get selected, it's probably safe to delete that particular joint. Likewise, keep any joint that has vertices assigned to it, even if it's only two points.
    Great tutorial
    But, how??
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  4. #4

    Default Re: Merging parts of models in MilkShape 3D

    is it possible to put completely new units ingame now?

  5. #5

    Default Re: Merging parts of models in MilkShape 3D

    -TopCat-, the "delete" key on your keyboard should work.

    Quote Originally Posted by Ghost of Legio View Post
    is it possible to put completely new units ingame now?
    I don't think this can be done in MilkShape. It's probably safer (and easier) to use existing models as a base for new ones.

    God bless.
    Jeff C
    "How can you say, 'Let me take the speck out of your eye,' when all the time there is a plank in your own eye?"

  6. #6

    Default Re: Merging parts of models in MilkShape 3D

    Do you know if there is a way to Edit the weapons (and create new models) ?

  7. #7

    Default Re: Merging parts of models in MilkShape 3D

    I am not sure where the weapon files are located. I can't, however, imagine that it would be too difficult to edit and create new weapons out of them in MilkShape.

    God bless.
    Jeff C
    Last edited by ProvostGuard; December 02, 2009 at 02:45 AM.
    "How can you say, 'Let me take the speck out of your eye,' when all the time there is a plank in your own eye?"

  8. #8

    Default Re: Merging parts of models in MilkShape 3D

    Weapons are here

    MESHES
    model.pack ............unitmodels............> euro_equipment.variant_weighted_mesh


    Textures
    model.pack ............unitmodels.....Textures ......................equip_diffuse.dds

    If you give me the right tool I will make it

    A converter would be very welcome !

  9. #9

    Default Re: Merging parts of models in MilkShape 3D

    Did you try using KnightErrant's converter? And .dds files can be opened in Photoshop.

    God bless.
    Jeff C
    "How can you say, 'Let me take the speck out of your eye,' when all the time there is a plank in your own eye?"

  10. #10

    Default Re: Merging parts of models in MilkShape 3D

    Yes .................. thank you

  11. #11

    Default Re: Merging parts of models in MilkShape 3D

    When hit the delete key it removes the red highlight from the actual model, but not from the joints list??
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  12. #12

    Default Re: Merging parts of models in MilkShape 3D

    Try hitting "delete" when the vertices are not selected (though make sure the joint you want to delete is selected in the box on the right).

    God bless.
    Jeff C
    "How can you say, 'Let me take the speck out of your eye,' when all the time there is a plank in your own eye?"

  13. #13

    Default Re: Merging parts of models in MilkShape 3D

    Ok Ive solved that problem now.
    Whenever I start with a new model (that I made) The in-game unit appears contorter and streched out of place, on a very large scale. Looking at the model, it seems that after merging some joints are muddled up. e.g. when selecting the "head" joint it highlights the head and part of the cuffs
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  14. #14

    Default Re: Merging parts of models in MilkShape 3D

    Are you sure you assigned the vertices to joints correctly? Depending on your model, you might have to manually select vertices to assign to certain joints. I would advise you to study CA's models.

    God bless.
    Jeff C
    "How can you say, 'Let me take the speck out of your eye,' when all the time there is a plank in your own eye?"

  15. #15

    Default Re: Merging parts of models in MilkShape 3D

    Quote Originally Posted by ProvostGuard View Post
    Are you sure you assigned the vertices to joints correctly? Depending on your model, you might have to manually select vertices to assign to certain joints. I would advise you to study CA's models.

    God bless.
    Jeff C
    I have it sorted now, I firmly believe it was milkshape that did it not me

    Will rep you for an excellent tutorial and for the help, thanks alot
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  16. #16

    Default Re: Merging parts of models in MilkShape 3D

    No problem, and thank you. I hope everything goes well for you.

    God bless.
    Jeff C
    "How can you say, 'Let me take the speck out of your eye,' when all the time there is a plank in your own eye?"

  17. #17

    Default Re: Merging parts of models in MilkShape 3D

    Quote Originally Posted by KnightErrant View Post
    I've uploaded the one-way converter here:

    http://www.twcenter.net/forums/downl...o=file&id=2571

    Here's a picture of a textured model in Milkshape:



    There's still some issues with some u's being larger than 1.0 so they
    are off the texture in the TCE, not sure how that is used by the game.
    We'll leave that for after getting the back conversion to work.

    Any idea how to get that viewbox open??
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  18. #18

    Default Re: Merging parts of models in MilkShape 3D

    I'm not sure what you mean. You can see a textured, 3d-viewable unit by right clicking in any of the boxes and selecting "Textured," and "Projection -> 3D".

    God bless.
    Jeff Chu
    "How can you say, 'Let me take the speck out of your eye,' when all the time there is a plank in your own eye?"

  19. #19

    Default Re: Merging parts of models in MilkShape 3D

    Once again Ive sorted the problem and stumbled across a new one
    Ive just moved a hat from one body to another, but t doesnt fully line up with the body. Any tips?

    P.S. Ive tried the 'positioning tools' but they dont seem to make a difference

    Thanks again
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  20. #20

    Default Re: Merging parts of models in MilkShape 3D

    There are several things you can do if things aren't lined up. The easiest way is to simply select the vertices you want to move and then click and drag them to whatever position you want using the "Move" function in the Model tab. Alternatively, you can type in numbers in the "Move Options" section.

    God bless.
    Jeff C
    "How can you say, 'Let me take the speck out of your eye,' when all the time there is a plank in your own eye?"

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