Search Unity

blender 2.8 exports fbx to unity 2018.3. Rendering mode of Material is "Transparent". Color problem

Discussion in 'Asset Importing & Exporting' started by twilightZone, Jan 2, 2019.

  1. twilightZone

    twilightZone

    Joined:
    Oct 10, 2014
    Posts:
    30
    Hello all,
    With blender 2.8 beta
    Create a new project (File > new > general)

    Select the default grey cube on the scene and export it in fbx (File > export > FBX(.fbx))
    Export FBX > Selected Objects

    save it in directory "Assets" of a new unity project
    In unity 3D, the cube is well exported but the rendering mode in unity 3D of the material shader is Transparent !!!

    Return in blender 3D and change the Base Color of the material that is white grey (R:0.8 G:0.8 B:0.8 A:1) to yellow (R:1 G:1 B:0.0 A:1)
    repeat export and replace the new file in directory "Assets".

    In unity 3D, the new cube is well exported but the rendering mode of the material shader is now "Opaque".

    It is not a problem of geometry but a problem of color.
    Have you a solution ??
    Thanks a lot
    Patrick Capture3.PNG Capture4.PNG Capture2.PNG Capture1.PNG
     
    tararankoth likes this.
  2. adamtdoyle

    adamtdoyle

    Joined:
    Jan 5, 2019
    Posts:
    1
    I'm experiencing the same issue. Additionally, I can import into Unity if I export to FBS from within Blender, but if I attempt to load the newer (Blender Version 2.8 Beta) .blend file, Unity gives me the following error: "Blender could not convert the .blend file to FBX file.

    (note: I know that 2.8 is currently in beta and thus unsupported, but since the purpose of releasing beta version is for generating bug reports like this one, I thought it'd be useful to document the issue)
     
    tararankoth likes this.
  3. BlackDragonBE

    BlackDragonBE

    Joined:
    Jul 23, 2012
    Posts:
    12
    Same problem here, I think it's a bug in the Blender 2.8 FBX exporter. If you set the material's color in Blender to pure white (1,1,1,1) and then export to FBX, the material in Unity becomes opaque as the alpha is read correctly as 1.
    A task for this bug has been opened.

    For now, override (remap) the material in Unity with your own as a workaround or go back to using Blender 2.79 until the bug gets fixed.
     
    tararankoth likes this.
  4. tararankoth

    tararankoth

    Joined:
    Aug 8, 2018
    Posts:
    1
    Hello, world!
    HOW TO FIX FBX MATERIAL TRANSPARENCY PROBLEM [in my way]

    1. Go to the asset folder and select FBX file which is you want to fix
    2. Then click "Inspector " tab and click/select Materials button
    3. Go to the "Extract Materials" and click ( please select your asset folder as an extract location)
    4. Open your extract folder and select material or your material (Inspector will open material editor), then go to the "Rendering mode" and change Transparent to Opaque which is selecting the drop-down list.

    More Reference (FBX Importing to Unity 2017/2018+ | Where did my textures go? by Holistic3d )
     
    ZerdounTheWise and mistour like this.
  5. Cirsia

    Cirsia

    Joined:
    Feb 18, 2019
    Posts:
    1
    That helped me so much! I'm pretty new to blender and thought I did something wrong in the export-preferences. The work-around of tararankoth worked pretty well for me. So thank you very much :)
     
  6. ozefordsa

    ozefordsa

    Joined:
    Mar 21, 2019
    Posts:
    1
    Simple Fix.

    Set color value to full


    Fixed
     
  7. Hypertectonic

    Hypertectonic

    Joined:
    Dec 16, 2016
    Posts:
    75
    I have this problem too. Unfortunately the simple fix is really tedious when you have a lot of materials, like in an architectural 3D scan. Unless there's a secret way I don't know to edit multiple materials in blender simultaneously?

    Probably going to find out another workflow, since the amount of materials is just excessive for practical Unity use, but it would be nice if this issue was fixed.
     
  8. Blenderik

    Blenderik

    Joined:
    May 14, 2013
    Posts:
    146
    Code (Boo):
    1. from bpy import data as D
    2.  
    3. for mat in D.materials:
    4.      nt = mat.node_tree
    5.      node = nt.nodes['Principled BSDF']
    6.      node.inputs['Base Color'].default_value = [1,1,1,1]
    Put that into the Text editor (you may have to exchange the spaces for tabs) and press run script.
    Careful: it will set the base color for each material in your .blend to white. If you want to keep your color, but up the brightness, you might need some color math.