Tutorials

8. Export

Anything you create in Waveform can be exported to either OBJ or FBX format. For this tutorial we will go through the process of exporting the Helicopter sample. Open the sample and select the export item to bring up the export panel. Let's go through each of the fields here:

filepath

Use the button to specify where to save the model. Note that relative paths start from the project directory. Also no extension is specified, as Waveform will do this for us.

process

Here you can choose which pattern or compose block to export. For the helicopter, we export the compose item.

uv

The UV to export with the model. This is saved to a file called {name}_diffuse.png.

animation

A list of all the animation clips found linked to the selected process. Tick the ones you want to have exported (requires FBX).

cull

Slightly more complex, but the default Counter Clockwise should be adequate for most other programs. If you find your model imports inside out though, then try using the Clockwise option instead. The None option will duplicate the model and invert it, then append the new faces to the end of the existing model. This is useful if you want both sides visible, such as in the Aquarium sample where the exterior and interior faces are needed to be visible at all times.

polygon

Here we have 3 possible options:

Type Description
NGons Use this option if you intend to fix up the NGons in the model in another tool. Note that NGons are only produced when you CSG together meshes. Also this format may not be supported in all tools.
Quads This will triangulate any NGons, but leave quads as they are. This is supported in most other tools.
Triangles This will triangulate everything, and is supported by all other tools.

format

Here we have two options:

Type Description
OBJ A simple ASCII format that exports only the geometry and materials
FBX A complex binary format that exports geometry, materials, bones, animation and physics
FBX ASCII Same as above, but the file will be stored in human readable text

button

Once you've selected the appropriate options, hit the Export button. The UI will be disabled while the operation completes. The status bar will update you with the progress.

Ragdoll Export

A physics ragdoll requires a rig to work, so will only be exported if you select the FBX format. Each pattern's rigid body will then be exported to a separate .obj file, so they can be tweaked easily in another editor if you need to. An XML file named {meshName}.ragdoll is also generated to describe how each bone relates to each rigid body obj file, as well as the joint relationships between each rigid body.

Importing into Unity

A sample Unity project is provided that is also the scene shown in the video on the front page. This scene contains most of the samples, as well as an import script which shows you how to hook up the physics bodies and joints. For animation the humanoid and generic setups are used, so you can see how to work with both. Read The Unity Sample tutorial for details on how it was setup.

Importing into Other Engines

Any engine that supports the the OBJ or FBX format will be able to import models from Waveform. These formats are the most common 3d file formats, so you should have no problem with them.

Processing the ragdoll physics file is something that will require custom code though, to convert it to the appropriate format for the physics engine you are using. Use the Unity import script from WaveformUnitySample\Assets\Editor\ImportWaveformFBX.cs as a reference for how to do this. You can also use the script freely in any of your own projects, commercial or otherwise.

< Prev Tutorial | Next Tutorial >

More Links

Blog

Keep up with the latest information.

Forum

Engage with the Waveform community. Find answers to your questions here, or help out fellow users.

About

Are you a game developer who doesn't have time to make art for your game? Find out why this tool is for you.