Load a model asset. This will automatically triangulate any faces that aren't already triangles, flip the UVs (in the y direction) to match what the engine expects, and generate any missing normals. If the file extension is
.wmdl, then the file will be loaded with WMDL. Otherwise, the file will be passed to Assimp.
Note that WMDL files always define normals, even if they are incorrect. As such, they will never be regenerated for WMDL files. If you need to regenerate normals, do it after loading the model or use the appropriate options before converting a model to WMDL.
model = assets.loadModel(path)
- The path to the model file.
- The model, or nil if model loading failed.