lovr.graphics.newModel

Creates a new Model from a file. The supported 3D file formats are OBJ and glTF.

model = lovr.graphics.newModel(filename)

Arguments

NameTypeDescription
filenamestringThe filename of the model to load.

Returns

NameTypeDescription
modelModelThe new Model.

model = lovr.graphics.newModel(modelData)

Arguments

NameTypeDescription
modelDataModelDataThe ModelData containing the data for the Model.

Returns

NameTypeDescription
modelModelThe new Model.

Notes

Diffuse and emissive textures will be loaded in the sRGB encoding, all other textures will be loaded as linear.

Currently, the following features are not supported by the model importer:

See also