This is how I create my faces. I tried using SUComponentDefintionGetEntities, but when I save and open, I get the error cannot open empty component.

```
SUEntitiesRef entities = SU_INVALID;
SUModelGetEntities(model, &entities);
SUGeometryInputRef input = SU_INVALID;
SUGeometryInputCreate(&input);
SUPoint3D* vertices = new SUPoint3D[3];
SUPoint2D* uvCoords = new SUPoint2D[3];
for (int i=0; i < count; i++) {
SUPoint3D t;
t.x = pPoints[i].x;
t.y = pPoints[i].y;
t.z = pPoints[i].z;
vertices[i] = t;
}
for (int p=0; p < count; p++) {
SUPoint2D a;
a.x = uvPoints[p].x;
a.y = uvPoints[p].y;
uvCoords[p] = a;
}
SUGeometryInputSetVertices(input, 3, vertices);
if(count > 2){
SULoopInputRef loop = SU_INVALID;
SULoopInputCreate(&loop);
for(size_t j=0; j < count; j++)
{
SULoopInputAddVertexIndex(loop, j);
}
size_t face_index0;
SUGeometryInputAddFace(input, &loop, &face_index0);
SUMaterialInput mat_input;
mat_input.material = mat;
mat_input.num_uv_coords = 3;
for(int k=0, b=2; k < 3; k++, b--)
{
mat_input.vertex_indices[k] = k;
mat_input.uv_coords[k] = uvCoords[k];
}
SUGeometryInputFaceSetFrontMaterial(input, face_index0, &mat_input);
SUGeometryInputFaceSetBackMaterial(input, face_index0, &mat_input);
SUEntitiesFill(entities, input, true);
```

This is how I create my component definition and instance

```
SUComponentDefinitionRef comp_def = SU_INVALID;
SUComponentDefinitionCreate(&comp_def);
SUComponentBehavior behavior;
behavior.component_always_face_camera = true;
SUComponentDefinitionSetBehavior(comp_def, &behavior);
SUModelAddComponentDefinitions(model, 1, &comp_def);
SUComponentInstanceRef instance = SU_INVALID;
SUComponentDefinitionCreateInstance(comp_def, &instance);
SUEntitiesAddInstance(entities, instance, NULL);
```

This is how I am saving my model:

```
SUModelSaveToFile(model, Filename);
```