S&box Wiki

History for Source 1 Material Porting

Revision Difference


<cat>Dev.Tools</cat> <title>Source 1 Assets Porting</title> <deprecated></deprecated> # Things you’ll need: ##To convert the textures: [VTFEdit](https://nemstools.github.io/pages/VTFLib.html) ##To convert the materials: [Python 3](https://www.python.org/downloads/)<br/> [caseytube/source2utils](https://github.com/caseytube/source2utils) ##To extract assets from .vpk and .bsp: [GCFScape 1.8.6](https://nemstools.github.io/pages/GCFScape.html) # To do: 1. Gather all of our materials in a folder with the default material structure - materials/*<br/> 2. Convert .VTFs to .TGAs<br/> 3. By using [caseytube/source2utils](https://github.com/caseytube/source2utils), convert our .VMTs to .VMATs<br/> 4. Move the converted files to the content folder of your target add-on - steamapps/common/Half-Life Alyx/content/*/materials # Gathering the files Gather all of our materials in a folder with the default material structure: ###example: ``` . └── css/ └── materials/ ├── bricks ├── building_template └── cable ``` # Converting the textures By using a handy-dandy VTFEdit feature called “Convert folder”, we are going to batch convert all the .VTFs to .TGAs. Open VTFEdit, choose Tools/Convert folder. Select the Input and Output folders, and copy the rest settings as shown. ![VFTEdit](https://aws1.discourse-cdn.com/business20/uploads/facepunch1/original/3X/e/0/e0c2ceb24aa00aa2527afcf37cbc7f98a08a3bda.png) # Converting .VMFs to .VMATs Install [Python 3](https://www.python.org/downloads/) and download the [caseytube/source2utils](https://github.com/caseytube/source2utils) repository as .zip. <br/> Extract the .zip archive, open and go to source2utils/utils. By pressing File/Open Windows Power Shell on Windows Explorer, open Windows Powers hell. ![Open Powershell](https://aws1.discourse-cdn.com/business20/uploads/facepunch1/original/3X/a/a/aa311e5653738936ae53b5b2e8f012c92caf9ff0.png) Once open, Install Pillow by entering this command: pip install Pillow Once installed, start vmt_to_vmat.py by entering: python.exe .\vmt_to_vmat.py ![Powershell](https://aws1.discourse-cdn.com/business20/uploads/facepunch1/original/3X/9/b/9b4cfe28559cdb6e12f149625ef2b52c30d74b50.png) You are now going to be asked to specify what folder would you like to convert. To get the valid format of the materials folder, select the materials folder by clicking once on it, and press the Copy Path button located in the Home tab on Windows Explorer. ![File Explorer](https://aws1.discourse-cdn.com/business20/uploads/facepunch1/original/3X/2/f/2fa7095ef6a7ae9d58b9950b78ab43eeeefc66c2.png) You have just saved the path of the folder. Paste it into the Windows Power Shell window, but don’t forget to remove the quotation marks <br/><br/> D:\Users\*\Desktop\css\materials, not "D:\Users\*\Desktop\css\materials". ###You are now going to need to select: ``` Would you like to overwrite any existing .vmat files? (y/n): - Y Would you like to overwrite any existing .tga files? (y/n): - Y What is your target shader? Valid Options: vr_complex (vr_standard support coming soon) - vr_complex ``` And you are done! # Moving Files You are now going to notice a new folder: *_imported. It is going to contain all of the newly ported materials ready for Source 2! But we are still not done, we need to add them to the game! To do so, copy the materials folder to your created add-ons folder or the game content folder located at steamapps/common/Half-Life Alyx/content/materials If done correctly, all of them should show up in the Source Workshop Tools Assets list! ![Asset Browser](https://aws1.discourse-cdn.com/business20/uploads/facepunch1/original/3X/a/e/aec7a1e2d7565f6db875faf084c72dd93e866459.jpeg) cs_assault materials ported from Counter-Strike: Source. # Afterword Thank you "noonforme" for creating the guide on the forums.

Special Pages



Render Time: 66ms

DB GetPage 53
Get RevNew 5
Get RevOld 5
Render Body 0
Render Sidebar 1