Skip to content

Import map

Radik Khamatdinov edited this page Feb 24, 2026 · 11 revisions
  1. Create a scene and add a new node of type VMFNode.
  2. Choose a VMF file to import. Enable the "Use External File" checkbox if you need to browse for a file outside of the Godot resources.
  3. Click Import in the inspector panel or click Full in the 3D scene view toolbar.
  4. Wait a while...
  5. Done!

If you find that something is going wrong, check the Output panel first. In some cases, you will see messages tagged with [Godot VMF] in the Output panel.

Resources

The "Resource Generation" properties in VMFNode control whether the generated meshes or collision shapes are stored as binary resources inside the project directory (configured via import.geometry_folder). This helps with scene file size and complexity, and improves editor load times.

Surface props

The collision of the imported map is separated by surface properties. This is needed if you want to add different footstep sounds for each surface type, for example. Each StaticBody3D has a surface_prop field defined in the metadata that you can read via raycasting.

Important

Add a $surfaceprop field into the VMT or surfaceprop into the metadata section of a Godot material before importing a map.

Material's compile properties

Some materials can have compile properties starting with % (%compilenodraw, %compileclip, and so on). You can modify the import behavior by adding a global singleton called VMFExtendGeometryCorrector in @tool mode.

@tool
extends Node

# All faces with this compile property will be ignored.
const norender = [
	'compileclip',
	'compilenodraw',
	'compilesky',
	'npcclip',
	'compileplayerclip',
	'compilenpcclip',
];

# Collision for material that has this compile property will be removed
const nocollision = [
	'compilesky',
];

## Modify solid node that has compileplayerclip property
func compileplayerclip(solid: StaticBody3D):
	solid.collision_layer = 1 << 1
	solid.collision_mask = 1 << 1

func compilenpcclip(solid: StaticBody3D):
	solid.collision_layer = 1 << 2
	solid.collision_mask = 1 << 2

Clone this wiki locally