The following is a list of guidelines for preparation and export of 3D content from Blender to Unreal Engine 4 via the FBX file format.
Disclaimer: This is not a formal specification. It’s a list of tips I found to work well in my own experience. * Some of the issues listed here may have already been solved
Blender Scene and model settings:
System units in Blender: Define the scene units in Blender as: Metric unit with 0.01 scale (centimeters) And model your content correctly using centimeter units. * Modeling in 1 meter units may seem to be imported correctly into UE4 but will cause unsolvable problems like a skeletal mesh physics asset having incorrect auto-generated shapes, a problem that in my experience can’t be fixed manually.
Transform: Model your model in Blender facing the -Y world axis, +Z obviously being up (obviously for Blender). * This way the model is aligned to Blender’s views so the front view displays the model’s front etc. Make sure to apply your model’s transformations before export.
Armatures: Make sure the Armature object isn’t named “Armature”. naming or leaving the Blender skeleton named “Armature” will cause the UE4 importer to fail due to “multiple roots”. * Also remember some weird related bug with animation scale incorrectly imported, but can’t confirm this now.. No need for a dedicated root bone in the hierarchy. the Armature object is the root of the bone hierarchy. * See export option below
Texture baking: Set the normal map’s green channel to -Y. * This is not critical at all because if baked as +Y it can easily be fixed in UE4.
Metadata: Blender custom properties import as UE4 asset metadata that can be read by editor scripts for automation purposes. * See export option below
FBX Blender export and UE4 import settings:
I recommend saving an FBX export preset with these settings.
Optional: I prefer the export settings to include only selected objects. * It’s more efficient for me to select the specifics objects I want to export into a single FBX file prior to export, than to delete all the temp / reference / draft objects from the scene. If you want to export Blender custom properties with to the FBX check the “Custom Properties” option
Axes: Blender’s native model/world orientation is model’s forward facing the -Y axis, left side facing +X and of-course up facing +Z. UE4’s native model/world orientation is model’s forward facing the +X axis, left side facing -Y and up facing +Z. There are axis settings in Blender’s FBX export module, that theoretically, should be set like this:
However, in tests I did, The axis settings made no difference when importing to UE4, even when setting intentionally incorrect upside-down axes. Maybe the FBX exporter writes these settings to metadata that the UE4 importer doesn’t read.. From my experience, what’s important is to orient the model correctly in Blender (see above), apply the transformations, And in the UE4 import menu, check the “Force Front XAxis” option:
Geometry: Make sure either “Edge” or “Face” is chosen in the “Smoothing” option to import the mesh’s smooth shading correctly ans avoid a smoothing groups warning on import:
Optional: Depending on how much control you need over the mesh’s tangent space, You may want to check the “Tangent Space” export option, This will make Blender export the full tangent space to the FBX and make UE4 read it from FBX instead of generate it automatically. * For this option to be supported, the mesh geometry must have only triangle or quad polys. In the UE4 import settings, choose the “Import Normals and Tangents” option in “Normal Import Method”:
Armature: Set “Armature FBXNode Type” to “Root”. Uncheck the “Add Leaf Bones” option to avoid adding unneeded end bones. Set bones primary axis as X, and secondary axis as -Z.
Animation: Uncheck “All Actions” to avoid exporting actions that don’t actually belong to the skeleton. * Un-related animations in the FBX can also corrupt the character rest pose in UE. The “NLA Strips” option is useful for exporting a library of animations with the skeleton. * In Blender’s NLA editor, activate the actions you want exported to the FBX.
The Cycles render engine in Blender has a very convenient OSL Shader development and usage workflow.
Shaders can be both loaded from external files or written and compiled directly inside Blender.
Before you begin:
Make sure your Blender scene is set to use the Cycles render engine, in CPU rendering mode, and also check the option Open Shading Language:
To write an OSL shader in Blender:
Write your shader code in Blender‘s Text Editor:
In your object’s material shader graph (Shader Editor view),
Create a Script node:
Set the Script node‘s mode to Internal,
And select your shader’s text from the Script node‘s source drop-down:
If the shader compiles successfully, the Script node will display its input and output parameters, and you can connect it’s output to an appropriate input in your shading graph.
* If your shader is a material (color closure) connect it directly to the Material Output node’s Surface input, is it’s a volume to the Volume input, or if its a texture to other material inputs as needed.
If the shader code contains errors, it will fail to compile, and you’l be able to read the error messages in Blender‘s System Console window:
After fixing errors or updating the shader’s code, press the Script Noe Update button on the Script node to re-compile the shader:
Loading an external OSL shader into Cycles:
Exactly the same workflow described in the previous section, except setting the Script node‘s mode to External and either typing a path to the shader file in the Script node or pressing the little folder button to locate it using the file browser:
Adding a texture to an area light can make it produce softer and more detailed highlights and an overall more organic lighting effect.
Note:
Since an Area light in Blender isn’t rendered as an actual mesh object with UV coordinates, it’s texture coordinates are parametric (see below).
Adding a texture to an Area Light:
In the Area Light properties click the Use Nodes button (see image A) to initiate its node graph and allow texturing it.
In the Shader Editor view (with the light selected), drop your texture to the light’s node graph and connect it to the light’s Emission node’s Color input. (see image B)
Create a new Input > Geometry node, and connect it’s Parametric output to the Image Texture’s Vector input. (see image B)
A. Without a texture the Area light produces a hard flat highlight:
B. With the vignette texture, the Area light now has a more subtle organic effect:
* The Emission node’s Strength was increased in this case to compensate for the lower light output with the texture. Related posts:
This character project is the first one in which I’m using physical cloth simulation in Blender to model the character’s clothes at proxy quality (they will be detailed further manually). learning this approach to clothes modeling demanded a lot experiments, trials and errors to get it right, in this short article, I’ll try to provide some insights, tips, and settings that can speed up the process.
When modeling the basic shape of the cloth try to “cut” a realistic cloth pattern for your desired cloth model. if you’ll search images on the web for “trousers cutting pattern” or “coat cutting pattern” you’ll find many examples.
* See images below
Create proper UVs for the cloth mesh when its still flat (before the simulation)
In Blender cloth simulation, isolated edges in the mesh (edges without polygons) are treated as sawing springs, and are an important part of the cloth setup.
Use a low poly proxy model for your characters body mesh, it will speed up the cloth simulation.
Early experiments:
In this experiment I used a simple tubular pants-like mesh that I quickly modeled around the character’s legs and pelvis (not a realistic cloth cutting pattern), with the top (weist) vertices defined as a vertex group with shrinking cloth property.
The result looks like training suit pants. it wasn’t at all what I wanted for this character, but I actually like it and probably will use such pants on other characters or on this one as a secondary look.
In this experiment I started trying to model an actual man’s trousers cutting pattern, and as you see, it still needs tweaking.
This experiment is beginning to produce reasonable results, the undershirt initial shape is still cut too low at the back.
* Note that there is an animated belt collision object to bring the undershirt to it’s shape at the weist
Final Settings:
The final undershirt initial model:
The final pants initial model:
* Note that the belt mesh is a vertex group defined a fixed in the cloth simulation, and that it’s split to parts corresponding to the edges of the pants shape that need to be sawed to it. (see the process here)
The full final cloth setup for the character. the setup includes a low poly collision object of the whole character and shoes, undershirt mesh, pans mesh and animated (contracting) belt collision for the undershirt:
By default, the view-ports Camera view in Blender displays the view from the camera that is set as the scene’s Active Camera.
If you split the view and in the new view select a different camera and set it as the Active Camera, the view in other view-ports set to camera view will update to display the new Active camera.
In short, by default, it seems you can’t assign different camera views to different view-ports..
But you can…
You just have to unlock the wanted view-port from the scene’s Active Camera by de-activating this button:
When the Use the scene’s Active Camera and layers in this view button is de-activated, your allowed to set an Active Camera for the specific view-port without changing the scene’s Active Camera setting, therefore not affecting other view-ports displaying the camera view.