Blender Curved Cuts

For the latest game in development called The Gap I’ve been doing lots of work in Blender. Learning new tricks and speeding up my workflow. Making a curved cut is something I had not done a lot of and in the past I’ve struggled with the knife tool or knife projects. I’ve been using this method to make curved windows and door arches.

Here is a neat way to make a curved cut in an object with considerable control and only a little bit of mucking about.

Basically we are intersecting one mesh with another and bisecting the meshes with a knife cut to make a simple train tunnel shape.

We are going to start with the default cube which has been scaled up to ten and subdivided 7 times.

A subdivided cube

Next we are going to add a Nurbs Curve as a second object. This we are going to manipulate into the shape we want and later convert it to a mesh to intersect with our cube. You could use any other object like a Bezier Curve or a Path would be very flexible. I chose a Nurbs Curve because it was reasonably simple shape.

Add a Nurbs Curve

In Edit mode manipulate the curve into the shape you want, subdividing the points if required. I find that enabling snapping is a good way to start to keep everything the same on both sides of the curve and then turning it off for fine tuning.

Snapping Enabled and Handles

Once you have the shape you want you can clean up the curve (it’s best to have everything on the same plane).

The Curve is Ready for Converting to a Mesh

Once you are happy with it it is now converted to a mesh.

Convert to Mesh

Which is then extended through our cube!

Extended Intersecting Mesh

Both Meshes are Joined (Ctrl + J). Select the one last that you want to keep the name of.

Joined Meshes into one Object

Switch to Face Select mode and then the Mesh is Intersected and cut with the knife:

Then you can simply delete the faces from the Nurbs Curve Mesh and you are left with the nice curved cut.

Select Faces on one side of the cut and Delete
Delete the Faces on the other side of the Cut

Now you can select all the faces inside your nice curve and extrude them into the cube to make a train tunnel 🙂

Face Select
Extrude into the Cube
The Completed Curved Cut

A few final notes. As I mentioned before you can do this procedure with any mesh to make cuts and hollows with intersections. It’s a bit like using the boolean modifier. It’s not great in every situation as it can make a mess of your topology if you are not neat with your cuts and you can be left with some very tiny faces or triangles. But if you line things up nicely and merge your close vector points it’s a pretty simple and handy tool in the kit.

Blender – Custom Bevels

This week for my game called The Gap I’ve been doing some house components. The game is set in the suburbs and there will be a lot of house interiors. In what I envision to be the opening scene of the game your main character wakes in his or her bedroom alive with excitement and ready to explore the world. Which has little to do with cornices but it’s these details that make the game look like a world and adds to the immersion.

So here is an example of a cornice that I have made in Blender using the Bevel Modifier.

The Cornice using a Vector Group and Custom Bevel

This starts as a cube with about a quarter cut out of the form and a reduced height. But any straight edge will do. First use the edge select to assign all the relevant parts you want to bevel into a Vector Group. (Select the edge and in the object data panel use the “assign” button under the Vector Group section). Then you add the Bevel Modifier and as you can see in the image above you use the Limit Method by Vector Group and then add your new Vector Group you just assigned. Choose Custom Bevel and use either one of the presets or use the graphing tool window at the bottom to create your own bevel shape. There are a couple of nice cornice style presets in that section to get you started. (It helps to play round with the Amount and Segments section at the top to improve the look – also try Smooth Shading on the object).

Below is a Window frame I used the same technique on but with a different profile. I used ctrl+R to make some loop cuts around the inside of my window frame and used the edge select to assign the cuts to a Vector Group. Then again I used a Bevel Modifier to make a custom set of ridges around the window frame to make it look like the fittings of the aluminium framing around the glazing of the window.

Custom Bevel on a Loop Cut to make Window Mouldings

You can see I also added a normal Bevel Modifier to the edge of Window Sill to create the outer wall shape where the rain runs away from the window frame.

