Lets see how you can speed up things when working with Blender and UE4.
I faced some problems while making this tutorial 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
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.
Go into Export -> FBX and do the same with “Export FBX” button located in right top corner.
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.
First i added Cube.
Then i went into Edit mode and Selected all -> Mark Seam.
U -> Unwrap
Uv Edit mode -> Select all -> UVs -> Pack Islands
Change island margin to 0.03
Object mode -> Add Subdivision Surface modifier
Set view up to 4 and Apply.
And this is how it looks like in Uv mode now.
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:
This is how you should save Blender file.
Documents -> Unreal Projects -> MyProject:
And add Folder “Meshes” right here
Documents -> Unreal Projects -> MyProject -> Content:
Save your Blender File:
In Blender Folder.
Export Settings in Blender:
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.
Import settings. Uncheck some things like Auto generate collision and Generate Lightmap UVs, Combine meshes.
Unreal Engine 4
And it should look like this:
One thing i forgot to add was…
Shade Smooth but that is like 3 second job
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.
Looking really good.
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.
In Uv edit mode you can take a look at it (follow red arrows):
And how you find it in UE4 (double click the mesh in content browser):
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”.
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 do.
It may look fine but when you build lighting then you usually see some problems:
So first what i did. I increased Pack Islands margin:
Looks fine after Reimport.
But when i build lightning. It comes back again.
So i ended up doing this:
- First i cleared old Seam
- And made seam in middle
- Manually moved them in nice places
After lightning build, it was perfect.
So i opened Substance Painter and made something like this with it:
- Fill Layer
- Material -> Painted Steel
If you’ve been using Import button before, you know exactly how awesome feature this is:
Material node setups.
Where i saved the file.
Well it didn’t do perfect job, some seams are visible.
It was looking fine in this picture though.
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 here’s the workflow:
You can also import multiple objects in one FBX file, but sometimes when you reimport it duplicates everything and you end up with 2 assets in one object so it’s just much more clean workflow with one object per FBX file.
There’s addon for Blender which does all this work, Google for “blender ue4 tools”.