-
-
Notifications
You must be signed in to change notification settings - Fork 1
Changing how models are imported
Importing models into your scene using the Atomic Editor is as easy as dragging and dropping them on the Models folder in the Atomic Editor UI or simply adding them to the Models folder inside the directory structure of your project.
Adding models with drag and drop
Adding models through the file system
When the editor detects a new model it processes the file and adds it as an asset. The import process leverages the assimp open asset import library. During the import process assimp is configured to process the model using a default set of parameters. These parameters can be changed if they do not meet your needs.
By adding an import.json file to the settings directory of your project you can control how assimp processes your 3d model. The following is a json file with the default importer settings.
{
"desktop": {
"ModelImporter": {
"aiFlagsDefault": {
"convertToLeftHanded": true,
"joinIdenticalVertices": true,
"triangulate": true,
"genSmoothNormals": true,
"limitBoneWeights": true,
"improveCacheLocality": true,
"fixInfacingNormals": false,
"findInvalidData": true,
"genUVCoords": true,
"findInstances": true,
"optimizeMeshes": true,
"useVertexColors": false
}
},
"TextureImporter": {
"compressTextures": false
}
}
}
For example, by default the importer does not process vertex colors in 3d models, leaving flat shaded models untextured. In order to have the importer set the correct technique in the project's material files the following line:
"useVertexColors": false
would change to
"useVertexColors": true
Changing your imported model from this:
to this:
Home | Copyright (c) 2020-2021