Garry's Mod

Garry's Mod

gm_ravenholm_snow
TheOgre26  [developer] 13 Apr, 2019 @ 4:14am
PART 3: Converting and importing the texture to Hammer Editor for garry's mod.
This is most likely the hardest part for those who do not dig through their file browser often. Nonetheless, the hardest part came under triumph.


STEP 14: Let's make this thing a working texture! First, delete all the layers you do not need anymore, which includes the background. You are merging "Layer2 copy", "Layer2 copy #1", and "Layer2 copy #2". Rightclick on the layers and leftclick "Merge Visible Layers". In its window, keep "Expanded as necessary" checked.

14. https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1711060691

Go to File>Export As (Shift+Ctrl+E). Give the image a name. The file extension that VTFEdit recognizes is .tga (TarGA image). That is what we want. My image will be named "tutorial.tga". Save it where ever accessible.


STEP 15: Rightclick on the image, choose "open_with>choose_another_app>VTFEdit.exe" and check the box that says, "Always use this app to open .tga files". This will do you a favor for texture making in the future.

15. https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1711061381

If that does not work for some reason, you can just open up VTFEdit.exe, leftclick FIle>Import (Ctrl+I)>choose the image from where ever you saved it. The image pops up a bit scroggly without transparency, which you can turn on by going to View>Mask (Ctrl+M).


STEP 16 "put things in place": Time for a short lesson if you are a beginner: .vtf is an acronym for "Valve Texture Format", which garry's mod uses to interpret the texture being displayed on a geometrical face. A .vmt file is an acronym for "Valve Material Type", which gives the texture identity in a diverse range of actions and effects.

In VTFEdit, go to Options>Auto Create VMT File. Make sure the .vmt file does NOT create automatically.

Open up your file browser/explorer. Locate your garrysmod directory. Mine is found in,
C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod

Find the materials folder. In there, create a new folder with any name. Mine is called "custom"
The path is now,
C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod\materials\custom

This is where your textures will go. In VTFEdit, go to File>Save As (Ctrl+Shift+S), give it a name. I will call it "auroraborealis2". Copy the path from your "materials\custom" folder into the texture's destination (shown in the red box in the image).

16A. https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1711061702

Now go to Tools>Create VMT FIle. A window pops up. In "Base Texture 1:" it should say, somethiing like "custom/auroraborealis2". In options, you can leave everything alone except have "Translucent" checked. Click "create" and it should automatically read the .vmt in the same destination as its .vtf. Click "save".

16B. https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1711062002


STEP 17: Close VTFEdit. In your file browser, find your new texture. Open the .vmt file in notepad.exe or in whatever line editor. Copy the following programming and paste them into the text document/.vmt:
_________________________________________________________________________

"UnLitGeneric"
{
"$basetexture" "custom/auroraborealis2"
"$translucent" 1
"$additive" "1"
"$nocull" "1"
"Proxies"
{

"TextureScroll"
{
"texturescrollvar" "$basetexturetransform"
"texturescrollrate" 0.005
"texturescrollangle" 0
}
}
}

_________________________________________________________________________

The .vmt should look like this:

17. https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1711062916

Chances are, you do not know what this means. If you are new to texture programming, here is what this .vmt tells garry's mod to do with the texture:

"UnLitGeneric" //makes the texture illuminate, even in the dark, at all times.

"$basetexture" "custom/auroraborealis2" //tells the source engine what .vtf file to display and where it is in the garry's mod directory.

"$translucent" 1 //makes the texture transparent.

"Proxies" //makes the texture capable of animation.

"TextureScroll" //makes the texture scrollable.

"texturescrollvar" "$basetexturetransform" //makes the texture scroll.

"texturescrollrate" 0.005 //this number can be changed anytime. I chose .005 to be most realistic.

"texturescrollangle" 0 //direction of scroll. Right is 0 degrees, left is 180 degrees, up is 90 degrees, and down is 270 degrees.


Next, save the texture (Ctrl+S), save the texture, save the texture, save the texture, and also save the texture.


STEP 18: Open up Hammer Editor. Open up a map or create a new one. Go to the "Face Edit Sheet" (Shift+A) and click on "Browse". Filter the search by typing "custom" or "auroraborealis2" or "the-name-of-my-texture". It should be there. If it is missing or checkered in purple and black, make sure there are no spelling errors in the .vmt directory. *You can ask me questions about this error*.

18. https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1711062418



Now you can create brushes that bend in all sorts of directions in distinct geometries to master the effect you want in your northern aurora borealis.

I know this tutorial was stinkin' long and hard to follow, but you can ask me any questions about calamitous encounters, errors, steps that seem irrelevant, how you can change the file destinations of your textures (including moving them to the /materials folder), how to read other .vmt programming, and what I did to make the aurora borealis texture in the snowy Ravenholm.