Go to Top

Exporting from Cinema 4D to COLLADA (dae) Format

(c) copyright Zehne Ziba Co., Ltd. For more information, please refer to copyright notice.

In this tutorial, we explain how to export a war ship mesh to Vanda Engine in COLLADA format. However, the same procedure can be used to export your 3D models to other 3D tools or game engines.

War ship model

Download war ship model from here and extract the zip file. Now open the C4D file in Cinema 4D.

Exporting

Run Cinema 4D. From the main menu, select File | Export | COLLADA 1.4 . Name your exported file “ship_LOD1.dae” and hit Save button.

It’s important to export your scene to COLLADA 1.4 format. Vanda Engine does not work with COLLADA 1.5.

Now the COLLADA 1.4 Export dialog appears:

Cinema4D-Export-Collada-Image2

Export 2D geometry and Export animation are self explanatory. Vanda Engine is a 3D game engine, so don’t check Export 2D geometry. Export triangles simply divides the polygons into triangles. Note that this division does not affect your actual model in Cinema 4D –It just exports triangulated meshes of your model to COLLADA format. Because Vanda Engine automatically triangulates the meshes while importing the dae file, this options is irrelevant.

A Quick Note About Scaling

Before modelling and exporting your 3D models to game engines or other 3D tools, you should set up Cinema 4D with an appropriate scale. Each game engine uses its own scale metrics. The simplest way to approach this is to create a 1*1*1 cube in your favorite game engine, then create a 1*1*1 cube in your favorite 3D tool, export the cube from your 3D tool to game engine, and make sure that they match each other. If they don’t, try to change the scale metrics via attributes panel. Simply activate attributes panel in lower right corner of Cinema 4D and change Scale metrics under Project Settings category.

Cinema-4D-Scale-Project-Export-Collada

I set the scale metrics to Centimeter, created a 100 cm * 100 cm * 100 cm cube in Cinema 4D by pointing to Create | Object | Cube and changing its size in Size section, , and exported the cube to COLLADA format. Then I opened the dae file in my favorite text editor. here’s some useful information in dae file:

<unit meter="0.01" name="centimeter"/>
...
...
<float_array id="ID7" count="24">
-50 -50 50
-50 50 50
50 -50 50
50 50 50
50 -50 -50
50 50 -50
-50 -50 -50
-50 50 -50</float_array>

As you see, each 100 * 100 * 100 cm cube in Cinema 4D is equal to 100 * 100 * 100 units in COLLADA. The dae file also contains unit information which says 1 Centimeter is equal to 0.01. Most full-blown game engines can read this unit information and multiply 0.01 by the exported values. In this case, they multiply 0.01 by a (100*100*100) cube and the result will be (1,1,1) unit cube. So a (100*100*100)cm cube with Centimeter metrics in Cinema 4D is equal to a (1,1,1) cube in your favorite game engine.

Cinema4D-Scale-Metric-Export-COLLADA-Image3

Another method is to set the scale metrics to Meter. In this case, game engines will scale your model by 1. So you must find the correct values to create a cube in C4D that has the same dimensions of 1*1*1 cube in your favorite 3D game engine. In this case, a (100 cm * 100 cm * 100 cm) cube in Cinema 4D has the same size of a (1 * 1 * 1) cube in Vanda Engine (and most game engines).

A Quick Note About Textures In Vanda Engine

Vanda Engine 1 accepts DDS textures. But the texture of this scene is in TGA format and has an alpha channel which isn’t practical for this mesh. First of all, make sure that you have downloaded and installed NVIDIA Texture Tools for Adobe Photoshop from here. This will install NVIDIA DDS plug-in. The NVIDIA DDS plug-in supports the DXTC texture compression format and allows you to open and save .dds files in RGB and RGBA formats. Now open boat_fishing.tga in Photoshop and in Channels tab, drag the alpha channel to Delete Current Channel button. Select File | Save As. Then choose D3D/DDS type, and click Save. Since we don’t need the alpha channel, we save it as DXT1. When you save the file as DXT1, Vanda Engine 1 assumes that your dds texture has no alpha channel. In new dialog that appears, select DXT1          RGB   4 bpp | no alpha and click Save button.

For more information about batch processing in Photoshop to change file format of images, please refer to the following tutorials:

Using batch processing to change the file format of images to DXT format in Photoshop

Importing the ship model into Vanda Engine

Run VandaEngine-Editor.exe. Make sure that you are in Prefab mode (Mode | Prefab). From the main menu of Vanda Engine, select File | Import | External Scene…. Locate the ship_LOD1.dae file, select it, and press Open. After a delay, you should see the ship mesh in editor of Vanda Engine 1.

Cinema 4D has not any options to export the ambient property of the mesh. ambient color of the mesh is very important in VE lighting. Due to that, we have added an option in VE editor that lets you specify an overall ambient color for all of the meshes imported from Cinema 4D. To enable the overall ambient color, go to Modify | Geometry | Ambient Color.

Next Tutorialarrow-right

Let’s stay in touch!

Never miss a single tutorial, sign up for our monthly newsletter. You can unsubscribe at any time if you wish to stop receiving email newsletters from vandaengine.org

Email

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Simple Share Buttons