• Modeler's Batch Tools
    2 replies, posted
These batch tools make a model-er's life easier! Hate creating vmt's for the textures youve created? Tired of people asking you to pack a model and all its files by itself? Want a quick and easy way to compile and view your models? THEN DOWNLOAD IT ALREADY. Theres also a batch that completely automates compiling obj's into source format, great for noobs! Read the documentation below and download here: [URL]http://www.1337upload.net/files/batch_tools.rar[/URL] [CODE]:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::Contents: :: I. Getting started :: II. Batch Descriptions :: IIa. MASS_VTF_COMPILER.bat :: IIb. MODEL_PACKER.bat :: IIc. OBJ2MDL_COMPILER.bat :: IId. QC_COMPILER.bat :: IIe. VMT_GENERATOR.bat :: III. Notes :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ------------------------------------------------- I. Getting started First of all f you have compiled before, or know what your doing, skip this step. We need to set up your system wide installation of source sdk so that you can use the tools. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 1. Go download/open source sdk from your tools tab in steam. % 2. Double click "Refresh sdk content" and let it run, it will take a while... % 3. Using the drop down menus, set the engine to Episode 1's engine. % 4. Also, set the game to "Half-life 2" % 5. And your done! Your ready to use my batch scripts without any problems %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% One last thing, your steam install MUST be on the C:\ drive, not in C:\Program files\steam, just C:\steam if not, none of these batch files will work. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ II. Batch Descriptions They should work on their own, but I've only tested them in the way their ment to be used. If you use them wrong it could cause them to not work as intended. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ IIa. MASS_VTF_COMPILER.bat ///////////////////////////////////////////// USEAGE: This batch file can be ran on its own or you may drag a .tga file onto it. PURPOSE: Its purpose is to convert and place all of your textures into your game folder. WHAT HAPPENS: If you run it directly, it takes all of the folders inside the "textures" folder and copys them to the sdk_content directory. So if you had a texture located in ...batch_tools\textures\mymodel\mymodel.tga, it would be moved to C:\steam\steamapps\<usrname>\sourcesdk_content\hl2\materialsrc\models\mymodel\mymodel.tga It would then be converted to a .vtf and placed in the according game directory. ...half-life 2\hl2\materials\models\mymodel\mymodel.vtf After all the textures have been moved and converted. vmt's will be created for all of them. The batch file will then close. If you drag a .tga onto it, it will move, convert, and create a vmt for it, similar to how it would with a mass of .tga's. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ IIb. MODEL_PACKER.bat ///////////////////////////////////////////// USEAGE: Double click it and follow instructions. PURPOSE: Its purpose is to get a model and all associated files alone so you can zip it and send it to friends. WHAT HAPPENS: After you give it a model name, it searches your hl2 folder for the model, after it is found it will copy all of the model files to the "compiled" folder. It will retain directorys so you can easily merge it with your game files. After it has copied the model files over, it will scan them for matching texture file names. WARNING: If there is a generic named texture [skin.vtf,metal.vtf] in your game directory, it may mistake it as associated with your model. To fix this, remove or rename them. After all associated files have been found they will be copyed into coorisponding directorys inside the "compiled" folder. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ IIb. OBJ2MDL_COMPILER.bat ///////////////////////////////////////////// USEAGE: Just drag your .obj file you exported from a modeling program onto the batch. PURPOSE: Directly compile an .obj into a source format. WHAT HAPPENS: Dragging an .obj onto the batch will cause it to be converted into a .smd file. This is achieved through obj2smd.exe, a program I found on the internet. WARNING: obj2smd.exe can only take ONE texture per model, and also, it is rotated 90 degrees for no reason, Physics models tend to also be rotated so its just a mess... Don't use this if you understand how to compile. After the smd is created, it will generate a qc, this requires some input from the user. A model directory and the surface prop are asked for. The materials directory is automatically set to ...materials\<modelname>. After a qc is generated, it will create a directory in the folder "textures" where you can place your textures. Place your .tga's and continue the batch script. It will convert all your textures, create vmt's for them, and compile your qc script. Once complete it will ask if you want to open it. Typing y and enter will open it in hlmv.exe. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ IIb. QC_COMPILER.bat ///////////////////////////////////////////// USEAGE: Drag your .qc file onto the batch file. PURPOSE: Quickly compile a qc file and open the model for testing. WHAT HAPPENS: Dragging a .qc file onto the batch will automatically make it compile the qc. Once complete, it will ask if you want to open it so you know how well it worked. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ IIb. VMT_GENERATOR.bat ///////////////////////////////////////////// USEAGE: Run it directly. PURPOSE: Quickly create a mass of basic .vmt files that are missing from your directory. WHAT HAPPENS: It will scan your whole hl2 materials folder for .vtf's without a vmt, and will create them as it finds the vmt's missing. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ III. Notes I am a noob at batch files, if these batch files are used incorrectly they may have unexpected results. :: All of these batch files are set to overwrite when they encounter conflits during copys. :: There is a hidden folder named 'exe' in the batch_tools folder. It contains the obj2smd.exe. :: The folder named objs isn't associated with the batch files, it is just ment for organization. :: You may distribute, edit, or copy these batch files, I don't give a shit :v. :: These batch files can't be moved places, they must be kept in batch_tools else they will do some weird stuff. :: None of the batch files will damage your system or delete important data. If it does, then your doing it wrong. :: Most of these batch tools just make my life easier, do not complain for them being "useless". :: Having an extra folder in your steamapps directory might confuse the batch[/CODE] Thank you for reading, I appreciate any feedback. If you have questions or problems please post them, I've tested the batch files plenty, but not on other machines. Right now the vtf converter doesn't accept drag and drop conversions, I know it says it does, I just forgot to code it before releasing. >.> It works anyway so no big deal.
These look SO useful. Thanks so much.
No problem, after i learned what batch could do I found them very useful too ^^
Sorry, you need to Log In to post a reply to this thread.