Search Unity

What is happening here with the import normals

Discussion in 'General Graphics' started by tawdry, Feb 2, 2016.

  1. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    Hi
    So maybe my unity version is corrupt or something as i am having a lot of issues with the graphics here is the latest issue i have assuming it is a issue.
    I import a model from blender and it looks totally different in unity redid the model 4 times and always wrong untill i turned off the import normals and then it appears correct but don't i need the import normals for unity to use normal spec etc maps correct for the mesh?. Anyways heres 2 pics of what the difference in image is.The first is how it appears with import or calculate normals the 2nd is how it appears in blender and unity without imported normals what gives?

    normals.png nonormals.png
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    5,690
    Thats not normals, your UV/Materials are messed up. Are you using tex faces or materials in Blender? Click on those areas that are messed up and make sure they dont have a random texture/material assigned.
     
  3. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    uvoutlay.png here is how my uv map looks like in blender. I am using a single material .
     
  4. Fab4

    Fab4

    Joined:
    Sep 30, 2012
    Posts:
    114
    You have two UV Maps on your model. That can cause Problems when you set faces on different textures. Delete all except the one needed, and export again.

    You should btw add some edge padding to avoid seams in your textures.
     
  5. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    Well i deleted the one uvmap and made no diffrence. That extra uvmap was for projection painting onto the main so it should not be a factor. Back to square-1:(
     
  6. Fab4

    Fab4

    Joined:
    Sep 30, 2012
    Posts:
    114
    By taking a closer look to the mesh in Blender and Unity I could see, that you hid some polygons in Blender.
    Go to Edit Mode and press Alt+H. If nothing changes check your modifiers, maybe you have added a Mask-Modifyer
    Also try to remove doubles. Maybe there are also two Faces at the same position
     
    karl_jones likes this.
  7. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    Nope no double faces and i unhid and reexported same thing. I do notice even with no import norms on i can still apply a normal tex map and the sliders for the smooth/metalness do have an effect however the tex maps don't seem to matchup properly
     
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    5,690
    Can you share the model?
     
  9. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    DO you mean the blend file or the unity package. How would i share it?
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    5,690
    Both :)
    You should be able to upload it to the forum.
     
  11. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    Ok went back and tweeked a bunch of individual vertices got the models closer to each other but its that skintone that is making it unusable .If i ramp up ambient lighting to where the scene get washed out then the model looks better but that is not exactly a solution.Notice those very dark areas around the nose and side of face i don't have any shadows on.If there is a email i can send the blendfile to? don't really want to post a 3d model of a member of my family on a open forum this is after all the internet.. SKINTONE.png ambramp.png
     
  12. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    ps if i decide to go ahead and ignore normal importing how will it effect the model?.
     
  13. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    I decided to use a professional programme to create a 3d model and see what it does in case it is my poor 3d skills are to blame but see for yourself.The person on the left i recognise as the face i scanned in the person n the right i have no clue who that is anymore the import normal process has turned her into a completely other person.Seriously has noone else noticed this going on????? facegen.png
     
  14. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    Here is a model i did in unity 4.6 back when skin tone was what you intended it to be and there were none of these dark lines that turn the model into something else.
    oldmodel2.png oldmodel.png oldmodel.png
     
  15. Fab4

    Fab4

    Joined:
    Sep 30, 2012
    Posts:
    114
    i never had any problems with normal maps. Do you have possibly generated a normal map from grayscale?
    the normals that are generated in blender normally work perfectly in unity and look excactly as in blender. Maybe you must check your normals in blender in render mode
     
  16. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    I am not adding normal maps even yet this is just with albedo. Something is screwy with the import normal function has nothing to do with normal texture map.Could you show me a screenshot of a character you have made with import normals disabled and enabled side by side?Not sure if this is just something i am experiencing or others have the same issue. To be clear do not add a normal texture map just change the import settings regarding normals.
     
  17. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    5,690
    Have you tried a different shader such as legacy/diffuse
     
    Dantus likes this.
  18. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    Yep tried all the shaders double sided too all same result
     
  19. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    5,690
    What about the unlit shader?
     
  20. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    Just tried unlit it looks as it should but no slots for normal spec etc etc:( unlitshader.png
     
  21. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    5,690
    So the problem is that your texture already has lighting in it and you then want to apply further lighting which is going to look strange.
    You are using a hard surface shader to replicate skin, out of the box the model is going to look like it is made of a solid shiny material. You can try experimenting with the shader properties and using a normal map to create a better shading.
    Alternatively take a look at some of the skin shaders https://www.assetstore.unity3d.com/en/#!/search/page=1/sortby=relevance/query=skin
     
  22. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    Well i personally have never seen a good texture that was taken in pure darkness.But joking aside In unity 4 i had textures half in shadow and light and they did not have this issue. My example from 4.6 above was taken in much more light and had no issues. The example from facegen is a generated texture so would have no light yet it is effected in the same manner. The photo i used is evenly lit by natural outdoor lighting i can't see how it can be the cause _MG_3209web.jpg
     
  23. Fab4

    Fab4

    Joined:
    Sep 30, 2012
    Posts:
    114
    You cannot compare this to each other. Due to physically based rendering you need to use the albedo map which only represents the color of your mesh. It must be unlit because of the color and brightness of the light. If your texture is lit you add light to light as karl has mentioned. That is where it becomes awkward. Each Photo you take is lit of course, but the color you see is the color with the lightning and not the color of the object you took a photo from

    (edit)
    take a look at this
    https://www.allegorithmic.com/pbr-guide
     
  24. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    Except that legacy shader do the exact same thing i just downloaded some from 2012 they are definately not physically based. Plus there is no! colour without light colour doesn't even exist except in your head. Pbs is supposed to be realistic well you don't get more realistic than sunlight. How exactly would you take these magical photographs which do not show the colour of the lighting but the true colour of the object.
     
  25. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    5,690
    So your model in blender does not have light applied to it, if you were to add light and render you would find it looks the same. The normals are used to calculate the lighting on a surface, if you turn them off then it can not do this and so you get an unlit/incorrectly lit surface(just the texture color).
    The dark lines could be shadows so turning off receive shadows on the mesh may fix that.
    I suggest you read up on skin and skin shading as a lot of the problems you are having would be explained by it. Skin does not behave like a solid surface, light is absorbed and scattered. Normal shaders do not do this and reflect light like a solid surface causing things to be very shiny.
    http://http.developer.nvidia.com/GPUGems3/gpugems3_ch14.html

    You don't need to take a photo without lighting, you need the face to be lit evenly.
    1:1 ratio http://digital-photography-school.com/lighting-ratios-to-make-or-break-your-portrait/
     
    Last edited: Feb 4, 2016
  26. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    11,156
    Albedo vs Diffuse


    For proper rendering you really need an albedo map. The way you get them is by having access to multi-million dollar camera setups, or by painting them, like this:


    Albedo isn't really an image with no lighting, it's an image with perfectly even lighting. This obviously doesn't really exist in nature, but very expensive systems they use for movies can get pretty close, like this one:


    Or by carefully photographing your subject with a lot of diffuse bounced light like the second link @karl.jones posted.

    And this only gets you part of the way for rendering skin as much of the quality of skin comes from subsurface scattering, or how light enters the skin, diffuses through the layers of flesh and blood, and comes back out giving a softer quality than something like plastic or especially metal.

    The short answer is skin is complicated.
     
    Fab4 and karl_jones like this.
  27. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    None of which would explain why the same effect is happening with legacy shaders maybe i need to download 4.6 and see what the model looks like in that if it looks right as i expect it will then i will readress this issue if it still looks wrong.....Fact is i hat i had to use flash close to the subjects face and they look a hell of a lot better than what this picture is producing

    PIC 1. I did this model quickly off a flash photograph in no way is this evenly lit and certainly no diffuse light was used yet the skin tones are very close.The reason these look mostly alike it because it is already harshly lit by the flash so that face unity is adding what looks like a harsh AO effect on normal importing is mostly countered.

    pic1.png

    Pic 2
    This picture is very evenly lit apart from some shadow at the sockets and a dab under the nose what picture are you looking at?
    pic2.png
     

    Attached Files:

    • pic1.png
      pic1.png
      File size:
      971.7 KB
      Views:
      998
  28. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    5,690
    In 4 did you have a light in the scene and did you use shadows?
     
  29. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    Not sure what you mean by 4 but none of the images i posted had any shadow on the directional light.And yes there was a directional light in all scenes directly in front and at a 30 degree angle.Dierct light at 1 and ambient light at .4
     
  30. Fab4

    Fab4

    Joined:
    Sep 30, 2012
    Posts:
    114
    I really don't get your point.
    You use two different textures with one workflow. One works the other not.
    The only valid conclusion is that there is something wrong with the not working texture.
     
  31. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,347
    My point is the image that should work better works worse than the one that does work if you read Karl's post . Another valid conclusion would be that unity has a issue with one of the two images an issue it should not have. Any way i redid the model again! this time using a new base mesh and it looks a lot better therefor both of these "valid" points are incorrect the issue was with the mesh itself or the way import normals is handling the mesh in unity 5 to be more exact. At least that is my take on the situation.Still not 100 percent exact but close enough for most purposes. latest.png
     
  32. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    5,690
    Sounds like your models smoothing was messed up. Import normals will import the normals as blender generates them.
    You re-did the mesh and this time the normals were correct. So whatever was wrong it sounds like something with the mesh in blender.
     
    OfficialHermie and Fab4 like this.
  33. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    576
    Is there a tutorial anywhere on how to create this painted map on the right side?
    I wasn't successful with my search.
    I guess an automatic tool isn't publically available yet, so I'm looking for a tutorial on how to paint it. It isn't really clear to me what the author did there except removing the scattering somehow. I would really like to know the invididual steps and his decisions.
     

    Attached Files:

unityunity