Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Missing textures from imported fbx file in Unity since update

Discussion in 'Asset Importing & Exporting' started by viingo, Feb 21, 2018.

  1. jpvanmuijen

    jpvanmuijen

    Joined:
    Aug 23, 2012
    Posts:
    13
    I think I stumble on this thread each time I import an .fbx model from 3ds max to Unity. I can extract materials and textures, but then I have to remap each texture to each material by hand. Very annoying, haven't found another way yet.
     
  2. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,592
    Went though this recently managed to get it to auto do most materials, for me I had to buy a script to convert vray to standard..(only applies if vray is your problem, but I think theyre algorithmic textures and need converting to standand if so) this then outputted about 85% correct, the rest I had to do by hand, a couple i didnt yet fix as I think the uv mapping was messed up, but on the whole managed to get the models into my game and they look good. But it puts me off buying models from turbosquid etc.
     
  3. Lulster10

    Lulster10

    Joined:
    Nov 5, 2021
    Posts:
    1
    Was ripping what little hair I had out my head, try this guys, it seems fool proof
     
  4. HunterAhlquist

    HunterAhlquist

    Joined:
    Oct 6, 2013
    Posts:
    127
    Having this same issue, cant use embedded textures inside FBX OR .blend files. None of the solutions here worked. I used to be able to use both...
     
  5. lubomirkurcak

    lubomirkurcak

    Joined:
    Oct 21, 2020
    Posts:
    1
    I just encountered the same problem.

    I tried to import this .fbx file from:


    This is the file structure:
    Code (CSharp):
    1.  
    2. + ficus-bonsai
    3.   + source
    4.       AssetPackFoliage_FicusBonsai_1_5.fbx
    5.   + textures
    6.       FicusBonsai_1_Material_albedo2.png
    7.       FicusBonsai_1_Material_metalness.png
    8.       FicusBonsai_1_Material_normal.png
    9.       ...
    10.  
    Unity is not able to deduce the texture-mesh bindings.
    Sketchfab also provides .gltf versions but sadly Unity does not support .gltf either..
    The only option is to create materials and assign textures manually.

    I think it would be worthwhile to streamline the process of importing assets from popular websites such as sketchfab.
    It's a bit disappointing to have to endure so much friction for such a simple and common task.
     
    travlake likes this.
  6. sael-you

    sael-you

    Joined:
    Dec 5, 2020
    Posts:
    6
    You are The Best ! thank you !!
     
  7. Hacktivist2007

    Hacktivist2007

    Joined:
    Dec 29, 2021
    Posts:
    25
    In blender, you can go into file/external data/unpack. This helped me.
     
    radiantboy likes this.
  8. George-Ing

    George-Ing

    Unity Technologies

    Joined:
    Jan 14, 2020
    Posts:
    68
    Judging by that hierarchy, that actually sounds like it may be a bug. If you could file it with the Unity bug reporter (https://unity3d.com/unity/qa/bug-reporting), we'd be more than happy to look at that/any other assets you've had similar trouble with.

    Importers can be a tough one to crack because of the variety of DCCs that generate content, and the variety of FBX SDK/Model Importer versions.

    I & the other engineers on the importer team really appreciate the reports when an asset doesn't work so that we can do our best to fill the gaps.
     
  9. CarlAlex

    CarlAlex

    Joined:
    Jan 18, 2017
    Posts:
    1
    This worked for me also. For reference I had a model of a terrain in Blender created by Meshroom. Path to Copy and "Embed Textures" button on. In Unity I was then allowed to "Extract Textures" which previously was greyed out.
     
  10. LimitlessChicken

    LimitlessChicken

    Joined:
    Apr 17, 2022
    Posts:
    1
    You are my hero man. I cant tell you how long ive tried to fix this but this worked!!
     
  11. DylanChillin21

    DylanChillin21

    Joined:
    Apr 12, 2022
    Posts:
    5
    everything works when i do that but when i extract textures it gives me this error
    EndLayoutGroup: BeginLayoutGroup must be called first.
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)
     
  12. awais144506

    awais144506

    Joined:
    May 2, 2020
    Posts:
    2
    Make sure you have not imported the sun light from blender. or any kind a light from blender
     
  13. awais144506

    awais144506

    Joined:
    May 2, 2020
    Posts:
    2


    Make sure you have not imported the sun light from blender... or any kind a light
     
  14. Sfunk1992

    Sfunk1992

    Joined:
    Jun 5, 2020
    Posts:
    10
    I was running into this issue and the solution that most people stumble upon of setting the Path mode > Copy and selecting the icon next to it to embed the textures seems to only be half the solution.

    I believe the full solution is that when you create a texture in Blender, if you do not save the image into a location, then blender does not have the ability to embed that texture. I even attempted to use the "Fake user" option Blender gives, but that had no success.

    Once I saved my textures into a folder anywhere on my system, then utilized the Copy/embed settings for the FBX, the issue seemed to be resolved.
    I then copy this FBX into my unity project folder, then the option to extract the texture works.

    I hope this helps out.
    upload_2022-6-8_20-13-5.png
    upload_2022-6-8_20-13-57.png
    upload_2022-6-8_20-9-49.png
     
  15. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    770
    One troubling development I've seen when upgrading projects from Unity 2020 to 2021 is that it doesn't just not import textures - it deletes existing textures from the model.fbm folders they were originally imported into. This doesn't happen on everything, but often half or more FBX models have no textures at all after upgrading. This can usually be solved - if you have a backup - by simply copying them back and restarting Unity. It doesn't seem to be a problem with the import settings themselves, since they usually import fine the second time around. More likely, the Unity updater is hanging on something, and then not processing any further texture imports afterwards. It's still a bit disconcerting that it tosses out textures that are already in the project. So pro tip: always backup everything before upgrading. :rolleyes:
     
    radiantboy likes this.
  16. SuspecM

    SuspecM

    Joined:
    Jul 27, 2021
    Posts:
    23
    Hey boyos. It took me a *LONG* while to figure it out because none of the solutions from here worked. This might heelp someone with my problem tough so I'll write this here. For me, in blender when texture painting, setting the mode to Single Image as seen in the below image solved my import problems. I basically just make the texture in the Material mode, save the image, then set it to Sinlge Image and set the image I just saved as the source.
    upload_2022-8-2_21-0-52.png
     
  17. GustavoChico

    GustavoChico

    Joined:
    Nov 20, 2021
    Posts:
    1
    Hey!
    In my case the problem was blender saved embedded the textures as .fbm instead of .png/.jpg etc, solution was:
    1. Save each texture in a proper format
    2. Pack into the .blend and export as .fbx with "copy" path and the little button next to it active (embed textures)
    3. Import into Unity and change inside the materials tab "location" into "use external materials".
    It even works with normals!
     
  18. andrewescott

    andrewescott

    Joined:
    Jan 1, 2022
    Posts:
    1
    I have been spending a lot of time today trying to work this out, and I seem to now have a repeatable way to do it. This works with Blender v3.2.1 and Unity 2020.3.39f1 at least.
    1. In Blender, assuming your model is loaded and is the only thing in the scene, select the Texture Paint on the top menu bar to enter the Texture Paint workspace
    2. Change the “Paint” mode to the “View” mode in the menu in the top left of the Texture Paint workspace screen
    3. Use the texture drop-down in the menu bar at the top to select each Image_0, Image_1, texture etc. in turn. For each texture, select the Image > Save As menu option to save as individual images in a specific folder (lets call it assets). Some of the textures could be JPG files while others are PNG files. Don’t worry about that. Just make sure you save all the Images, but you can ignore “Viewer Node” or “Render Result”.
    4. Now select File > Export > FBX (.fbx) and before you save, change the “Path Mode” to “Copy” and click on the button next to it to “Embed Textures”. Then click the “Export FBX” button to save it into the assets folder as well.
    5. Leave Blender, and open up Unity Hub.
    6. Create a New Project using the 3D Core template.
    7. When it's ready, create a new folder in the Assets window called Materials. Open the Materials folder, then drag all the texture files from the assets folder over into it.
    8. Go back out of the Materials folder to the top level of Assets, and drag the FBX file that you exported from Blender into the same Assets window. The model will appear there after a little while.
    9. If at some point you get an error message like “A Material is using the texture as a normal map”, just click “Fix now”.
    10. Click on the model, then in the Inspector window, click on Materials. Choose Material Creation Mode to be “Standard (Legacy)”, choose Location to be “Use External Materials (Legacy)”, and leave the other options at their defaults (Naming as “By Base Texture Name” and Search as “Recursive-Up”). Click Apply.
    Good luck.
     
  19. UndeadEmilia

    UndeadEmilia

    Joined:
    Jan 8, 2023
    Posts:
    1
    i on the other hand cant even press the Extract Textures button some how so my model stays in the gray texture
     
  20. FargleBargle

    FargleBargle

    Joined:
    Oct 15, 2011
    Posts:
    770
    There seem to be a few different issues here. Some of you are having trouble getting Blender to embed textures into FBX exports. Others, like me, may have perfectly good FBX files, with textures already embedded, that used to work, but don't now. Unity's FBX importer has changed, and no longer does some things the same way it used to. My current workflow when bringing new FBX models with embedded textures into Unity is as follows:
    1. Import each new model into its own folder
    2. In the Materials section, choose the Import via MaterialDescription and Use Embedded Materials options
    3. Extract Textures and Materials into the model's folder to keep them all together (If you share textures and materials between models, you may want to use a common Textures and Materials folder instead to avoid duplicates, but may need to manually reassign materials if Unity doesn't figure out that they're already present)
    This works when importing models created with 3ds Max at least. If you use different 3d modelling software, or FBX models downloaded from somewhere else, your mileage may vary.

    Note: This only works if the textures are properly embedded in the FBX file to start with. Also, if you make changes to the model that add new textures, you'll need to delete and re-import them, since the importer doesn't seem to know how to add new textures only, and will duplicate any existing textures and materials if you try to re-extract them.
     
  21. j_rauha

    j_rauha

    Joined:
    Jan 5, 2022
    Posts:
    1
    Workaround to import and display embedded textures from FBX in Unity 2018.4.3f1


    Well, I do not know id I am on time for this, but maybe this solutions works for someone using 2018.

    In our company the latest version of Unity that we can use for different reasons is 2018.4.3.

    I have been struggling a lot with this issue to get to the conclusion it was some Unity 2018 specific bug, as any FBX with embedded textures was correctly loaded with textures in Unity 4.3.1.

    What I did to solve the problem: Instead of copy the FBX to the Assets folder (so it imports automatically, etc.), I copied it together with the meta file from Unity 4.3.1. This kind of "refresh" something in 2018 which will write its own meta file, so no issues there, and the FBX is loaded with the materials having their maps ;)

    In order to find some more "generic" solution for every FBX I had to import in 2012 version, I was fiddling around with the 4.3.1 meta file removing lines until I just learnt that we only need a line with any word, but MOST IMPORTANT, finishing the word with a colon :)), like it is a property, otherwise it does not work.

    So I have this plain text file that I just have to rename to <filename>.fbx.meta with the following content (one line only):

    empty:

    I copy the FBX file together with this plain text file and everything works nicely. The model is imported, the materials are imported, and in the same folder of the model, the folder <filename>.fbm is created with the textures. (At least tested and working for the Albedo map).
     
  22. PumpkinPie21

    PumpkinPie21

    Joined:
    Jul 15, 2023
    Posts:
    3