Back to main project

In this mini tutorial we will show you how to create a basic mesh and a UV wrapper (known as UV Mesh) in blender.

MeshWarpServer needs to know what kind of shape it is projecting onto, so that it can do
the maths to project the video right. We can use Blender to make a 3D shape to do this.

A mesh is a collection of vertices, edges, and faces that describe the shape of a 3D object:

For this example, we will be projecting onto a cube (we used a polystyrene box). Note video has no sound.

Open up Blender, and press escape to get rid of the startup box. You will a cube in the middle of the screen. This is great! Blender has done half the work for us already. (If you don’t see a cube, look for the “Add” menu at the bottom of the screen, click it and then click “Mesh” and “Cube”.)

Now we need to say where the projection should go. At the top of the screen there should be a button marked “Default” (it’s the default Blender mode for editing stuff). Click the up-down arrows to the left of the word “Default” and choose “UV Editing.” “UV” is 3D jargon for a 2D drawing in a 3D world.

Usually 2-dimensional drawings have coordinates called X (for left-right) and Y (for up and down), like when you draw a graph. But because X, Y, and Z have already been used up for drawing in 3D (up-down, left-right and back-front) then our projection has to use U and V for left-right and up-down.

“UV unwrapping” is like when you take a cardboard box and you unglue it and unfold it so that it is flat. The flatness is how we will project onto it, then MeshWarpServer will fold it back together and the projection will appear in 3D.

Your screen should now have two halves. On the left is your cube, and on the right is a 2D grid.
When we UV unwrap the mesh you will see the flat version on the left, but for now it is empty.
In the right-hand panel at the bottom there is a line saying “Object Mode.” Click this and select “Edit Mode.” You will see the cube now has lines around its corners.

We don’t want to project on the sides of the cube that we can’t see, so click “Select” on the
bottom right menu and click “(De)select All.” Your cube will get less colourful. Now Click the
button in the far bottom right that shows an orange side on a grey cube. It’s the third picture
in a row of three cubes. This means that you can select “faces” which are the sides of the cube.
Hold down Shift and right-click on the three faces of the cube that you can see. Now click “Mesh”in the bottom right menu, click “UV Unwrap” and “Smart UV Project.” You can see an unfolded version of the cube on the left-hand screen. There are only three sides, because we only want to project on the sides we are looking at.

Our work is complete, so let us save our object. In the right-hand menu, you will need to click
“Edit Mode” and then click “Object Mode” so we can work with the whole cube again. In the top
left menu click “File” then “Export” and “Wavefront (.obj)”. Look on the left-hand side for options, the box marked “Include UVs” should be clicked, and “Selection Only.” Use the file browser in the main screen area to find your MeshWarpServer project and go into the “meshes” directory.

Now give your file a name by clicking “untitled.obj” at the top and typing a new name. Click “Export OBJ” and give yourself a pat on the back!