You can export your textures straight from 3ds Max to Source using the Wall Worm Model Tools. This is a convenient way to get your textures into the Source Model Viewer, Hammer or in game. This page is a general overview of textures. Also, see the complete explanation of all the mapping between 3ds Materials and Source Materials.
There are two different methods of texture exporting. The first is via WWMT to export the textures on your models. The second is to export world textures that are on your world geometry and displacements via the Wall Worm Displacement Tool.
Exporting Model Textures
Exporting of model materials is done through the WWMT UI. If you have a model in the WWMT UI, you can export just that model's textures in the main rollout.
To export model textures, the following criteria have to be met:
- Your model needs to have a material applied to it. More specifically, it needs to have a Standard, Multi/Sub-Object or Shell* material. This material exports as the VMT.
- The name of the material becomes the name of the VMT file. This is an important concept, because much of the documentation on the Internet refers to the bitmap filename as the material name--which is not how Wall Worm works by default.
- *The Shell Material is not supported by legacy SMD Exporters.
- For a bitmap (texture) to be included in the VMT as a VTF, it must be of the TGA, IFL or PSD file formats. For PSDs, you need to add support in the global settings (read why here). (IFL files must be composed of TGA/PSD files.)
- The bitmaps must use the same Mapping Channel as is used by the UVW. The channel you use for the UVW must match the bitmap mapping channel and must match the Mapping Channel shown in the Model & Basic QC Rollout. For Auto-detection, set the WWMT UI mapping channel to 0.
- The texture exporter will make VTFs (Valve Texture Files) for bitmaps that are in the Diffuse, Bump, Specular Level, Specular, Ambient, Displacement and Self-Illumination slots. Please refer to this page on what material types, slots and other tips regarding texture application. If no diffuse bitmap exists, the diffuse color will be used.
- You must assign your model to the Wall Worm Model Tools. See Picking Your Model.
- Set the model's local Material Folder Path in the Export Options Rollout. Note: The path should be relative to the material root of your mod. This means that for a game like Counter-Strike Source, you would already assume (and leave out) the path through steam > CS:S > cstrike > materials ... Only enter something like
- You should make sure that your target material destination (folder) already exists before you run WWMT.
- Make sure to set the Material Root Folder in yout WWMT Configure Settings floater!
Once these steps have been taken, you can export your textures.
How to Export
Exporting is simple. You can click the Export VTFs button in the Model & Baisc QC Rollout (or, in the Texture Utilities Rollout, click the Export Textures Button). You will see a new floater listing all bitmaps to export.
- Check all those that you want to send to the Compiler.
- Click the Export Selected button to run the export.
When you've clicked the Export Selected button, the following things will happen. Please read the hints carefully.
- Copies of the bitmap (only TGAs) are sent to your SDK > mod > materials > Model Material Path (as defined with the WWMT Material Root + Model's Material Folder).
- A batch file is created next to the TGA. The batch file's name will match the TGA name but have a ".bat" at the end instead of a ".tga".
- If you have Steam Running, the textures will compile. Not all mods require this, but some do. If this fails, it is likely that Steam is not running or you haven't made the correct folders for the files before the exporter runs.
- You can also click the Export VTFs button in the Model & Basic QC Rollout or, if the model has custom gibs, the Compile Gibs VTFs in the Prop Data and Custom Gibs Rollout.
- If the model has custom gibs, the textures for the model's custom gibs will also be listed in the textures to compile. Note that if those gibs also have their own custom gibs (nested gibs), the gibs' gibs' textures won't be listed.
Exporting World Textures
- Using WWMT
Articles on using the Wall Worm Model Tools.