Jump to content

Recommended Posts

Posted

hi guys, last week i was wondering a solution to handle VTF files and the workflow to create those files.

Most part for making skins and stickers for CSGO workshop, but also can be adapted to other usage, like vtf textures for env art etc.

Personally i don't like editing alpha channel as a channel inside PS, so the idea is to have a layer group inside Photoshop named _alpha. (inside this group i can have shape layers, smart objects, adjustment layers, etc)

So i'm using a batch (yeah, lol a DOS batch). You can drag and drop the PSD into the bat file, or copy the bat into your work folder and run it. (the bat will look for the first .psd file inside the folder)

vtf_helper01.png

Three-part process:

1 jsx script exports TGA files

2 Imagemagick takes the TGA files, combine _alpha layer group exported as TGA, and insert it as a actual alpha channel, generates the final tga file

3 executes valve's Vtex command line tool to create the VTF from TGA, on the final destination folder.

The batch will name the maps accordingly to the psd filename.

eg: bat.psd (sticker file) will generate:

bat_foil.vtf

bat_foil_normal.vtf

bat_paper.vtf

etc.

After the stuff was done, Vtex wrote some warning messages that i could use the PSD as direct source for making the vtf files. Probably would not read the layer group as a alpha channel but i need to dig deeper into Vtex.

anyway,

how do you guys deal with PSD and vtf?

Posted (edited)

As Latteh mentioned, the photoshop vtf plugin (also available for Gimp afaik) will make your life easier by working and saving directly in Photoshop without hassle.

 

A 2nd fast way is to prepare all your work in Photoshop as TGA files then using VTFEdit (nifty free progam from the same creator of the PS plugin) you can batch import them into vtf with the added bonus that VTFEdit will create the corresponding vmt's for you (still have to edit here and there in the vmt for special switches but the bulk is done).

 

I make my own custom textures for my maps so these 2 programs/plugins are indispensable when dealing with large amounts of vtf files :)

Edited by will2k
Posted (edited)

Unfortunately the VTF plugin don't work on 64bit PS. :/ maybe we could rig a script that save as vtf right from the Photoshop using the plugin. We don't have 32bit PS on CC 2014 anymore.

batch on VTFEdit: good stuff! didn't knew that. Sounds useful when editing massive amount of textures.

The most annoying issue for me, is that you must edit alpha channel as a actual channel. (So that's one of the reasons i rigged the stuff.) This is required to export a correct tga from Photoshop, right?

Maybe i could try to set a composite from LayerSet_alpha into the alpha channel, when exporting the layerSets as TGAs.... so i could skip the Imagemagick part of the process.

 

Edited by Thurnip
Posted (edited)

The most annoying issue for me, is that you must edit alpha channel as a actual channel. (So that's one of the reasons i rigged the stuff.) This is required to export a correct tga from Photoshop, right?

 

Yes, I believe the alpha channel must be present in your TGA so VTFEdit can recognize the correct format (ex DXT5) with 32 bit and transparency.

 

I usually leave the alpha channel creation til the end; I could have several layers on the diffuse (overlay, adjustment, fill layers etc..) then when I'm done I can select one or several layers that i want to include in the alpha channel (could be overlapping layers too) then I duplicate these layers and merge them into one layer. I ctrl+ left click on this layer to select it then right click on the "marching ants selection" :D  and choose save selection. this will automatically send the selection to the alpha channel with all the shapes and the tranparencies nuances and I wouldn't have to manually edit the alpha channel anymore.

 

Probably not the best method but it works for me :)

Edited by will2k
Posted

I havent bothered with the PS plugin for a long long time. I'll be old school and open the tga in vtfedit haha

I keep it on standby just in case of a quick edit of a vtf on the fly :D

 

But VTFEdit is the main weapon to go for handling the vtfs/conversion :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...