How to: Export CubikStudio model to Unity

Video, picture and text guides, in various languages, about how to use Cubik Studio.
Post Reply

How to: Export CubikStudio model to Unity

Post by Sphax » 28 Nov 2016, 12:36

Cubik Studio is a 3D modeler useful for various games and game engines, including Unity.

This short tutorial explains with as much details as possible how to export any Cubik Studio model to Unity.

8 steps to proceed:
  1. Open or import your model
  2. 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)"
    tut_unity_modelsettings.png
  3. 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)
    tut_unity_format.png
  4. Close Cubik Studio and open Unity
    tut_unity_files.png
  5. Drag&drop OBJ+MTL+PNG(s) in a folder inside your Project window (Assets) such as "Models"
    tut_unity_dragdrop.png
    tut_unity_dragdrop.png (10.56 KiB) Viewed 1993 times
  6. 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"
    tut_unity_mesh.png
  7. 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"
    tut_unity_texture.png
  8. 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.
    tut_unity_material.png
    tut_unity_material.png (11.05 KiB) Viewed 1993 times
Import is done, now I suggest you to create a Prefab:
  1. Drag and drop your mesh in game window or in hierarchy panel
  2. Then drag it back in your Project panel to create a Prefab
  3. DONE!
tut_unity_result.png
Please note that future versions of Cubik Studio will get more options to export for Unity and other Game engines. Things will get easier, faster and more customizable. ;)
x
User avatar
Sphax
Admin
Posts: 1307
Joined: 10 Nov 2011, 10:44

Return to “Tutorials”