SC2Mapster Forums

Resources > Tutorials

Warcraft Model Library - How To

  • 1 post
    #1 Aug 10, 2012 at 07:06 UTC - 1 like

    Description

    This is a tutorial on how to make Warcraft Model Library Dependencies based around the Warcraft Model Library Project. In this tutorial I'll show how I export the Models from WoW Model Viewer, optimize the textures, import them into the Sc2 Editor, and create the data entries efficiently and effectively. This is just how I do it, if you know any way that I could improve upon this process, let me know!!

    Again, the point of this tutorial is to learn how to make mod files that can be used as dependencies in other maps.

    Programs You'll Need

    Starcraft 2 Editor (obviously)

    Exporting Models From WoW Model Viewer

    - IF YOU WANT TO SEE THIS TUTORIAL WITHOUT THE IMAGES, SCROLL DOWN! -

    1. First, you'll need to set up a folder wherever you want that will contain all your models (I made mine on the Desktop and named it "Warcraft Model Library"
    2. Then, create a new folder and name so that it describes the theme of your model library (for example, if I was exporting Orc Models, I would name it "Orcs"). We will call this the Theme Folder.
    3. Then You'll need to open up the WoW Model Viewer and find a model you want to extract. Go to File-> Export Model -> .M3.
    4. From here you'll need to navigate to the Theme Folder you created. Once in the Theme Folder, create another new folder and name it so that it describes the model (so if you're exporting a fountain model, name the folder "Fountain"). Then click on the new folder. http://i842.photobucket.com/albums/zz343/XenobloodAION/Tutorial/SettingUp-2.png
    5. Finally, rename the model so that its name is the Theme FolderObject (continuing the fountain example, you'd name it ZangarFountain). Remember to keep the first letter of a new word Capitalized and have no spaces in the file name! If you are exporting multiple variations, just add "_00, _01, _02, etc" to the end of each file name.

    Optimizing Textures and Importing Them Into the Sc2 Editor

    1. Now that you have all your models exported into your Theme Folder, go to the Theme Folder and create two new folders called ALL TEXTURES and ALL MODELS.
    2. Now, search within the Theme Folder the letters ".tga". Copy all the textures and hit the back button and then paste them into the ALL TEXTURES folder. Search again for the letters ".m3". Paste all the .m3 files in the ALL MODELS folder.
    3. Now go to the ALL TEXTURES folder and open up BLP Lab. After opening the program, go to Tools -> Batch converter.
    4. Under Source formats check "TGA" and make the destination format "DDS". Also change the source and destination folders so that they are directed to the ALL TEXTURES folder you created. Just to be sure, check that the File Format Options are set correctly in the .DDS tab (compressed DXTC with 1 mipmap count) NOTE: You might not want to convert lighting textures (like glow, candel light, etc) so you can just take them out of the ALL TEXTURES folder and then paste them in after you've converted them.
    5. Now Navigate to the ALL TEXTURES folder and select all of the .tga files. (You can do this easily by sorting by file or searching for ".tga"). Once selected delete them. (this is when you'd add any .tga files you didn't want to convert).
    6. Now open up your file extension changer. Select all of the .dds files and drag them onto the extension changer program. Then typ tga and press "change".
    7. Now Open up the Sc2 Editor. Create a new MOD file. Click through and then open the Import tab.
    8. Right click and select "Import Files" and then click on "Browse".
    9. Navigate to the ALL TEXTURES folder and import all the textures. Save and close the mod (make the name unique and descriptive), and then reopen the mod file. This time import the models by navigating to the ALL MODELS folder. You can move the models to their own folder in Sc2 if you want by right clicking -> Move Files (select "new path").

    Data Entries

    1. Now for some data work: Open the data editor and navigate to the models tab.
    2. Change the Data Source to your mod only.
    3. Right Click and select "add model". The name and ID do not matter as this is just going to be a template for our XML work. Change Model Type to "Generic" and Parent to "CModel", then click OK. IN the model info to the right, go to the variation count and change it to 2. (This creates the XML entry that allows us to change the variation count). It should all look like this:
    4. Now click on the XML View button
    5. You should see the data in the right hand console now. Here's where having two monitors is nice, however you can do it with one. Make the data window half of your screen, and open up the Import tab and make it take up the other half.
    6. Next change the text in quotes next to the line that says "CModel id=" in the XML view to the exact name of the first model in your imports tab, ignore the _00. (For example if your first model was WorgenAfgan_00, you would put WorgenAfgan)
    7. Change the text next to "Model value=" to the file path of the model. If you put the models in a folder you put the EXACT name of the folder followed by a forward slash and then the same text you put next to "CModel id="
    8. Then change the Variation Count value so that it will include all the variations for that model. (if there is only one, delete this line AFTER copying everything from CModel to /CModel)it should look like this:
    9. Now copy the four lines of code (From "<CModel" down to "</CModel" and paste it. Repeat steps 6-8 for every model (NOT for every variation)
    10. When done, press the Commit XML Changes button and switch over to the Actor Tab. (Make sure to switch off of the XML View for now)
    11. Create a new actor (I set a keybind in the preference tab to be Shift + Space) and make the name just like the first model (like you did in the models tab), but the only difference is you can add spaces in between words (keep the capitalization the same). Then hit Suggest and Okay (don't change anything else).
    12. Continue creating new actors for every model entry like this.
    13. Once done, switch back to XML View and copy all of the actor xml code.
    14. Now open up Excel and past the code into Excel.
    15. Go to "Find & Select" and click "Replace"
    16. In the "Find What" box, type CActorAction; in the "Replace With" box type CActorDoodad. Then click "Replace All" and hit OK.
    17. Do this same thing again, but type parent="GenericAttack" in the "Find What" box and have nothing in the "Replace with". Replace All and hit OK.
    18. Copy this data and replace it in the Editor. Click on commit changes and you're done!! Go through each Actor entry and make sure they all link up with the models and that everything works.

    NO IMAGES

    Exporting Models From WoW Model Viewer

    - IF YOU WANT TO SEE THIS TUTORIAL WITHOUT THE IMAGES, SCROLL DOWN! -

    1. First, you'll need to set up a folder wherever you want that will contain all your models (I made mine on the Desktop and named it "Warcraft Model Library"
    2. Then, create a new folder and name so that it describes the theme of your model library (for example, if I was exporting Orc Models, I would name it "Orcs"). We will call this the Theme Folder.
    3. Then You'll need to open up the WoW Model Viewer and find a model you want to extract. Go to File-> Export Model -> .M3.
    4. From here you'll need to navigate to the Theme Folder you created. Once in the Theme Folder, create another new folder and name it so that it describes the model (so if you're exporting a fountain model, name the folder "Fountain"). Then click on the new folder.
    5. Finally, rename the model so that its name is the Theme FolderObject (continuing the fountain example, you'd name it ZangarFountain). Remember to keep the first letter of a new word Capitalized and have no spaces in the file name! If you are exporting multiple variations, just add "_00, _01, _02, etc" to the end of each file name.

    Optimizing Textures and Importing Them Into the Sc2 Editor

    1. Now that you have all your models exported into your Theme Folder, go to the Theme Folder and create two new folders called ALL TEXTURES and ALL MODELS.
    2. Now, search within the Theme Folder the letters ".tga". Copy all the textures and hit the back button and then paste them into the ALL TEXTURES folder. Search again for the letters ".m3". Paste all the .m3 files in the ALL MODELS folder.
    3. Now go to the ALL TEXTURES folder and open up BLP Lab. After opening the program, go to Tools -> Batch converter.
    4. Under Source formats check "TGA" and make the destination format "DDS". Also change the source and destination folders so that they are directed to the ALL TEXTURES folder you created. Just to be sure, check that the File Format Options are set correctly in the .DDS tab (compressed DXTC with 1 mipmap count) NOTE: You might not want to convert lighting textures (like glow, candel light, etc) so you can just take them out of the ALL TEXTURES folder and then paste them in after you've converted them.
    5. Now Navigate to the ALL TEXTURES folder and select all of the .tga files. (You can do this easily by sorting by file or searching for ".tga"). Once selected delete them. (this is when you'd add any .tga files you didn't want to convert).
    6. Now open up your file extension changer. Select all of the .dds files and drag them onto the extension changer program. Then typ tga and press "change".
    7. Now Open up the Sc2 Editor. Create a new MOD file. Click through and then open the Import tab.
    8. Right click and select "Import Files" and then click on "Browse".
    9. Navigate to the ALL TEXTURES folder and import all the textures. Save and close the mod (make the name unique and descriptive), and then reopen the mod file. This time import the models by navigating to the ALL MODELS folder. You can move the models to their own folder in Sc2 if you want by right clicking -> Move Files (select "new path").

    Data Entries

    1. Now for some data work: Open the data editor and navigate to the models tab.
    2. Change the Data Source to your mod only.
    3. Right Click and select "add model". The name and ID do not matter as this is just going to be a template for our XML work. Change Model Type to "Generic" and Parent to "CModel", then click OK. IN the model info to the right, go to the variation count and change it to 2. (This creates the XML entry that allows us to change the variation count). It should all look like this:
    4. Now click on the XML View button
    5. You should see the data in the right hand console now. Here's where having two monitors is nice, however you can do it with one. Make the data window half of your screen, and open up the Import tab and make it take up the other half.
    6. Next change the text in quotes next to the line that says "CModel id=" in the XML view to the exact name of the first model in your imports tab, ignore the _00. (For example if your first model was WorgenAfgan_00, you would put WorgenAfgan)
    7. Change the text next to "Model value=" to the file path of the model. If you put the models in a folder you put the EXACT name of the folder followed by a forward slash and then the same text you put next to "CModel id="
    8. Then change the Variation Count value so that it will include all the variations for that model. (if there is only one, delete this line AFTER copying everything from CModel to /CModel)it should look like this:
    9. Now copy the four lines of code (From "<CModel" down to "</CModel" and paste it. Repeat steps 6-8 for every model (NOT for every variation)
    10. When done, press the Commit XML Changes button and switch over to the Actor Tab. (Make sure to switch off of the XML View for now)
    11. Create a new actor (I set a keybind in the preference tab to be Shift + Space) and make the name just like the first model (like you did in the models tab), but the only difference is you can add spaces in between words (keep the capitalization the same). Then hit Suggest and Okay (don't change anything else).
    12. Continue creating new actors for every model entry like this.
    13. Once done, switch back to XML View and copy all of the actor xml code.
    14. Now open up Excel and past the code into Excel.
    15. Go to "Find & Select" and click "Replace"
    16. In the "Find What" box, type CActorAction; in the "Replace With" box type CActorDoodad. Then click "Replace All" and hit OK.
    17. Do this same thing again, but type parent="GenericAttack" in the "Find What" box and have nothing in the "Replace with". Replace All and hit OK.
    18. Copy this data and replace it in the Editor. Click on commit changes and you're done!! Go through each Actor entry and make sure they all link up with the models and that everything works.
    Last edited Aug 10, 2012 by Terminator8
  • 1 post

You must login to post a comment. Don't have an account? Register to get one!