Level Editor/Workflows/Importing Source maps

From TeamSpec Wiki
Jump to navigation Jump to search

File > Import Source Map (BSP / VMF)... brings a Source engine map into the open map: a compiled .bsp (Team Fortress 2, Half-Life 2 and other maps of BSP versions 19 to 21, compressed ones included) or a Hammer .vmf. Use it to bring a map you made in Hammer into TeamSpec, or to start from one.

The whole import arrives as one group named after the file, sorted into World, Displacements, Clips, Water, Zones, Doors, Logic, Entities, Spawns, Lights, Sounds, Pickups and Markers. Edit > Undo takes it all back in one step.

The Import Source Map dialog

  1. Map file: type the path or click Browse... (a .bsp or .vmf).
  2. Scale (m / unit), default 0.0254: 0.0254: a Hammer unit is an inch, so the map plays at the size it did in Source.
  3. Under Bring in, tick what to import (below).
  4. Click Import. The status line reports what came in: brushes, displacements, zones, entities, doors, outputs, and materials linked (and how many are missing).

If no TF2 install is found, the dialog says No TF2 install found: set one in Settings to link materials and models. Set TF2 install in Settings.

The dialog's own note sums it up: Comes in as one group and one undo step. Without linked materials every face is in the default material, and without linked models props are markers. TF2's game rules (round timers, control points, resupply) do not carry.

What each option brings in

