3. Composition

In this tutorial we'll go over building more complex 3d models, by composing patterns together.

The compose block

Start by opening the composition tutorial project. This project contains four patterns along with a compose block at the end that joins them all up. You can add a compose block by clicking the + Icon and selecting Add Compose Block. For now though, we will examine the existing compose item, open it to see this:


A compose process is used to define what patterns to join up, as well as how to place them relative to the base layer. In this case we have one base layer, and three more layers attached to it, one for each pattern.


The header specifies the name of the compose block, same as with the pattern blocks, and can be renamed by clicking on the dropdown arrow. The layer block directly under this one then specifies the 'base layer', which is the Cylinder in this case. We require a base because the remaining layers will use it's markers to position themselves in 3d space. Let's go through the layer after the base to understand what each row is doing:

Add Pattern

This block species the pattern we are adding in this layer. So we are adding the Sphere pattern in this case. You can also give it a name with the Tag field, this is useful for naming bones which will be discussed in the Animation tutorial. The final field specifies what CSG option to use, which we'll go over in a moment.


This blocks specifies where on the base layer we will attach to. The process is as follows:

Type Description
Move to line [0] As patterns can have multiple position curves, this line index specifies which curve to use. 0 refers to the first curve.
Marker [sphere_attach] We then move to the point on the line which has the marker sphere_attach. You can open the Cylinder pattern in the curve editor and find that the third point has this marker.
then to Surface Marker [:center] Finally, we move to a marker on the surface. If a marker names starts with a colon, then it is a special name that Waveform will interpret. In this case, the center of the surface is found and that position returned.

But what part of the Sphere do we connect to the position returned by the target?


This option gives us the ability to specify that. We tell it to take the center of the Position curve, which will be the exact middle of the pattern.


After placement, we can also scale the model to better fit.


Also we can rotate the model as needed.

Note both Scale and Rotation use the pattern center as their origin.


We can also join up the patterns rig to the base layer too, for now this is empty though so no join takes place. We will cover this in more detail in the Animation tutorial.


Finally we have additional options we can add on. This is advanced functionality so isn't used in the tutorial project, but you can see it being used in the house sample. The available options are:

Option Description
[x] Rigid Body is Convex When using the simplified mesh option for a physics body, it can be useful to turn off the is convex flag, as you know you will be hand editing the rigid body to better fit the model outside of Waveform. This is done in the house sample to hand edit a door opening into the front wall for example
Mirror [X/Y/Z] Mirrors the mesh on the specified axis. Waveform will make sure that the normals and physics bodies are also flipped correctly
Flat Shading Waveform calculates smooth normals by default, but for flat surfaces such as a roof or wall, you can use this option to get flat normals for your mesh


Markers are used in several places by the application, the available options are:

Format Description
:start Uses the first point on the line
:center Uses the center point on the line
:end Uses the last point on the line
:n Uses the nth point on the line. Defaults to :0 if index is out of bounds
name A name matching a marker name exactly. Defaults to :0 if not found

Constructive Solid Geometry (CSG)

This is a fancy phrase which means that intersecting objects can be added or subtracted from each other, to create more complex objects. Currently this is set to None on all layers, this means that this layer won't be attached to the base layer in any way, it'll be it's own mesh. Switch the view to Fill and Wireframe, and try selecting the other options to see what they do:

Type Description
None This performs no CSG operation, and the 2 will be seperate meshes
Add This adds the meshes together, and removes the parts that are inside
Subtract This subtracts the layer
Combine The same as None, but will combine as a single mesh

Split faces

Once a CSG operation has been completed, if you inspect the faces in the Fill and Contours view you will see they have become N-Gons:


A face that has more that 4 vertices is known as an N-Gon. This is a special type of surface that gives the model a cleaner look. Ultimately though all faces need to be converted to triangles, which can be seen if you switch back to the Fill and Wireframe view:


The option to use N-Gons, as well as export the model with N-Gons intact, is provided in case you want to manually triangulate these areas yourself in another 3d model editor. Mostly this is not a concern when creating prototypes though.

CSG can be turned off in the Enable... menu on the 3d View tool bar. As CSG can be performance intensive, this can be useful when you are making lots of edits and want the 3d model to generate quicker.

< Prev Tutorial | Next Tutorial >

More Links


Keep up with the latest information.


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


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