1. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  2. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice
  3. Melee Mapping Contest #3 - Results are out! Congratulate the winners and check plenty of new 4v4 melee maps designed for this competition!
    Dismiss Notice
  4. The winners of our cinematic soundtrack competition have been decided! Step by the Music Contest #11 - Results to check the entries and congratulate the winners!
    Dismiss Notice

Editing and creating models for Starcraft II

Discussion in 'StarCraft II Tutorials' started by Zwiebelchen, May 6, 2010.

  1. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,778
    Resources:
    11
    Models:
    4
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    11
    Note: This tutorial is NOT meant to tell you anything about modeling in general. There are plenty of other tutorials on the web that teach you the basics of modeling, animating and mapping. This tutorial was written only to tell you how to make your model work in SC2.

    Additional Note: There is currently NO tool on the web that allows actually converting .max files to .m3. All you can do until now is preparing the model for SC2, so that you can convert it once StarTools, the built-in model editing and converting program of SC2 releases. Either that or wait for some crazy Russian who is writing another maxScript to actually export .max to .m3.

    So let's begin...

    1. Importing a SC2 model to 3dsMax

    1.1 Required tools:
    - LadiK's MPQ Editor: http://www.zezula.net/en/mpq/download.html
    - .m3 import script for 3ds max: http://www.sc2mapster.com/assets/m3-import-plugin/files/6-m3-import-0-21/

    1.2 Installing the .m3 import script:
    - Put the extracted import-plugin folder into your Scripts folder in 3ds max. You can basically put it anywhere, but by default, 3ds max places it into this folder, so you will find it faster.

    1.3 Extracting the SC2 files:
    - Open LadiK's MPQ Editor
    - The options menu will pop up now. If it doesn't, then you can access it manually by clicking the Tools tab and clicking on "Options"
    - Select a work directory. This is the directory where all your exported models, skins, etc. will be extracted to.
    - Select your SC2 folder as the list-file directory.
    - Now go File/Open MPQ
    - Go to your SC2 directory/mods/Liberty.sc2mod
    - Select "Base.sc2assets". This file contains almost all art files that exist in SC2 beta.
    - In the directory window on the left side, right click on "Assets" and click "Extract".

    The editor will now extract all files into the Assets archive to the extraction directory.
    Note: The complete extracted Base.SC2Assets file has a size of 3 GB, so make sure you have enough hard disk space.

    1.4 Importing the model to 3dsMax:
    - Open 3dsMax.
    - In the "MAXScript" tab, select "Run Script"
    - Select the m3_import file
    - Click on the hammer icon, "utilities", found on the top right corner of 3dsMax
    - Click on the "MaxScript" button for it to expand
    - On the bottom of the utilities tab, select "m3 import" from the expandable field
    - Click "open" and select the model you want to import from the extracted SC2 MPQ folder; then click "Import"
    Note: This may take a while, depending on the number of animations and polygons.
    - You will now encounter an error that tells you that 3dsMax couldn't find the textures used by the model. Click "no" and write down the names of the files.
    - Copy and paste those texture files to your "maps" directory of 3dsMax. If you are too lazy to do that for every model you want to edit, just move the whole textures folder there.
    - Try to import the .m3 file again and it should work now.
    - The m3 sequences script will run and fire automatically now, which allows you to browse through the animations of the model.
    (On older 3ds max versions, you may need to also install a .dds plugin in order to make it display .dds files correctly. You can download it here: http://developer.nvidia.com/object/3dsmax_dds_plugins.html)

    Note: Remember that this .m3 import script is far from being perfect ... it may mess up some meshes and can also produce weird animations, but for simple objects, it should work fine.


    2. Importing a .dds texture to Photoshop

    2.1 Required tool:
    - http://developer.nvidia.com/object/photoshop_dds_plugins.html

    2.2 Installing the .dds import script for Photoshop:
    - This is different and depends on the version of Photoshop you have. Simply try it on your own.
    - You should now be able to import and export .dds files to photoshop


    3. Special things you need to remember when making models for SC2

    3.1 Animation names:
    The naming convention of SC2 seems to be quite the same as in WC3 - except that you do not write "Stand -1" anymore, but "Stand 01".
    But basically, you can write any name for your animations that you want as the data editor of SC2 allows manual setting of the "standard" animations for actors' models.
    There are also two new "standard" animations you might add to your model: "Stand Left" and "Stand Right", which seem to be turning/sidestep animations. You should really make those, because lots of custom maps will use keyboard unit controls that allow sidesteps, which would look weird without these animations.

    3.2 Nodes
    Remember to add attachment nodes to the bones of your units. Nodes in SC2 are basically just additional bones named with a certain naming convention, which is:
    "Ref_nodename".
    Example: Ref_origin is a static point between the feet of the unit.

    If you need more than just the ordinary attachment points "head", "origin", etc. then you should name them "Ref_Hardpoint XX" with XX being a number between 1 and 20.
    This should be done because GUI only allows those names to be accessed in the trigger editor.

    Note: It seems that there are no more refpoints for "Hand" anymore. Instead, you can use "Ref_Weapon Left" and "Ref_Weapon Right" or simply "Ref_Weapon".
    Also, the chest node is gone. It seems that "Ref_Center" has taken its place.
    Sometimes, there is also "Ref_Target", but not all units have it (For example, zealots don't), so I suppose it can't be that important.
    Also, it seems that "Ref_Hardpoint" without a number is always near the Center of the unit. I don't know if that is important or not. You should add this uncounted Hardpoint to the center too, just to go sure.

    Also, there are some more special points that I couldn't figure out what they do:
    "HitTestTight", such as "HitTestFuzzy", which are always below the feet of the unit, "HitTestFuzzyXX" with XX being a number. I don't know what they are there for. They don't have "Ref_" before their name, so it could also be just helper bones for the specific unit that have no real effect on gameplay. Or they somehow have an effect on collision detection of missiles.



    PS: The tutorial will be extended once a working tool exists that is able to convert .max files into .m3.
     

    Attached Files:

    Last edited: May 13, 2010
  2. killer1390

    killer1390

    Joined:
    Mar 19, 2008
    Messages:
    90
    Resources:
    0
    Resources:
    0
    Good tutorial. Thanks!
     
  3. Pyritie

    Pyritie

    Joined:
    Nov 26, 2006
    Messages:
    11,357
    Resources:
    60
    Models:
    30
    Icons:
    9
    Packs:
    3
    Skins:
    12
    Tools:
    1
    Maps:
    1
    Tutorials:
    4
    Resources:
    60
    could someone confirm that this works?
     
  4. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,778
    Resources:
    11
    Models:
    4
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    11
    The first two parts about importing models and textures work 100%. For the third part, this is merely an assumption of me, as - right now - there is no real way to export 3ds models to .m3. Everything below point 3 is based on closely checking out the .m3 imports and trying to understand how they work.
     
  5. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,418
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Perhaps you could show a screenshot of the final result. (Since I don't have 3dsMax to test it fully) I believe you that it works but I'm not sure about the other moderators.

    Add that, and then I'll fix some of the grammar (if necessary) and it'll be approvable. =)
     
  6. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,778
    Resources:
    11
    Models:
    4
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    11
    Added a screenshot of an animated zealot now to prove that it works :)
     
  7. Statharas

    Statharas

    Joined:
    Jul 9, 2008
    Messages:
    2,337
    Resources:
    14
    Tools:
    1
    StarCraft II Resources:
    5
    Tutorials:
    8
    Resources:
    14
    Just find a way for us to export models..
     
  8. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,778
    Resources:
    11
    Models:
    4
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    11
    There is one ... i mentioned a link. But it does only work in some special cases.
     
  9. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,418
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Awesome. It seems to work fine and some browsing on sc2mapster showed that it worked fine for several other people as well. It is ready for approval now. =)

    EDIT: Fixed the grammar. Approved. =)
     
  10. xXm0RpH3usXx

    xXm0RpH3usXx

    Joined:
    Mar 19, 2005
    Messages:
    488
    Resources:
    3
    Models:
    1
    Icons:
    1
    Skins:
    1
    Resources:
    3
    nice one! u get repped for this, sir ;)
     
  11. Misha

    Misha

    Joined:
    Jun 9, 2008
    Messages:
    7,119
    Resources:
    69
    Models:
    60
    Icons:
    1
    Packs:
    2
    Skins:
    4
    StarCraft II Resources:
    2
    Resources:
    69
    Hmm.. we that rely on free stuff seem to have a really looong wait ahead of us.. :/
     
  12. Oziris

    Oziris

    Joined:
    Oct 14, 2006
    Messages:
    4,106
    Resources:
    3
    Icons:
    1
    StarCraft II Resources:
    1
    Tutorials:
    1
    Resources:
    3
    Thanks for the tutorial, now I'm going to start practicing and be prepared for 6 years of Starcraft II moding!
     
  13. TDR

    TDR

    Joined:
    Sep 26, 2004
    Messages:
    1,463
    Resources:
    2
    Skins:
    1
    Tutorials:
    1
    Resources:
    2
    Cool, but I think I'll wait for the equivalent of ArtTools.
    BTW, didn't they used to say that they'll release every tool that they used to the public at launch?
     
  14. xXm0RpH3usXx

    xXm0RpH3usXx

    Joined:
    Mar 19, 2005
    Messages:
    488
    Resources:
    3
    Models:
    1
    Icons:
    1
    Skins:
    1
    Resources:
    3
    remember how long they took to release the art tools? like.. years after wc3s release? :p
     
  15. TDR

    TDR

    Joined:
    Sep 26, 2004
    Messages:
    1,463
    Resources:
    2
    Skins:
    1
    Tutorials:
    1
    Resources:
    2
    Aye, took quite some time. More time for TF2 then :p.
    Was really looking forward to mod SC2. Probably I'll model now and export them later, when something more elaborate will be available (maybe even make some video tutorials about them).

    I'll probably use this import method mentioned in this tutorial to check out the average polygon counts, to have some guidelines.
     
  16. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,778
    Resources:
    11
    Models:
    4
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    11
    The average polygon count is at around 1500 for the average SC2 unit. Some got more (like the Thor), some got less (like the Marine).
    Bigger units have up to 6000 polys.

    @ Topic: I am going to upgrade this tutorial soon once I got the time for it.
     
  17. TDR

    TDR

    Joined:
    Sep 26, 2004
    Messages:
    1,463
    Resources:
    2
    Skins:
    1
    Tutorials:
    1
    Resources:
    2
    Oh, thanks a lot m8 :)
     
  18. Falconeye

    Falconeye

    Joined:
    Jul 18, 2008
    Messages:
    276
    Resources:
    0
    Resources:
    0
    When I open a texture I extracted in photoshop it is orange in color :/
     
  19. Pyritie

    Pyritie

    Joined:
    Nov 26, 2006
    Messages:
    11,357
    Resources:
    60
    Models:
    30
    Icons:
    9
    Packs:
    3
    Skins:
    12
    Tools:
    1
    Maps:
    1
    Tutorials:
    4
    Resources:
    60
    Are you using the "official" .dds import plugin?
     
  20. Falconeye

    Falconeye

    Joined:
    Jul 18, 2008
    Messages:
    276
    Resources:
    0
    Resources:
    0
    I'm using the one from the link on this topic.