Making custom textures?

Discussion in 'Mapping Questions & Discussion' started by Bun, Aug 8, 2008.

  1. Bun

    Bun L1: Registered

    Messages:
    32
    Positive Ratings:
    1
    So I created custom textures in photoshop, exported as PNG. Made them vtf, and put them with the other custom textures I downloaded, but I can't select mine. So how do I fix that? :cursing:
     
  2. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,742
    You made a .VMT for each one? if not you need to do that - http://developer.valvesoftware.com/wiki/Vmt

    Then make sure in the texture browser you hit "reload textures" (if you make/modify the VMT files whilst hammer is open)
     
    • Thanks Thanks x 1
  3. Bun

    Bun L1: Registered

    Messages:
    32
    Positive Ratings:
    1
    Actually I did that, but nothing worked. What code should I use? :unsure:
     
  4. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,742
    whats the basetexture line of your vmt and whats the path of the folder where the vmt and vtf are?
     
  5. Bun

    Bun L1: Registered

    Messages:
    32
    Positive Ratings:
    1
    Basetexture line...?
    Also, the folder is Steam/steamapps/account/teamfortress2/tf/materials/custom
     
  6. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,742
    Paste the contents of the vmt into here, the path in the base texture line must match where the vtf is.
     
  7. Bun

    Bun L1: Registered

    Messages:
    32
    Positive Ratings:
    1
    I got NO idea what you're talking about, sorry. :(
    I just wanted a PNG to work, can't be to hard?
     
  8. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,742
    For every texture you need a vtf (the texture bit) and the vmt (the textfile that tells the game everything it needs to know about the material)

    Once you've made the vmt with the photoshop plugin or vtfedit and put it in the materials folder open up notepat/wordpad/texteditor of your choice and write this -

    Code:
    "LightmappedGeneric"
    {
    	"$basetexture" custom\<filename of vtf (without .vtf at the end)>
    	"$surfaceprop" gravel
    }
    The lightmapped generic bit tells the engine how to render lighting on the texture, for almost anything that isnt a prop you want this. The $basetexture line tells the game(and hammer) where the vtf is located relative to the materials folder, I put my files in map named folders so mine would look like this - "$basetexture pl_hoodoo\patch_001"
    The $surfaceprop line tells the game what type of decal, sound and effect it should use when you shoot it. you can use others like 'metal', 'dirt', 'wood' or 'glass' depending on what your texture actually is.

    once you've got that in the text editor use 'save as' and then save it as a .vmt rather than .txt

    If you've done everything right the texture should now appear in hammer.

    Some optional lines you could add:
    Code:
    "$decal" 1
    "$decalscale" .25
    "$translucent" 1
    (after $basetexture and before the } ) These will make transparency work with your texture so you can make posters and other overlays

    Code:
    "%keywords" "tf"
    This is a good one for searching, if you choose not to put this in you will have to remove the keyword from the bottom of the hammer textuer browser before you will see your texture.
     
    • Thanks Thanks x 1
  9. Inexistence

    Inexistence L1: Registered

    Messages:
    21
    Positive Ratings:
    0
    Figure I may as well hijack this rather than making my own topic. I've made a texture, but I want it to reflect the light around it, such as on the floors of the 2fort intel rooms. I assume I do this with the vmt, but how?

    Thanks.
     
  10. Snipergen

    Snipergen L13: Stunning Member

    Messages:
    1,053
    Positive Ratings:
    150
  11. Bonafide

    Bonafide L6: Sharp Member

    Messages:
    314
    Positive Ratings:
    25
    you need an extra vmt that reflects the light. use GFCscape to export the 2fort respawn one and take a look.