Important
THIS ONLY WORKS WITH HAMMER++. Regular Hammer isn't supported.
Important
Originally built for a game made by a friend Delivery & Beyond, not really intended for public use. But after thinking about it, figured I'd share it anyway. Some stuff is still hardcoded for the game, but eventually I want to turn this into a proper plugin.
Important
Requires the UnityMeshSimplifier package (to simplify the meshes)
Open Unity's Package Manager and add a new Git URL:
https://github.com/Whinarn/UnityMeshSimplifier.git
https://github.com/edunad/FailCake.VMFImporter.git?path=/com.failcake.vmf.importer
- Displacement support
- UV / OFFSET support (per plane)
- Custom texture loading with material overrides
- Texture arrays for model packing
- Entity replacement through templates (no map I/O yet though)
- Tool texture hiding/removal
- Basic collision generation with box colliders (for complex stuff, use func_ entities and add mesh colliders manually)
- Material data for footstep sounds
Texture arrays get duplicated for each VMF model:
- Tried making a global VTF database but ran into too many problems. Might try again later.
Displacement heights don't match Hammer exactly:
- The size gets weird if you create a displacement and then resize it in Hammer. Need to fix the calculation at some point :P
Texture sizes can break:
- Your textures need to be power of 2 (64x64, 128x128, etc)
Textures are not transparent:
- Transparent textures at the moment use alpha clipping. This will change in the future
-
Open
VMFImporterSettingsand add your VPK paths. Example:D:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Singleplayer\hl2\hl2_textures_dir.vpk -
To replace a material with your own shader, add it to the
Material Overridedictionary (the key is CASE SENSITIVE) -
To replace entities, add them to the
Entity Overridesdictionary. Also CASE SENSITIVE. -
Layer Materials are special textures meant for runtime replacement
