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:
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:
||As patterns can have multiple position curves, this line index specifies which curve to use.
||We then move to the point on the line which has the marker
||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.
Rotationuse 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:
|[x] Rigid Body is Convex||When using the
|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:
||Uses the first point on the line|
||Uses the center point on the line|
||Uses the last point on the line|
||Uses the nth point on the line. Defaults to
|name||A name matching a marker name exactly. Defaults to
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:
|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
Once a CSG operation has been completed, if you inspect the faces in the
Fill and Contours view you will see they have become
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 Viewtool 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.