Skip to content

edunad/FailCake.VMFImporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FailCake.VMFImporter

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)

{F9280638-B3EB-4238-BFB4-7B0228BD40B1}

{6D9959EA-294A-4093-ADE8-F6AD30858708}

Installation

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

Features

  • 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

Issues

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

Setup

  1. Open VMFImporterSettings and add your VPK paths. Example: D:\Program Files (x86)\Steam\steamapps\common\Source SDK Base 2013 Singleplayer\hl2\hl2_textures_dir.vpk

  2. To replace a material with your own shader, add it to the Material Override dictionary (the key is CASE SENSITIVE)

  3. To replace entities, add them to the Entity Overrides dictionary. Also CASE SENSITIVE.

  4. Layer Materials are special textures meant for runtime replacement

{B3469AF6-D7B7-4C71-A4C1-8FA2D0C9FCA3}

About

Valve Map File importer for unity. Not perfect, but hey, it works..kinda

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors