18
$\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$
51
$\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 yet.

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

Long story

Materials are too 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, material or lighting 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 all types of material properties, settings or maps; and even if there were, there are way too many different rendering systems 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 and ways of working between them easily.

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 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, shadow settings, lamps, cameras, physics simulations (fluids, cloths, soft bodies), texture options (clamping, clipping, color adjustments), material options (backface culling, shadows, visibility) particle systems, smoke and fire sims, volumetric data, modifiers, shape morphing (like shapekeys) 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, 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.

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 an image texture that may incorporate several desired 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 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.

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

The glTF-Blender-Exporter created by the Khronos group themselves supports exporting Cycles node based material. But even then some restrictions apply; at the date of writing it requires a special node group setup, specifically made for this purpose for it to work, which can be downloaded from their repository. Future versions do plan to expand support to include Blender EEVEE nodes, possibly based of the Principled BSDF shader.

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 that more importers/exporters support these types of materials/textures. They will likely either read directly from a Blend file, use some other hypothetical 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.

$\endgroup$
  • $\begingroup$ Duarte, Am I correct in assuming when I unwrap my model I do not need to apply a material when exporting it as FBX. As long as I have unwrapped it correctly upon import into say Unreal it will give it a material? If this is the case How do i get say two different materials on a wall and the skirting boards around it for example. Learning I am :) $\endgroup$ – harold4964 Jul 11 '16 at 2:56
  • 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
  • 1
    $\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
7
$\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$

protected by David Jan 1 '18 at 15:32

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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