Models - H2xDev/GodotVMF GitHub Wiki
This plugin has almost full native support of MDL files in Godot with some issues:
- Non-static props models may have wrong orientation
- Collision model of model also can have wrong orientation
How to import MDL?
All you need is just copy the MDL file itself and its additional files *.dx90.vtx
(or just *.vtx
), .vvd
, .phy
into the target folder you specified in the config - models.target_folder
field. By default it's res://
(since all prop_* entities already has models
folder at the beginning of the path)
Import options
You can modify import options for each model.
Use global scale
If enabled then the importer will use scale from the config, otherwise it will use scale from the field below
Additional rotation
If you noticed that the imported model has wrong orientation, you can fix the orientation by using this field and reimport.
Occlusion culling
If you use occlusion culling you can enable occluder for the model. It takes collision model for occluder generation in case Primitive Occluder
is disabled. In case Primitive Occluder
enabled then instead of using collision model it just create a cube with specified Primitive Occluder Scale
.
Skins
You can apply a skin only via GDScript by using MDLMeshGenerator.apply_skin(mesh_instance: MeshInstance3D, skin_index: int)
. This method can be applied only on MeshInstances3D created by the importer. See example here.