.vtf save as options from photoshop

Discussion in 'Mapping Questions & Discussion' started by takabuschik, Jul 23, 2015.

  1. takabuschik

    aa takabuschik

    Messages:
    662
    Positive Ratings:
    314
    [​IMG]

    What are the right formats and options I should fill? (I don't have an alpha channel or other fancy stuff)
     
  2. EArkham

    aa EArkham Necromancer

    Messages:
    1,570
    Positive Ratings:
    2,193
    Compressed Texture, or Compressed Texture Alpha, as appropriate.

    Sharpen Filter == none.

    This will be your setting for just about everything, vertexlit or generic.

    Turn mipmaps off if it's for a model and you start seeing seams when you back away from the model in game.

    Make sure clamping is on if it's a model or tiling texture (otherwise you get seams).

    GOTCHAS -

    Sometimes it won't save the alpha channel the first time. This will depend on whether you're using layers or you've flattened everything. I find it preferable to open the vtf after you've saved it and paste in the alpha so you don't have to flatten your psd.

    You're going to see a slight green shift when saving a file due to the compression. Most of the time, this isn't that noticeable, but if you're working with blues and greys, sometimes it's better to save as a tga and then use VTF Edit to make the vtf without green shift.

    Or you can adjust the Hue/Sat away from green before saving (I think it's in the -8 range?). In either case, if you have to resave a vtf because it was missing the alpha, ALSO paste in a fresh copy of the diffuse so that it doesn't green shift it AGAIN.
     
    • Thanks Thanks x 1
    Last edited: Jul 23, 2015
  3. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    944
    Positive Ratings:
    922
    Corrections on what EArkham said:
    Sharpen filter none? Sharpen Soft is the best for everything. And the Mipmap Filter as quadratic looks a little nicer imo.
    Turning mipmaps off is a terrible thing to do as it will cancle the texture resolution settings that people use. You are increasing people's computer load for no reason. Black seems on model textures is because of bad texturing. The texture should extend at least 4 more pixels from the UV space.
    Do not use clamping on textures meant for worldbrushes. You won't be able to fit it into the right place if it's too far away from the origin of the map. Models and Overlays should use it if the actual texture gets very close to the edge.
    Make sure to only have 1 layer when converting to .vtf, otherwise you will end up with the texture having multiple frames. At least in paint.net, not sure about photoshop as I don't see a 'animated texture' option.

    And now to the compression formats themselfes:
    DXT is compressed, you will want it most of the time.
    'DXT 1' means no alphachannel.
    'DXT 1 with one bit alpha' means one bit alpha, never works out well for me.
    'DXT 3' and 'DXT 5' means full alpha. Usually you will use DXT 5.
    Most other formats are uncompressed and use a ton of filesize. Most important ones are:
    'RGB888' The R G and B might have a different order.
    'RGBA8888' This means the same as above. The A stands for "alpha", so that means this one has alpha.
    'I8' and 'IA88' The I stands for "black and white". Rarely used, but I just want to make sure people don't forget about that one as it has the potention to half the filesize of an uncompressed texture.
     
    • Thanks Thanks x 1
  4. takabuschik

    aa takabuschik

    Messages:
    662
    Positive Ratings:
    314
    Well, I did it all as you said (compressed texture, DXT1, mipmap=box, Sharpen Soft, no flags). Still no luck. The textures show in hammer as the pink checkerboard.
    I assume that a vmt can't cause that, which is why I'm focusing on finding the problem in the .vtf.

    How do I do that? I have vtfEDIT but I don't really know much about it.
     
  5. MaccyF

    aa MaccyF Notoriously Unreliable

    Messages:
    907
    Positive Ratings:
    1,467
    File -> Import allows you to select your TGA, then the options are the same as in the photoshop plugin :)

    You can also select the option to auto generate a VMT, but personally i don't use that.

    Then just go File -> Save to save your VTF (and possibly VMT)

    Also don't forget to check save alpha channel in photoshop if you need one for anything

    EDIT: the VMT can definately cause the pink and black checkers, make sure that the directory structures referenced in the VMT are correct
     
    • Thanks Thanks x 1
  6. EArkham

    aa EArkham Necromancer

    Messages:
    1,570
    Positive Ratings:
    2,193
    Pink checkerboard means a texture path is incorrect or the file is missing. Either it can't find the vtf from the path you provided in the vmt, or the texture name in the model doesn't match the vmt name, or the model was compiled with an incorrect $cdmaterials.

    Basically double and triple check your paths, where ever they are.

    Also, do NOT use sharpen in the photoshop plugin. It creates noticeable artifacts. Use VTF Edit if you want to use any filters.

    ---

    Bottom line is that if you want fast, convenient, and don't care about the quirks, like when you're prototyping a texture, use the photoshop plugin. Or if you rely on photoshop heavily anyway, use the plugin.

    If you want fidelity and colour accuracy, take the extra steps and save it out as a tga and use VTF Edit. It's a bit more hassle and slows you down if you're quickly iterating a texture, but for the final result it's going to be better all around.
     
    • Thanks Thanks x 1
  7. Tumbolisu

    aa Tumbolisu  I ⌄ I 

    Messages:
    944
    Positive Ratings:
    922
    The quickest way to use VTFEdit is to have it on the fastest accessible spot possible. Most likely, your desktop.
    • Save the image as a .tga, with some random name, on the desktop.
    • Drag the .tga onto VTFEdit.
    • Select the options you need.
    • Click the Save button on the top left.
    • Select desktop and specify a proper name. If the original .tga already has the correct name, click on it.
    Now you can drag the .vtf to whereever you need it to be.
     
    • Thanks Thanks x 1
  8. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,219
    Also I think you have to restart Hammer when you modify your texture/material otherwise you get the checkerboards? I know it can auto-refresh on some changes, but not all; I forget which are which.
     
  9. takabuschik

    aa takabuschik

    Messages:
    662
    Positive Ratings:
    314
    Fixed. It was an insanely dumb .vmt typing mistake. Thanks for the help!