46
$\begingroup$

I used node textures in a mesh I exported to .FBX.

I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.

Is there something I'm doing wrong or is it Blender?

$\endgroup$
1

2 Answers 2

88
$\begingroup$

This is a frequently asked question.

TL;DR

Most file formats just don't support exporting textures, let alone full blown material definitions or other application specific features. Also most Blender importers/exporters don't currently support node based materials well.

Manually reproduce your materials using available textures at the target environment.

Long story

Materials are too implementation specific and tightly tied to the rendering system they belong to, or software they were created with. You can't, for the most part, import/export material definitions between applications, you can't even get Blender Internal Materials to work with Cycles Renderer nor vice versa, and they are both created within Blender, let alone between completely different applications.

For this reason no file format you use can, or even tries to, import or export material properties, be it 3DS, FBX, Collada, STL, OBJ or any other. These are mostly mesh-only, geometry-centric file formats concerned with porting object shapes, and some times animation, armature, and basic shading, or color properties (like MTL files); never full complex material definitions.

Many of these exchange file formats originate from the fixed GPU pipeline era of materials, and there are simply no data structures in their specifications to accommodate that type of data, let alone all possible types of properties, settings or exotic combinations of maps. Even if there were, there are way too many different rendering techniques for a variety of purposes and responding to distinct requirements (like speed or responsiveness for real time rendering engines or games, or realism for physically based 'offline renders'), and each using its own different set of parameters and particular ways of interpreting specific properties to be able to correctly map settings, parameters or particular features between them easily.

For example most real time rendering systems have need for some form of explicit "backface culling" option, because rasterization relies heavily on being able to discard invisible geometry that is facing away from the point of view for performance reasons. Yet in renderers like Cycles it is just integrated as a node, because for raytracers it is irrelevant which direction a geometry faces since they are always taken into account. On the other hand glass and transparent shaders "just work" with great refraction in raytracers, yet in EEVEE you need to muck about with blending modes, transparency settings and reflection probes, nonexistent in Cycles, because representing object interactions like reflections or refraction is expensive and complex for rasterizers.

Certainly never expect proper export of any procedurally generated textures (like Noise or Voronoi), image textures using "parametric" texture coordinates (like Object or Generated), or running through any other nodes before the final shader (like Color-Ramps or color adjustments); these are always calculated at render time by the engine (like Cycles or EEVEE for viewport display purposes), and can't be exported elsewhere. Have in mind that pre Blender 2.8# most Blender exporters do not even support Cycles node based materials at all, so even image textures used in Cycles node trees are often not expected to export correctly.

As of 2.9+ series some work as been done, and more common image based texture maps may some times be correctly preserved, like diffuse, specular, glossiness, or the increasingly popular "PBR workflows", when simple image textures are directly connected to Principled BSDF shader nodes, but even this this shouldn't be relied upon. The manual states which limited subset of node setups are supported.

Same applies for many other features specific to applications or render engines, including but not limited to lighting parameters, shadow settings, lamps, cameras, physics simulations (fluids, cloths, soft bodies), texture options (clamping, clipping, tiling, color adjustments), generated texture coordinates (anything not mapped explicitly by a UV map or created by unwrapping a mesh), material options (backface culling, shadows, visibility, transparency and blending modes), materials shader or texture animations, particle systems, physics simulations (fluids, smoke or fire sims), volumetric data, modifiers parameters, shape morphing, animated, generative, shape altering or deformation based animations (like shapekeys, Ocean, Build, Geometry Nodes modifiers), visibility options (like hide/unhide, wireframe, shadow, etc) and other "generated data", can't also for the most part be imported or exported (with a few exceptions).

Even if Blender did support exporting any of these features there would also have to be feature party at the receiving end, that means supporting both reading and mapping said data to similar or equivalent properties on importing application, which may or may not be available.

Exceptions

One notable exception to all this is the glTF file format, which as of version 2.0 glTF does support some material definitions based on a metallic-roughness shading model in its specs. The glTF-Blender-IO addon created by the Khronos Group themselves supports exporting Principled BSDF node based materials. But even then some restrictions apply, it must only contain pure image texture based materials connected directly to a Principled BSDF shader, without any transformations or interference from other nodes or textures. As of 2.9+ the Blender manual states which setups are supported by GLTF 2.0, which include Principled BSDF and Shadeless (Unlit).

The core material system in glTF supports a metal/rough PBR workflow with the following channels of information:

  • Base Color
  • Metallic
  • Roughness
  • Baked Ambient Occlusion
  • Normal Map (tangent space, +Y up)
  • Emissive

How to solve it then?

All you can, and should, import/export are UV coordinates with your mesh so you can correctly apply your textures at the "target application", game engine or receiving rendering environment, where you'll be importing and displaying your model, be it Unreal, Unity, Gamekit, sculpting toolkits, other modelling or animation suites, external rendering software or whatnot; or even Blender itself when importing models from elsewhere. UV maps are generally correctly preserved by most exchange file formats by default.

There you should spend some time recreating your materials from scratch again with the provided textures and available maps. Yes, it requires some backtracking and will take some time, but with practice it'll get quicker. Save presets into reusable libraries when available, to reduce the amount of repetition.

What you can do in some situations is use Blender to bake textures that you can later use in the final destination or receiving application to create materials there, not inside Blender.

Baking is the process of pre-calculating shading and storing it in a static image texture that may incorporate several optional channels like diffuse, glossy, indirect lighting, bump maps, normal maps, light-maps, among others. This may improve graphic quality or perceived "realism" at the expense of dynamism, as certain properties of materials and textures may become static, as if "painted onto the surface", like shadows or reflections. This is often a requirement for high performance mediums or low power platforms, like web or mobile gaming, where available resources are limited or unknown, and speed takes precedence over graphic fidelity.

Future Developments

PBR is not a standard however and not every implementation works the same way or interprets the same parameters similarly. The Principled BSDF was already written according to a model designed by an established industry leader (Disney) for their own internal use, and game engines like Unreal Engine® or texture painting applications like Substance Painter® also adopted it.

As the PBR workflow gains popularity and traction it is possible that more applications "join the movement" and implement it in the future. If a common standard can be agreed upon, it may be possible that in the future more importers/exporters improve compatibility with an increasing number of materials properties. They will likely either read directly from a Blend file, use some other hypothetical new file format, or be forced to implement new standards; as the current ones still lack data structures to correctly describe them. At this point it is pure speculation, and no known plans are made.

Related Issues

$\endgroup$
9
  • 2
    $\begingroup$ I have never used Unreal or any other engine, I have no clue, you will have to ask about it in a dedicated community I'm afraid. I hear some engines do not allow multiple materials per mesh, you would have to break it apart into several objects. Anyway you can apply the materials in Blender, for visual fidelity in the viewport, and if the importer supports that it's less work you have to redo in engine, just don't expect to use the same exact material definitions. $\endgroup$ Jul 11, 2016 at 12:44
  • 2
    $\begingroup$ Its worth noting that a lot of applications/formats care about assigned material slots (i.e. which verts have which material assigned), but not the actual material that is assigned, as they need these for assigning their own materials. $\endgroup$
    – Sazerac
    Nov 24, 2017 at 1:38
  • 3
    $\begingroup$ @Duarte Farrajota Ramos there are countless export scripts that export blender meshes with their assigned materials $\endgroup$
    – phil123
    Jan 1, 2018 at 13:26
  • 3
    $\begingroup$ @phil123 You should post that as an answer below, with links to said scripts and a description of the workflow used, along with some screenshots of the results $\endgroup$ Jan 1, 2018 at 20:28
  • 2
    $\begingroup$ FBX supports textures. So the bit about it not being supported by the file format is just plain wrong. $\endgroup$ Aug 28, 2019 at 1:26
11
$\begingroup$

When exporting to .fbx, you can't export materials, you'll have the surface color, but not other settings such as glossiness and reflection, for textures, yes you can, but you have to use blender internal (it does not work with cycles), and make sure you don't use nodes, apply the textures, then, when in the fbx export settings, go to bottom, set path to copy, then check the box-like icon next to it, it should now embed the textures with the exported fbx file.

PS: I didn't test the new blender 2.79

Blender Fbx export settings to embed textures

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.