Using Blender in game development

At Embark we use Blender across the studio as our go-to tool for 3D and environment art. Just now, we also renewed our gold-level sponsorship of the Blender Development Fund another year. In this post, Daniel Bystedt details why Blender is great for game development and lets you in on a specific use-case.

Daniel Bystedt
Nov 27, 2020 · 6 min read
Image for post
Image for post
Hair rendered in Blender’s real-time render engine Eevee. The character here is procedurally generated from a scan data set.

My own history with Blender dates back to 2015. Blender has evolved tons since, but even back then I was surprised to find how capable this free software was, with its fantastic modeling toolset and non-destructive modifier system.

It made me fall back in love with 3D modeling again, and soon upon discovering Blender, I found myself using it for most of my tasks. Over time, I also became an active member of the Blender community. Nowadays, I’m involved in some of Blender’s development processes as a commissioner for various projects.

Embark’s embrace of Blender was in fact how I discovered this studio in the first place and a big reason why I work here today (in addition to our work with machine learning and proceduralism). At Embark, we’re constantly looking for new and effective tools and solutions to solve problems, and Blender truly speaks to what sort of studio we want to be. As a free and open-source tool, it also contributes to making game development more accessible and collaborative.

Given that Blender is an unfamiliar tool for many of our new artists, we’ve been working actively to make sure everyone here gets the know-how and support they need to quickly get up to speed. Many who were skeptics at first are now some of our most active Blender advocates, which has been fun to watch!

As we celebrate our first year as a Blender sponsor, we wanted to share some of this know-how with all of you in the Blender community too. So in this post, I’m going to describe to you in a bit more detail some of the specific reasons we think Blender is great for game development, and describe a specific use-case, as we’re now working on our first games.

So let’s get into it.

Blender has a lot of amazing features, but some of the most important ones for us at Embark is the approachable and non-destructive modeling tools and modifiers. The realtime viewport Eevee is also priceless when it comes to evaluating your model and textures before importing them into Unreal Engine. We also love Blender’s constant updates and development cycle and that the Blender Foundation is so transparent about its development process.

Blender is also very pipeline-friendly and allows us to effortlessly implement tools and applications into our pipeline. Blenders’ data management of file content provides flexibility, allowing any type of data to be stored on almost all types of data types inside the file. Custom properties can be stored on scenes, objects, meshes, collections, etc. Custom properties can hold basically any type of data such as float, string, list, dictionaries, and more.

For example: switching to the scripting tab and writing this example in the python console in Blender

will give you a custom string property on the active object, that you can expose in object properties or by investigating the outliner with display mode: “Data API

Outliner Data API showing custom property
Outliner Data API showing custom property

Blender uses a lot of mesh component data for vertex groups, bevel weights, and creasing weights. By collecting this per-vertex/edge/polygon data and store it into a custom object property, we can export the objects using the FBX or ALEMBIC file formats (note: ALEMBIC supports custom properties as of Blender 2.91). The files can then be opened in Houdini and then we can do operations by using the vertex/edge/polygon data.

Creating real-time hair in Blender

So let’s discuss a specific Blender use-case for us here at Embark: how we use Blender to create real-time hair.

Blender offers the ability to do modeling, texturing, shading, and also display your work in a high-quality real-time rendering viewport. Therefore, it’s a great tool for creating hair, both for the classic hair-card approach, but also for importing grooms into Unreal when exported as a curve object with multiple splines to Alembic.

When creating the texture for hair cards, we create a strip of hair on a slanted plane. The grooming tools in Blender is really nice and are easy to use:

Image for post
Image for post

We then layout the hair strips on a grid. The hair shader that we later use in Blender and Unreal can dynamically change UV mapping to adjust to the number of rows and columns used in the hair card texture. This way we can easily change the hair texture on any character in the game engine.

Image for post
Image for post

The hair is then rendered out from an orthographic camera and the different shading attributes such as normals, opacity, random strand value and specular can be packed into the RGB channels of one or multiple textures.

Image for post
Image for post

The hair particle system is placed on a hair cap on the character. Using a hair cap makes it easier to keep a repository of hairstyles.

Image for post
Image for post

The geometry of a basic hair-strip looks like this (the UV is normalized):

Image for post
Image for post

Using a particle instance modifier on the hair card geometry and pointing the modifier's object value to the hair-cap and particle system will instance and deform the hair card to each hair curve in the hair particle system.

Image for post
Image for post

Hair cards can be reduced and triangulated in a non-destructive workflow using modifiers:

Image for post
Image for post

Viewing the hair in the real-time rendering viewport Eevee can give you a great idea of how the result will look in the game engine.

Image for post
Image for post
Image for post
Image for post
Wireframe rendering of the hair geometry

On Monday, November 30th, at 17:00 CET, I’ll be joining Pablo Vazquez on the Blender Today live stream to introduce Embark Studios and go through this example in more detail. You can tune in here.

Embark Studios

Embark Studios is a Stockholm-based games studio, on a…

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store