Skip to content

Latest commit

 

History

History
50 lines (45 loc) · 2.05 KB

File metadata and controls

50 lines (45 loc) · 2.05 KB

Creating custom materials

Rough notes

  • You will need VTFEdit
  • Creating an image
    • Use an image editor of your choice
    • Make sure both the width and height are a power of 2
      • E.g. 128, 256, 512, 1024, 2048
    • Example resolutions
      • 1024x2048 (wide), 512x512 (square), 1024x512 (tall)
  • Importing the image to the source engine
    • Open VTFEdit
    • Import your image
      • File -> Import -> Find your image
      • Resolution
        • Set the "Maximum Width" to your image width
        • Set the "Maximum Height" to your image height
      • Transparency
        • Set Alpha format to DXT5 to support transparency
        • If you don't need it, turn it off by setting Alpha format to DXT1
      • Use mipmaps if your texture will be viewed from different distances
    • Set required flags
    • Export the VTF file
      • File -> Save as
      • Save the file in the appropriate material folder
        • E.g. assets/materials/your_name/my_material.vtf
    • Export the VMT file
    • Copy these files into your gmod folder
      • Workshop addon, classic addon, materials folder, ...
      • E.g. gmod_folder/addons/myaddon/materials/your_name/
        • my_material.vtf
        • my_material.vmt

More info