top of page

Upload your 3D model

Обновлено: 6 авг. 2022 г.

Video instruction also avalible on YouTube.


Uploading a 3D model is acceptable but requires the following instruction. The possibilities offered by the iPhone and the development stage of the Slimp application limit us in the ways of integrating 3D models. The process takes time and different software. In the future we will try to make this process as easy as possible. And we will also create a model builder in the application itself, so that you can create your own character even without having 3D modeling skills in special software.


In order to use your own model, you will need to go through the following steps and be able to use certain software:

  • 3D computer graphics software (e.g. Blender);

  • Xcode.


Preparing the model


The instructions are given for working in Blender, but other software can also be used.

When creating or using a 3D model, try to minimize the number of triangles. The best fit is 10k-15k per model. With a large number of triangles, AR will work, but performance may be affected.


Try to perform the following steps for meshes:

  • eyes should be separated from head mesh and be a children of it;

  • for all meshes the modifiers (exept armature) should be accepted;

  • pivot points for all meshes and armature should be located in centre of coordinates;

  • apply scale, location and rotation in centre of coordinates;

  • shape keys (blendshapes) can be used, but for iPhone face tracking their names should be specified correctly.

  • bake material to textures, PBR is not posible to export you will have to set up shader in other software.

Note. The more blendshapes you use the more size your model has.


For iPhone face tracking to work, it is necessary to have an armature consisting of three bones - head (Head-Bone), left eye (Eye-Bone.L) and right eye (Eye-Bone.R).


Try to perform the following steps for armature:

  • do not parent mesh to bone, only to object. For head it's armature (armature), for other relative meshes it's head (mesh);

  • relocate roll to global -Z axis for the eye bones if there are problems with gazering;

  • the bones used for the iphone face tracking must have a strict names: Head-Bone, Eye-Bone.L, Eye-Bone.R;

  • align the Head-Bone with world axis;

  • you can make an bones (it can be hair bones or any other) animation that will be constantly played.

Note. It's posible to use 3D models not only with head but with full body. We recommend placing the head of the model in the center of coordinates, not the legs of the model.

At the moment we don't have an option to control the body movement depending on the head movement. But development in this direction is underway. As well we work on animations toggling.


Render an image with modelName_preview.png. It is mandatory to have a postfix "_preview" and a .png extension.


Exporting the model


When model is done it should be exported to COLLADA DAE format.

Unfortunately, the export .dae in Blender has a number of disadvantages, such as:

  • the ability to export only one animation of each scene object (mesh or armature);

  • the inability to export shapekeys animation;

  • if the model has a armature and shapekeys, then the exported file needs to be fixed;

  • and others.

But for correct work with the iPhone face tracking, some of the issues can be fixed. For Blender export settings hold to the following values on the picture.

  • make rest pose of your armature (select all bones in pose mode and click ALT+R, ALT+S, ALT+G);

  • select object you want to export;

  • if you want to export animation you done for armature make sure that it's selected in Dope Sheet - Action Editor;

  • if the animation looks broken, then make sure that the bones on which the animation is set are connected to the parent and not "Keep offset".


Fixing .dae file


Due to iPhone limitations the exported .dae file must be fixed to implement the possibility of iPhone face tracking. You can use this code. It's requared to use mac with installed Xcode on it due to converting into .scn format next step.


You can fix only the .dae file or also convert it to .scn.



I tried to use this by it doesn't work for me, but maybe it will work for you.


Converting .dae to .scn


After fixing the .dae file, the program will also convert it to a .scn file. You can also convert the corrected file yourself to .scn via Xcode if some troubles occurred.

Note. Unfortunately, when exporting from Blender, not all textures are always picked up. Also, the possibilities of exporting PBR material are limited. For detailed customization of materials, you will have to edit them in Xcode. This procedure will not be difficult.

Upload yours .dae file and

corresponding textures to the project, select .dae file and go to Editor - convert to SceneKit file format (.scn).


After that, a copy of your model will be created in .scn format. In the editor window you can see the necessary information about shapekeys (Geometry Morphers) and shader. You also need to tick the box next to the Unifies normals.


To configure shader chose mesh and material. You can choose one of the available shading and set the properties values you need.


If your model does not have any morph check that you have:

  • selected the correct mesh;

  • correct spelling of their names in 3D computer graphics software;

  • you have fixed the .dae file.

Save the project and go to folder where .scn file and it's texture located. Now you need only to create folder with the same name as your model have and put in it your model.scn, textures, modelName_preview.png. For example:


Folder: Fox-balloon

Files: Fox-ballon.scn

fox-diff.jpg

fox-normal.png

Fox-balloon_preview.png


That's it :)


Video instruction also avalible on YouTube.


bottom of page