Modelling for Gmod #3 – Creating and Compiling First Model

Modelling for Gmod #3 – Creating and Compiling First Model


Hey, welcome to modelling for gmod Part 3, which is basic model in this tutorial, we will actually start modelling here are basically quick steps we start with launching 3ds max creating model, texturing, exporting to smd, writing qc file, compiling and testing I am gonna explain everything in detail also, I just realized something, if you remember from the previous tutorial, I said one vtf file can be used by many vmt’s that’s actually true, but you need to create, basically placeholder/dummy/temporary vtf file so that 3ds max can use it in the application I will go through that later, so start by launching 3ds max okay, that’s loaded, that’s fine, so this is basic model, we should just make 3 walls as one model and apply different textures to them that should be more than enough as an example or basic model to compile and it should look pretty much okay as well, so lets start by creating walls Note: I suggest you go to Customize ->Units Setup ->Select Generic Units because these units are the same units as source engine units in hammer editor if you ever used hammer editor for mapping for source engine, you know the units Generic MAX Units==Hammer Units so these will just help you estimate the size of the model so lets just create a wall set it’s height to 128 which is the standard wall height in source engine width 128 and 32 actually that’s a bit too much, 16, yeah 16 is fine so, that’s wall lets create 2 more to copy object, Hold Shift + Drag one of the 3 Axis sorry can’t spell that world properly just click 2 copies so we have 3 walls Note: this is not gonna be 3 seperate models, but all 1 model because models are made 1 scene==1 model so whatever happens on this scene this file, and whatever you see right now – is one model that’s it let’s start texturing (Press M) By the way, up to 2012 I think, we had different material editor which looked like this so every sphere is different texture basically or material but it’s exactly the same as new one except the new one i smore extended in possibilities so I am gonna use that in the example because it’s a bit more harder to use but if you’re using this [Stuttering] Explanation following next as we go to create a material, we right click on empty space Materials ->Standard and that’s it, double click and we have settings dialog for the classical view for the compact view you just select sphere and that’s it, exactly the same thing/dialog from this moment, you just follow the steps I use in slate material editor (new editor) except instead of double clicking this, you just click once Double click Diffuse is basically the main or the basic color or texture of the object so this is the main thing you need to change click little square Bitmap Browse to our textures brick01 ->Open that’s it, that’s fine You can close it for the time being I usually convert/attach all seperate objects in scene to one just to avoid any export problems which do happen sometimes you will get errors when compiling the model I can’t remember the exact error but it just happens so I prefer to convert all objects into one, usually so for that Right Click [Hold] Convert To Poly, Editable Poly NOT mesh, not Patch but Polygon Click “Attach” and click on objects to attach now we can texture each of the walls seperately Note: Vertex allows you to select specific CORNERS of Polygons I am not gonna go into details because I am not sure of them myself but main selection modes you will be using is Polygon for selecting faces/polygons or Element to select whole objects/elements that we just attached for this tutorial, I will be using Element so we select first lement/wall Press M again Right Click Assign Material to Selection (same for compact editor) now, if you want to view textured version in viewport You Right Click and “Show Standard Map in Viewport” Sizes are messed up because their are not properly textured I am not gonna go through advanced texturing like changing all these sides to match perfectly or look better I am just gonna focus this front part looking good so right now, it’s a brick wall, that’s fine don’t mind these edges for now I will go through texturing in future tutorials lets do same thing with 2nd wall again press M, Right Click ->Materials ->Standard Double Click and select our second texture brick01_red again, select 2nd element Right Click ->Assign Material to Selection, and Show Standard Map in Viewport there, two different walls Now about the thing I mentioned in start of the video about creating placeholder/dummy/temp vtf file I just recently realized the problem If we open materials and Create New Material and we try to reference/open texture we cannot reference the vmt files while source engine will realize there is three textures and they exist 3ds max does not realize that 3ds max needs the actual vtf files so we just need to create a temp/placeholder/dummy texture which we will not use later on so just copy other vtf file and name it brick02 3ds max is looking for vtf file (texture) while source engine will look for vmt (material) file so that’s the main problem with this situation after you compile model, you wont need it Make sure dummy file is named same as vmt file otherwise if I just copied brick01, it would look for brick01.vmt, not brick02.vmt so now we can reference it as well this is bare minimum for model now go to Export save it as .smd usually for just props or models you leave this default if you are creating animations – you export sequence I will do that in future tutorials for animations so that’s fine, no problems minimize or close it now [Got Mixed up, ignore] create QC file QC file tells the compiler what or how to compile a model where the materials are located what the model will be called as it’s physical properties and things like that about the model I will just create the basic lets save as example_mdl.qc now we can start writing the QC file $modelname name to compile to, where the actual model will be located so in my case it’s als/example_model/brick_wall.mdl so that’s where it’s gonna compile this is the body of model, the main SMD file which is example_mdl.smd which we just made this is one of the main properties we need to specify $suraceprop is telling what kind of material or physical material/properties the model inherit this can be prop, glass, metal, even brick you can find list of surfaceproperties on source wikipedia there is a huge list, I only know the basic ones like metal, brick, concrete, grass, sand, item you can find it out yourself anyway by the way, $surfaceprop is optional, if you want you can specify it otherwise the default $surfaceprop will be generic this is the path textures, it tells model where to look for textures so in our case it’s als/example_model/ , that’s it, the textures are there $sequence idle basically… if you have animated model you specify all the sequences or possible animations since we dont have any sequence or animations we just use the default body (example_mdl.smd) as the default state of model so it’s basically saying: “when you spawn – display/become as this (example_mdl.smd)” if you had shoot or move sequence that’s what we would write while idle, specifies that this is the default animation even though it’s not animated now $collisionmodel [Putting thoughts into words.. can skip to 16:03 ] basically collision model is – you cant see it but you can interact with it [Brief Example of what Collision Model is] $mass is how heavy it is and $concave it’s just kinda like type of collision I will go into that in future tutorial on advanced collisions so this is bare minimum we need for compiling by the way since this is a basic model, I didn’t create seperate collision model I am just using default (example_mdl.smd) it’s gonna automatically generate it based on example_mdl.smd because this is not a complex model, it will auto do it so we are done Before we compile you need to make sure that this path exists in Gmod Directory otherwise the compile will fail so lets just create it models als example_model before we compile since I already explained why I am making such folder structure so it’s ready to use in gmod here is how it works we just drag materials and models folders to gmod directory that’s it, nothing else is required lets compile the model launch GUIStudioMDL it’s just giving us a warning that EP1 paths are not set Orange Box ->Garrys Mod load QC file here is our example_mdl.qc you shouldn’t edit any of these flags they are just additional settings/debbuging tools Click Compile there are warnings, not errors it’s just saying collision model is incorrect basically because I am using body smd for collision model

5 thoughts on “Modelling for Gmod #3 – Creating and Compiling First Model”

  1. i have a program in steam called Fuse. can i use that with QC generator to get a model into gmod? it makes the models and textures in-fuse, it just lacks the skeleton (i think?)

  2. Could you help me? Why is the model like this ingame http://imgur.com/a/UuftL Is it because of the textures or why is is so clipy. I generated it with VertexlitGeneric (i normaly make playermodel). In VTF Edit so the model cant be the problem it looks fine in blender. http://imgur.com/a/yEy1j So it can only be the textures right? I created the wrong vmt or something

  3. The model is in the game and working but the issue I have is the model shows as invisible but I know it is spawned because I can apply textures with the tool gun, any idea what it could be?

Leave a Reply

Your email address will not be published. Required fields are marked *