This short tutorial explains with as much details as possible how to export any Cubik Studio model to Unity.
8 steps to proceed:
- Open or import your model
- If your model is in voxel form, do not convert to elements and go to "Model Settings" > "OBJ" tab and check "Optimized mesh + texture (no AO)"
- Go to "File" > "Export" > Select "OBJ" format > Select the path to export (for OBJ, you should select folder if possible knowing at least 3 files will be created, obj, mtl and pngs)
- Close Cubik Studio and open Unity
- Drag&drop OBJ+MTL+PNG(s) in a folder inside your Project window (Assets) such as "Models"
- Select your mesh and in Inspector:
- Model: Uncheck "Read/Write Enabled"
- Model: Uncheck "Import BlendShapes" (there are no blendshape from Cubik)
- Model: Set "Tangents" to "None" (those are not needed in a voxel or cuboid model)
- Animations: Uncheck "Import Animation"
- Click "Apply"
- Select the model texture(s) and in Inspector:
- Check "Alpha Is Transparency"
- Set "Wrap Mode" to "Clamp"
- Set "Filter Mode" to "Point (no filter)
- Set "Max Size" to the nearest size (above) the actual texture size
- Set "Format" to "Truecolor"
- Click "Apply"
- Unity has automatically created a "Material" folder, in which you'll find one or more materials (corresponding to the textures in Elements Material in Cubik). Select all the materials and set "Rendering Mode" to "Cutout" to render transparent textures (does not support alpha however). I invite you to test or use other shaders to optimize or render your model differently.
- Drag and drop your mesh in game window or in hierarchy panel
- Then drag it back in your Project panel to create a Prefab
- DONE!