Thurnip Posted April 24, 2015 Report Posted April 24, 2015 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)Three-part process:1 jsx script exports TGA files2 Imagemagick takes the TGA files, combine _alpha layer group exported as TGA, and insert it as a actual alpha channel, generates the final tga file3 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.vtfbat_foil_normal.vtfbat_paper.vtfetc.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? LATTEH and FMPONE 2 Quote
LATTEH Posted April 24, 2015 Report Posted April 24, 2015 This sounds awesome! I use the photoshop vtf plugin for exporting to source. will2k 1 Quote
will2k Posted April 24, 2015 Report Posted April 24, 2015 (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 April 24, 2015 by will2k Thurnip 1 Quote
Thurnip Posted April 27, 2015 Author Report Posted April 27, 2015 (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 April 27, 2015 by Thurnip Quote
will2k Posted April 27, 2015 Report Posted April 27, 2015 (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" 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 April 27, 2015 by will2k Thurnip 1 Quote
cashed Posted April 27, 2015 Report Posted April 27, 2015 I havent bothered with the PS plugin for a long long time. I'll be old school and open the tga in vtfedit haha Squad and will2k 2 Quote
will2k Posted April 27, 2015 Report Posted April 27, 2015 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 But VTFEdit is the main weapon to go for handling the vtfs/conversion Thurnip 1 Quote
Recommended Posts
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.