After a long hiatus, I’m back with more conversion shenanigans.
Edit: images rehosted to imgur with full resolution
**Intro to Source 2
One of the first things I noticed when Valve released the Source 2 Hammer editor for creating Custom Games in Dota 2, was how simple it was to create maps with the familiarity and precision of the original Hammer, but with updated and very much improved tools.
It does away with brushes, and treats everything as meshes - like a 3D modelling program. It also allows you to export any number of meshes to file formats such as .dmx, .obj, and .fbx 2015.
**Level Design in Unity
The most annoying experiences I’ve had in Unity had to do with level design. I tried plugins such as Prototype (now ProBuilder Basic), and while it was cool to get some basic layouts down, I had issues such as complex brush work not rendering at all.
I’ve been using the original Source 1 Hammer for a long time, and know most of its features and quirks. Source 2′s Hammer does away with virtually all of them, and makes map creation much, much easier. I’ve had thoughts of reworking my game in Source (or even gulp GoldSrc) just because I missed the powerful level creation tools while using Unity.
**Export Selected Meshes to .fbx
My level design issues would soon be solved, for I had thought up a new process: I would import a Source 1 map into Source 2, export it to .fbx and import it in Unity.
For the purposes of this experiment, I used a map I made a few years ago for CS:GO.
*My map in Source 1′s Hammer
Source 2′s Hammer allows you to open Source 1.0 VMF’s with zero errors (excluding missing textures, models and entities because of CS:GO’s differences with Dota 2).
After tweaking my map a bit in Source 2 to fix missing textures and entities, it looked like this:
Great! Now to export it as .FBX…
Importing the model to Unity was no biggie, and it looked great after using a scale factor of 3 on the model import. And look at that, it even has our textures separated and uvw mapped for us! How convenient! I also plugged in a Mesh Collider to make sure the Player Controller doesn’t fall through the floor.
After tweaking the materials (with bad screenshots of the original textures) I got to this:
Surprisingly, it looks and plays great right out of the box.
Even displacements don’t break:
And thanks to the Mesh Renderer accounting for all textures, I can use standard Unity material surface PBR parameters:
If I want to change something in the level, I just change it in Hammer, re-export as .fbx and everything gets reloaded instantly by Unity.
If you love developing in Unity and love creating maps in Source, you shouldn’t be separated from the tools you value the most. Dota 2 is free, and so is its Hammer editor. So get it and make cool stuff!