26
$\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$
61
$\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 with 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.

There are simply no data structures in the specifications for most exchange file formats to accommodate that data, let alone all possible types of properties, settings or maps; and even if there were, there are way too many different rendering implementations 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 match 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 it for performance reasons, yet in render like Cycles it is just a basic node because for raytracers it is irrelevant which direction a geometry faces. 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 and transparency settings, nonexistent in Cycles, because representing object interactions is expensive and complex for rasterizers.

Some more common image based texture channels may some times be correctly preserved, like diffuse, specular, glossiness, or the increasingly popular "PBR workflows", but certainly never procedurally generated textures and/or generated texture coordinates, these are generated at render time and can't be exported. Have in mind that most Blender exporters do not even support Cycles node based materials at all (at the time of writing for Blender 2.79#), so even image textures used in Cycles node trees are most likely not expected to be preserved.

Same applies for many other features specific to applications or render engines, like 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) particle systems, smoke and fire sims, volumetric data, modifiers, shape morphing (like shapekeys or deformation based animations) and other "generated data", can't also for the most part be imported or exported (with a few exceptions).

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, 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.

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.

Due to the recent popularity of the Physically Based Rendering, and its increasing use in Game Engines and Real-Time rendering applications, it has become a sort of vaguely defined "loose standard" for describing surface properties of materials (although several differently nuanced versions exist).

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.

| improve this answer | |
$\endgroup$
  • 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$ – Duarte Farrajota Ramos Jul 11 '16 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 '17 at 1:38
  • 2
    $\begingroup$ @Duarte Farrajota Ramos there are countless export scripts that export blender meshes with their assigned materials $\endgroup$ – phil123 Jan 1 '18 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$ – Duarte Farrajota Ramos Jan 1 '18 at 20:28
  • 1
    $\begingroup$ I can add something about Unreal and glTF, don't know about FBX. Cycles, Eevee, and Unreal each have powerful node-based materials. The glTF 2.0 material model is simpler but can handle a large percentage of game art needs (image-texture-based PBR). glTF works between Blender and Unreal (as of 4.19) for Static Meshes with Materials. You can have multiple materials in a single mesh object, and these will show up as material slots in Unreal. From there you can use the materials imported from glTF or swap them out / author new ones in Unreal. $\endgroup$ – Mike Erwin Mar 16 '18 at 18:24
9
$\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

| improve this answer | |
$\endgroup$

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