{{htmlmetatags>metatag-keywords=(pac3,wiki,gmod,mdl,tutorial,guide,help,obj,convert,creation)
metatag-description=(A relatively simple tutorial on converting models to .MDL)
metatag-og:title=(Simple .MDL: Converting Models)
metatag-og:description=(A relatively simple tutorial on converting models to .MDL)
}}
{{tag>tutorial model obj mdl zip}}
====== Simple .MDL: Converting Models ======
This guide is mainly intended for people who want to convert their old models (usually **.OBJ**) to **.MDL** and don't really care about the additional features so it only covers simple model creation. It assumes that you're using **.OBJ** files, however this method will work for any kind of model, including those with bones.
===== Requirements & Preparations =====
Before you start enable file name extensions in Windows. This is gonna help you avoid getting confused with all the different file types.
__**Windows 10**__
* In **Windows Explorer** go to View and check {{icon>fas fa-check-square}} File name extensions.
__**Windows 11**__
* In **Windows Explorer** go to View -> Show > and check {{icon>fas fa-check-square}} File name extensions.
All required tools as well as methods of downloading and installing them are listed below.
==== Blender and Source Tools ====
Download [[https://www.blender.org/download/releases/|Blender]]((Tested with **2.83**)) and [[http://steamreview.org/BlenderSourceTools/|Blender Source Tools]] then:
- Install **Blender**
- Open **Blender**:
- Go to Edit -> Preferences -> Add-ons -> Install
- Select the blender_source_tools file and click Install Add-on
- Make sure to check the box next to the add-on name and press Save Preferences\\ {{tutorial:mdl:blender-setup.jpg}}
==== Crowbar and 7-Zip ====
Download [[https://www.7-zip.org/|7-zip]] and [[https://steamcommunity.com/groups/CrowbarTool|Crowbar]] then:
- Install **7-Zip**
- Unpack **Crowbar** using **7-Zip**
- Open **Crowbar** and go to the Set Up Games tab
- At the bottom, in the **Steam Library Folders** section click Browse... and select your **Steam** folder ((This should be the folder that contains the **steamapps** folder, for example C:\Program Files (x86)\Steam))
===== Creating .MDLs =====
==== Exporting ====
- Open Blender and import your **.OBJ** model --- File -> Import -> Wavefront (.OBJ)
- Go to the **Scene** panel:
- Set **Export Path** to the folder that you want to export the model to.
- Set **Export Format** to SMD \\ {{ tutorial:mdl:blender-scene-settings2.jpg }}
- Click Export -> Collection.smd
==== Compiling ====
Download {{ :tutorial:mdl:model.qc }} and put it in the folder where you exported the **.SMD** file, make sure that exported **.SMD** file is called Collection.smd then:
- Open **Crowbar** and go to the Compile tab
- Click Browse... in the **QC input:** line and select the model.qc file that you downloaded
- Change **Output** to Subfolder
- Change **Game that has the model compiler** to Garry's Mod
- Click Compile and wait for it to finish.
==== Creating a .ZIP archive ====
- After compiling the model in **Crowbar** click Goto to find the compiled model files
- If you want to convert textures and include them in your archive, now is the time -> [[:tutorial:simple_mdl:materials]]
- Select all the files, right click them and select 7-Zip -> Add to archive...
- In the new window set **Archive format** to zip and **Compression level** to Store then click OK
- Upload the **.ZIP** archive -> [[tutorial:hosting]]
- Use the link in the [[:part:model]] part
And that's it.
===== Additional Information =====
You can add materials to your model once you import it into PAC -> [[:tutorial:replacing materials]]
More info about **.MDLZIP** archives -> [[:tutorial:using mdl files]]
Crowbar explained -> [[https://steamcommunity.com/sharedfiles/filedetails/?id=791755353|Crowbar (Modding Tool) Guide]]
Ask for help -> {{icon>fa fab fa-discord?color=#7289da&fw&lg}} [[https://discordapp.com/invite/utpR3gJ|Official PAC Discord]]