Difference between revisions of "Texture Modification"
m (add link for animated textures) |
(changed gcfscape to the more updated VPKTool) |
||
Line 6: | Line 6: | ||
Three programs are required for editing textures. Here are their download links, and their purposes. | Three programs are required for editing textures. Here are their download links, and their purposes. | ||
− | * ''' | + | * '''VPKTool''' - A tool for opening and extracting files from ''.vpk'' files. |
* '''VTFEdit''' 2.0 - A tool for creating ''.vtf'' and ''.vmt'' files. | * '''VTFEdit''' 2.0 - A tool for creating ''.vtf'' and ''.vmt'' files. | ||
* '''VPK''' - A small program for packing a folder into a ''.vpk'' file. | * '''VPK''' - A small program for packing a folder into a ''.vpk'' file. | ||
− | The downloads for all | + | VPKTool can be found [https://github.com/craftablescience/VPKTool here]. |
+ | The downloads for all VTFEdit and the VPK can be found [https://drive.google.com/file/d/1qOMED8K-oNiCHCxRS0DKOgAP10Scvb9P/view here]. '''Install VTFEdit 2.0 before continuing.''' | ||
==Extracting and Editing Textures== | ==Extracting and Editing Textures== | ||
− | Open | + | Open VPKTool and head to File -> Open, and open the file <code>Portal 2/portal2/pak01_dir.vpk</code>. Find the textures you wish to change (ending in ''.vtf''), and drag them to your desktop. |
Texture paths for commonly changed textures can be found at [https://docs.google.com/document/d/1C8lGxwyicsJU29Twrr0Xf8TfvjM6YV4qKjgPpxGtu_0/edit?usp=sharing this document]. | Texture paths for commonly changed textures can be found at [https://docs.google.com/document/d/1C8lGxwyicsJU29Twrr0Xf8TfvjM6YV4qKjgPpxGtu_0/edit?usp=sharing this document]. |
Revision as of 05:04, 4 June 2023
Contents
Texture Modification
Video tutorial by zach
You're able to change textures in Portal 2 by extracting texture files from a packed .vpk file, converting the textures from .vtf to a more easily editable file format, like .jpg or .png, then editing your texture as you wish and reversing the file conversion process. Follow either the video guide or this text guide to change textures.
Required Programs
Three programs are required for editing textures. Here are their download links, and their purposes.
- VPKTool - A tool for opening and extracting files from .vpk files.
- VTFEdit 2.0 - A tool for creating .vtf and .vmt files.
- VPK - A small program for packing a folder into a .vpk file.
VPKTool can be found here. The downloads for all VTFEdit and the VPK can be found here. Install VTFEdit 2.0 before continuing.
Extracting and Editing Textures
Open VPKTool and head to File -> Open, and open the file Portal 2/portal2/pak01_dir.vpk
. Find the textures you wish to change (ending in .vtf), and drag them to your desktop.
Texture paths for commonly changed textures can be found at this document.
Open the .vtf file you extracted using VTFEdit 2.0, and select File -> Export. Change the file type to .jpg, as a .png can cause transparency issues. From there you can open your newly extracted file with your personal favorite image editor, and change it to your liking.
If you wish for the texture to be animated, check out this guide.
Re-Packing Textures
Open VTFEdit, head to File -> Import, and select your file. An Options box will appear, do not change any of the settings, simply hit "OK". Once the file loads, go to File -> Save As..., and rename the newly saved .vtf file the same as your original extracted one.
Place the new .vtf file into a set of folders mimicking the file path from the original pak01_dir.vpk file. You can use the above paths document as reference for this. For reference, a portal gun texture will be placed in pak01_dir/materials/models/weapons/v_models/v_portalgun/v_portalgun.vpk
.
When you have all of your texture changes placed into the set of folders, drag the pak01_dir folder into the vpk.exe application. A new pak01_dir.vpk file should appear.
- As a note, ensure all of the components of vpk.exe must be in the same place, that meaning: vstdlib.dll, filesystem_stdio.dll, tier0.dll, and Newtonsoft.json.dll.
Create a new folder in your Portal 2 directory called portal2_dlc3 (if you already have a dlc3, call this new folder dlc4, and so on...). Place the new pak01_dir.vpk into this folder. From there, open the game and enjoy your new textures!
Re-Texturing for Mods
See this document on how to change textures for mods like Portal Stories: Mel.