-
-
Notifications
You must be signed in to change notification settings - Fork 14
Models
This plugin has almost full native support for MDL files in Godot, with some known issues:
- Non-static prop models may have incorrect orientation.
- The collision model may also have incorrect orientation.
All you need to do is copy the MDL file itself along with its additional files *.dx90.vtx (or just *.vtx), .vvd, .phy into the target folder specified in the config - models.target_folder field. By default, it is res:// (since all prop_* entities already include the models folder at the beginning of the path).
There are several options to create MDL files:
- GodotMDL - MDL Creation by one click by @TheBreadPerson
- Crowbar Tool - For manual creation by @ZeqMacaw
- AutoMDL - A Blender plugin for autocompiling MDL files by @NvC-DmN-CH
- SourceOps - A Blender plugin for MDL creation by @bonjorno7
You can modify import options for each model.
If enabled, the importer will use the scale from the config; otherwise, it will use the scale from the field below.
If you notice that the imported model has incorrect orientation, you can fix it by adjusting this field and reimporting.
If you use occlusion culling, you can enable the occluder for the model. It uses the collision model for occluder generation if Primitive Occluder is disabled. If Primitive Occluder is enabled, instead of using the collision model, it creates a cube with the specified Primitive Occluder Scale.
You can apply a skin only via GDScript by using MDLCombiner.apply_skin(mesh_instance: MeshInstance3D, skin_index: int). This method can be applied only to MeshInstances3D created by the importer. See an example here.
Important
In versions below 2.1.7, use MDLMeshGenerator instead of MDLCombiner.