Search Unity

Eyes Spheres imported from blender dosn't show in Unity... they are invisibles...

Discussion in 'Editor & General Support' started by aronvirgo, Jan 3, 2021.

  1. aronvirgo

    aronvirgo

    Joined:
    Oct 30, 2016
    Posts:
    32
    Hi!!! Im sufering a lot this day... I imported a character with two mesh: The body and the eyes (the two eyes are one 3D object). When I imported the character in Unity the body is showed well in the editor screen, but the eyes are invisible. I can selecte it, I triyed change the material and the shader, the normals in blender editor and nothing work. The eyes hace a white material, and it works fine with another parts of the body mesh. I think it is a kind of glitch or importing issue... but only happens with this 3d object, the eyes, and I tried merge it with the body mesh, but the issue still happening.... :( When I move the camera across the head, sometime i can see the eyes when thesse "touch" the sckybox, but not when touch the mesh... I z-Buffer issue maybe??? please... I beg you... help T_T....
     

    Attached Files:

    • 1.png
      1.png
      File size:
      68.1 KB
      Views:
      367
    • 2.png
      2.png
      File size:
      381.7 KB
      Views:
      363
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    If you are iterating in Blender and you import it once, then make changes adding /removing items, it's always best to reimport it afresh in Unity to avoid confusing Unity's bookkeeping. Unity tracks each object in Blender and maps it to a known object on import with known meshes and materials, and when you change these around the numbering can get messed up. Try just duplicating the character model file and see if the import is okay.

    Same goes if you make a prefab out of it, then change the underlying blender file internals (naming, hierachy). The prefab will be messed up and need to be recreated.

    If it is still not right, look for the eye gameobject in your hierarchy, select it there, put the mouse cursor over the scene and press F to zoom in on that chunk. It's in there somewhere, so that will tell you if it is in the wrong place, is missing a mesh, missing a material, or has something else wrong.
     
  3. aronvirgo

    aronvirgo

    Joined:
    Oct 30, 2016
    Posts:
    32
    People, I fixed it. I am not going to close the post because I think that my solution did not solve the issue at all. I change the shader of the eyes material. I used a custom one which I got from GitHub, It is a "two side" shader, so, with this one, I can render the two side of a 3D flat face. This solved the problem but the issue with the standar shader which is provided by Unity, sadly remains. I modeled 3 times the eyes and asigned the material much times more than that and the issue remains, with that standar shader. Maybe, is a Blender issue when I export to Unity... but is to strange thar it happens only with the eyes, which are just two UV espheres. Any idea people?
     
  4. aronvirgo

    aronvirgo

    Joined:
    Oct 30, 2016
    Posts:
    32
    I'm going to try that my friend, thanks.
     
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    You can enable "Backface Culling" in Blender so that you can see when you have reversed polygons inadvertently, so you know to flip them. Otherwise lighting will be incorrect in Unity.

    backface.png
     
    phsiaomg likes this.
  6. aronvirgo

    aronvirgo

    Joined:
    Oct 30, 2016
    Posts:
    32
    Dosn't Work dude :(. I triyed all
    I triyed all what you posted, sadly, nothing worked and the issue remains. I am starting to think it is a driver issue or something, becouse the trasparente parts of the eyes change their form depending of the camera angle of the editor. If target the side of the model, I can see the eyes, but not on front view, they are totally transparent, and when I choose the two side shader, the issue is fixed.
     
  7. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    I doubt that. Just hide the eyeballs, make fresh eyeballs out of spheres, stick them about in the right place, reimport it and put the default standard shader on it. Can you see them?

    If your original problematic eye polys are facing the wrong way, just flip them already... it's like 2 clicks in Blender. Don't make your dev life hell over the ordering of a handful of vertices!
     
  8. bobisgod234

    bobisgod234

    Joined:
    Nov 15, 2016
    Posts:
    1,042
    If a two sided shader works, your normals are probably just inverted.

    In Blender, select the mesh and try recalculating normals.
     
  9. aronvirgo

    aronvirgo

    Joined:
    Oct 30, 2016
    Posts:
    32
    Hi! I triyed that too :(. Today I figured out what is happening: The issue only happens when the eyes are separate 3D objects, in other words, a diferent meshs. So, I think what is the north what I must to aim. I am going to check about and them I am going to come back. Thanks for the help to every one at this time. :)
     
  10. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,745
    When Unity imports a blender object, it has to convert the coordinate system from right to left handed.

    As part of this it implies a default root rotation of (-90,0,0)

    For this reason, NEVER put geometry in your root object in Blender. Always put an Empty there and parent all your other stuff to it.

    Screen Shot 2021-01-10 at 12.41.28 PM.png

    That way any
    .localRotation
    you apply to any object will be consistent.

    Also, it's best to delete the camera and light that Blender starts from.
     
  11. Lukey695

    Lukey695

    Joined:
    Jan 6, 2021
    Posts:
    2
    This worked for me thanks i spent ages trying to reimport and even remade the eyes again but as soon as i read this thread i recalculated normals in blender ,exported and imported into unity, changed my main eye material to transparent and problem solved
     
    Kurt-Dekker likes this.