From Blender to Unreal Engine 4 – Workflow and Project Set up

I’m going to show you how you can speed up things when working with Blender and UE4.

I faced some problems while making this tutor and i didn’t go back and redo it, cause it was important to show you how to fix them. Someday you’re going to face same problems too.

Let’s start with Creating New Project in UE4. Create new project -> first person.

Softwares used in this tutorial

Substance Painter 2.4.1

Unreal Engine 4.14.3

Blender 2.78

Blender setup

Now while UE4 is loading in background you can start Blender and make some shortcuts. Plan is that you can export with just a couple buttons instantly, you are going to use export fbx option so many times.

Select: File -> Export -> FBX (right mouse) and Add Shortcut.

screenshot_6

Go into Export -> FBX and do the same with “Export FBX” button located in right top corner.

screenshot_7

If you have a gaming mouse it usually got some extra buttons so what i did, i set up couple buttons from my mouse to these export choices.

Make sure you have Units set up as Metric.

Object

First i added Cube.

screenshot_6

Then i went into Edit mode and Selected all -> Mark Seam.

screenshot_7

U -> Unwrap

screenshot_8

Uv Edit mode -> Select all -> UVs -> Pack Islands

screenshot_9

Change island margin to 0.03

screenshot_10

Object mode -> Add Subdivision Surface modifier

screenshot_11

Set view up to 4 and Apply.

screenshot_12

And this is how it looks like in Uv mode now.

screenshot_13

Add Material. When working with UE4 you should use form like this when naming your materials: “M_NAME” so just add M_ at the start. Name your static meshes like this SM_MyMesh.

With personal projects i only add _M end of the material name and leave meshes without SM_, like this:

screenshot_21

https://wiki.unrealengine.com/Assets_Naming_Convention

Settings

This is how you should save Blender file.

Documents -> Unreal Projects -> MyProject:

screenshot_19

And add Folder “Meshes” right here

Documents -> Unreal Projects -> MyProject -> Content:

screenshot_20

Save your Blender File:

In Blender Folder.

saveblenderfile

Export Settings in Blender:

screenshot_16

screenshot_15

Export it in “Meshes” Folder you created like 5 seconds ago.

Now when you hit “Export FBX”, jump to UE4 and you should see this:

Check “don’t ask again” and press import.

screenshot_17

Import settings. Uncheck some things like Auto generate collision and Generate Lightmap UVs, Combine meshes.

screenshot_18

Unreal Engine 4

And it should look like this:

screenshot_22

One thing i forgot to add was…

screenshot_28

Shade Smooth but that is like 3 second job

screenshot_29

Now Export it with your shortcut buttons, for me it was just two clicks with my mouse.

It gives you message when it reimports it automatically, all you need to do is just export it in Blender.

screenshot_25

Looking really good.

screenshot_30

Lightmap

So since we didn’t generate uv map for lights (that button you unchecked in ue4 import settings), we need to make it in Blender.

Select your mesh and go to mesh settings. There you’ll find UV Maps and just press plus button to add a new one.

screenshot_23

In Uv edit mode you can take a look at it (follow red arrows):

screenshot_24

And how you find it in UE4 (double click the mesh in content browser):

screenshot_26

Change “Light map coordinate index” to match channel number:

Note: if you import with 2 uv maps it selects “Channel 1” automatically. In this tutorial we imported with 1 uv map so it selected “Channel 0”.

screenshot_27

Q&A

Q: Why should i build lightmap myself and not use “generate lightmap option”?

A: It’s a very unprofessional way. After all it’s almost as much work as turning that option on in import settings. Once you start knowing how lightmaps work in unreal engine with different shapes, you can find the max quality of your work easily and avoid the error of clusterf*cks coming on your way.

Q: If i edit my mesh in Blender, do i need to re-unwrap lightmap as well as texture uv map?

A: Yes you need.

Lightmap Problem

It may look fine but when you build lighting then you usually see some problems:

lightmapproblem1

So first what i did. I increased Pack Islands margin:

lightmapproblem2

Looks fine after Reimport.

lightmapproblem3

But when i build lightning. It comes back again.

lightmapproblem4

So i ended up doing this:

  • First i cleared old Seam
  • And made seam in middle
  • Unwrapped
  • Manually moved them in nice places

lightmapproblem5

lightmapproblem6

lightmapproblem7

After lightning build, it was perfect.

lightmapproblem8

Painting/Texturing

So i opened Substance Painter and made something like this with it:

  • Fill Layer
  • Material -> Painted Steel

screenshot_6

Export Settings:

screenshot_7

If you’ve been using Import button before, you know exactly how awesome feature this is:

screenshot_8

Material node setups.

screenshot_9

Where i saved the file.

screenshot_10

Well it didn’t do perfect job, some seams are visible.

screenshot_11

It was looking fine in this picture though.

screenshot_12

That could be fixed by doing the same thing like with lightmap uv. But it’s just extremely hard to paint with any tool, cause of stretching. Changing the UV Projection to Tri-planar in Substance Painter fixes it too.

So what i recommend for the best workflow:

  1. Create project with UE4 – 1 Minute
  2. Build mesh with Blender – All the time you need
  3. Add Material – 10 Second
  4. Add Uv Map for textures – 10 sec – several hours
  5. Add Uv Map for lights – ^
  6. Export in FBX – 10 Seconds
  7. Import mesh into UE4, which it does automatically after first import
  8. Setup Basic Material, just white. – 10 Seconds
  9. Drag & Drop mesh into Level – 2 Seconds
  10. Build Lightning – 2+ Minutes
  11. Check and fix errors – Minutes… Hours…
  12. And you are ready to paint textures

Trust me you could do much worse without the auto import in Unreal Engine 4, 90% of the people who work with these two applications don’t even know about it this. And always test the mesh or whole scene in the game engine before you start texturing.

There’s addon for Blender which does all this work, Google for “blender ue4 tools”. Tho i’m not sure if it works cause it was made like 2 years ago and import settings seem to have changed a lot on unreal since that.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s