Difference between revisions of "Texture Modification"
m (edit download links) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
=Texture Modification= | =Texture Modification= | ||
− | {{P2_Video||url=https:// | + | {{P2_Video||url=https://youtu.be/qiMP7rWOXWM|desc=Video tutorial by Jaio}} |
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. | 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. | ||
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. | ||
− | * ''' | + | * '''VPKEdit''' - A tool for opening and extracting files from ''.vpk'' files. [https://github.com/craftablescience/VPKEdit/releases/latest Download here]. |
* '''VTFEdit Reloaded''' - A tool for creating ''.vtf'' and ''.vmt'' files. [https://github.com/Sky-rym/VTFEdit-Reloaded/releases/latest Download here]. | * '''VTFEdit Reloaded''' - A tool for creating ''.vtf'' and ''.vmt'' files. [https://github.com/Sky-rym/VTFEdit-Reloaded/releases/latest Download here]. | ||
* '''vpk-compress''' - A small program for packing a folder into a ''.vpk'' file. [https://drive.google.com/file/d/1BRdqvkKX25nK8LFjkqeD8-b_iILFyHtr/view?usp=sharing Download here]. | * '''vpk-compress''' - A small program for packing a folder into a ''.vpk'' file. [https://drive.google.com/file/d/1BRdqvkKX25nK8LFjkqeD8-b_iILFyHtr/view?usp=sharing Download here]. | ||
Line 13: | Line 13: | ||
==Extracting and Editing Textures== | ==Extracting and Editing Textures== | ||
− | Open | + | Open VPKEdit 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]. |
Latest revision as of 15:46, 7 August 2024
Contents
Texture Modification
Video tutorial by Jaio
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.
- VPKEdit - A tool for opening and extracting files from .vpk files. Download here.
- VTFEdit Reloaded - A tool for creating .vtf and .vmt files. Download here.
- vpk-compress - A small program for packing a folder into a .vpk file. Download here.
Ensure all three of these tools are downloaded and installed (vpk-compress only needs download) before continuing.
Extracting and Editing Textures
Open VPKEdit 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.