I did a quick mock up in Unity to see how they performed under the often difficult lighting environment of the game engine. As you can see below by the shadows on the walls and spot light on the floor it’s not an ideal set up and the cornices are looking pretty crap. At the top of the room on the back wall I have two longer cornice pieces and a corner piece is visible as well. The two at the back are picking up different light sources and one looks lighter than the other. They are clearly three separate objects and not one nice clean line. It might help to add some more surface geometry to the longer pieces so they are not just one long face (loop cuts or subdivisions). Alternatively I could measure them out to fit the room exactly and meet in the corners – but then I would have to make multiple lengths instead of a more modular re-usable approach.

Cornices under lighting conditions in Unity

Character Design

The other thing I did this week that was actually productive is some more character designs. This one is Hippo Boy catching a football and a couple of different shading styles (still playing with Clip Studio and still enjoying it). Next up I’m thinking about all the ways I can program a mugby style football game.

Hippo Boy
Pop Style Hippo Boy

More Gaps

This is more concept art for a protagonist in the new project called The Gap. Okapi Boy – I have always loved Okapi’s. They are shy and remained hidden from the world in the deepest parts of the jungle until they were discovered in the 50’s. Beautiful Zebra like patterns on skin like a Deer. This is a deeply peaceful animal with large soulful eyes. He dreams and offers advice but you have to seek him out and finding him is not always easy or straightforward. In The Gap you get the chance to play as the Okapi for part of the story.

Okapi Boy

There used to be a great example of this rare creature in the Melbourne Museum Taxidermy collection (which I used to love but has now sadly been taken off the exhibit floor). You can take a virtual tour of the old “Wild” exhibition here.

I have a LOT more concept art to do as I want to get a very clear picture of my characters before I start modelling.

I also stared working on the programming for the game. One element I want to include in the story is a “mini-game” called Fox and Geese. It’s played on a chess board and was one of the first games I remember my dad teaching me how to play. It’s pretty straightforward and uses a chess board and pawns. Four white pawns are the Geese who can only move forward and diagonally one row at a time. The Fox is a black pawn that can move diagonally one space at a time in any direction. Moves are taken in turn and the aim of the game is for either the Fox to break the line of Geese or the Geese to “capture” the Fox so that he cannot move.

Fox And Geese

It’s early days yet with only the board set up and pawn selection scripts started but it was actually pretty fun setting up the programming that took care of the board. When you learn programming you get to do lots of arrays and nothing screams “ARRAY” like a chess board. So it’s kind of nice to use one of those basic skills that you use in all programming in such a nice simple example. You get to add a little interest to the basic array with the inclusion of alternating colours. Here is the code below:

using UnityEngine;

public class FnG_MakeBoard : MonoBehaviour
{
    public GameObject boardPiece;
    public Vector3[] positions;

    // Start is called before the first frame update
    void Start()
    {
        positions = new Vector3[64];
        float start_x_pos = -1.75f;
        float start_y_pos = -1.75f;
        float rowcount = 0f;
        float linecount = 0f;


        for (int i = 0; i < positions.Length; i++)
        {
            positions[i] = new Vector3(start_x_pos, start_y_pos, 0f);
            start_x_pos += 0.5f;
            rowcount += 1;

            if (rowcount == 8)
            {
                start_x_pos = -1.75f;
                start_y_pos += 0.5f;
                rowcount = 0f;
                linecount++;
            }

            Instantiate(boardPiece, positions[i], Quaternion.identity);
            Color32 myRed = new Color32(185, 48, 48, 255);
            Color32 myGray = new Color32(106, 106, 106, 255);
            if (i % 2 == 0)
            {
                if (linecount % 2 == 0)
                {
                    boardPiece.GetComponent<SpriteRenderer>().color = myGray;
                }
                if (linecount % 2 != 0)
                {
                    boardPiece.GetComponent<SpriteRenderer>().color = myRed;
                }
            }
            if (i % 2 != 0)
            {
                if (linecount % 2 == 0)
                {
                    boardPiece.GetComponent<SpriteRenderer>().color = myRed;
                }
                if (linecount % 2 != 0)
                {
                    boardPiece.GetComponent<SpriteRenderer>().color = myGray;
                }
            }
        }
    }