Option What comes in
World brushes The map's solid brushes, shape for shape. Each is named after its Source texture, so you can find the ones to re-texture by name. No-draw, sky and tool faces are hidden; the brush still blocks, as in Source.
Brush entities (func_brush, doors, spawn room doors) Brush entities become groups of ordinary brushes. Those Source never collides with (a func_illusionary, a func_brush with Solidity Never: cobwebs, light shafts) draw without collision. Spawn room doors (func_respawnroomvisualizer) become team gates.
Displacements Displacement faces of the same resolution, with their shape (heights and sideways offsets) and the blend alpha as paint on layer 1.
Triggers as zones, clips and water Triggers and other volume entities (respawn rooms, resupply, capture zones, no-build areas, trigger_hurt) become zones named after their targetname, with their team. Clips become collision-only brushes (player clips block players; an NPC-only clip blocks nobody). Water becomes a water volume over the water brush.
Point entities (spawns, lights, sounds, pickups, markers) Spawns, lights, spot lights, ambient sounds (as point sounds without a sound) and health and ammo packs. Every other entity becomes a map marker named after its class, so nothing is lost without a trace.
Props (with linked models; markers without) Props where they stood. With linked models each is a real prop showing its model, with its angles, size, skin and shadow setting; without, a marker named after its model.
Sun direction and color from light_environment Sets the map's sun.
Leave out the 3D skybox Ticked, the miniature scenery round sky_camera is left out. Unticked, it comes in as the editor's own 3D skybox (see below).
Center on the origin (across X and Z) Moves the import so it is centerd across X and Z.
Link TF2 materials (read from your TF2 install, never copied) Each face wears the map's own material, lined up as it was in Source. Unticked, every face is in the default material.
Link TF2 models (props with their skins; collision kept in the map) Props show their real models (see below).
Overlays and decals (signs, stains, painted lines; with linked materials) Overlays and decals come in as decals.
Sky (the map's 2D sky, linked; a plain daylight without TF2) The map's 2D sky becomes the map's sky.
Map logic (doors, buttons, relays, timers, counters and the triggers' outputs to them) The map's own wiring. See below.

Linked materials and models

Linked materials and models are read from your own TF2 install, never copied: the map names each one, and every machine that opens the map, or plays its export, reads it from its own TF2. Where a file is missing, or there is no TF2 at all, the face shows a magenta and black checker (a model, a checker box), the notice bar says how many, and the map still opens, saves and plays the same; nothing a player does depends on them. Replace a linked material as you would any other, by applying one of your own.

A blended displacement material paints its two textures by the map's blend.

Props with linked models stand still, whatever kind of prop they were. A prop that was solid in Source collides as its physics model did; that collision is kept in your map and written into its export, so the map plays the same on a machine without TF2 and on a server. Props Source walked through, and models without a physics model, have no collision. Linked props are lit by light probes rather than the lightmap, but still cast their shade into the lightmap when you bake. Change a prop's Skin (a team's colors, a crate's labels) in the inspector.

Overlays and decals

With linked materials, the signs, logos, painted lines, dirt roads and stains laid on the map's faces come in as decals in a Decals group. An overlay keeps its size, turn and draw order, and a texture repeated along it (a road) is laid as that many decals side by side. A decal lands on whatever world surface is in its box, so it is kept thin. Overlays on water and in the 3D skybox room are left out, and the import report counts what it had to change.

The 3D skybox

With Leave out the 3D skybox unticked, the skybox room comes in as a group named 3D Skybox holding a Sky Camera at sky_camera's spot, with its scale, and the room's brushes, displacements and lights. If sky_camera has fog on, its color comes across and its distances become the Sky Camera's Fog Density; with fog off the skybox takes the map's. With Props ticked, the room's props come in too. The room's triggers, clips and other entities are left out. A map that already has a Sky Camera keeps it: the room comes in as a plain group, 3D Skybox miniature, and the report says so. If the importer cannot tell the skybox room from the map, it comes in as part of the map and the report warns.

Map logic

The map's own wiring comes across (not its game rules):

  • Its doors become doors in Doors, named after their Source names: a func_door slides the way it moved, its own size less its lip; a func_door_rotating or prop_door_rotating swings about its origin; with their speed, wait, and starting open or locked. One that opened when touched or used opens when walked up to.
  • Buttons, relays, timers and counters become the editor's logic entities in Logic.
  • Their outputs, and those of trigger_multiple and trigger_once, become outputs: a trigger's touch is OnEnter, its first in and last out OnFirstEnter and OnLastExit, and a team filter becomes the output's Team. Spawn doors open for their own team and stay shut to the other.
  • An output whose target did not come in is left out (round timers, control points, game rules, game_text, sounds, effects, !activator), and so is a relay or timer whose chain ends in nothing that did, which comes in as a marker. The import report counts what came in and, by reason, what did not.
  • Door sounds are not brought in.

What does not carry

Of materials: reflections, detail textures and texture rotation. Of props: animation and fade distances.

Related pages

TeamSpec Level Editor
Basics Getting started · Interface · Viewport and camera · Selecting and hiding · Keyboard shortcuts · Settings · Map Config · Troubleshooting
Menus File · Edit · View · Tools · Functional
Panels Scene tree · Inspector · Materials · Props · Snapping · UV editor · Displacement · Terrain
Tools Move, Rotate and Scale · Box · Sphere · Cylinder · Prism · Stairs · Spiral Stairs · Spiral Tower · Arch · Path Brush · Plane · Terrain · Clip · Duplicate · Ruler and Cordon · Edit Vertex and Edge · Edit Face · Loop Cut · Material Brush · Vertex Color Brush · Displacement · Prop Path
Entities Brush · Zone · Group · Mirror Node · Prop · Spawn Point · Supply Pickup · World Boundary · Lights · Water · Sounds · Anchor Platform · Payload Track · Boss Spawn · Map Marker · World Text · Decal · Door · Button · Logic entities · 3D Skybox · Nav Region
Workflows Your first map · Brushes and CSG · Materials and UVs · Lighting and lightmaps · Bots and navigation · Mirrored maps · Outputs and logic · Custom assets · Playtesting · Exporting and publishing · Importing Source maps
Scripting Overview · Server rules · Client HUD · Bots · Teams and spawning · Zones · Pickups · Payload tracks · Map entities · Sandbox limits · Testing · King of the Hill · Team Deathmatch · API reference · What a script may use