Search Unity

Issues with GI, realtime GI and possible PBR normal maps

Discussion in 'Global Illumination' started by madsny, Feb 15, 2017.

  1. madsny

    madsny

    Joined:
    Dec 11, 2015
    Posts:
    6
    hi.

    unity version: 5.5.0f3 personal

    BACKGROUND:
    I have embark on the journey of creating a Overwatch inspired scene in Unity, im currently in a learning mode using Blender, Sculptris and Unity (perhaps substance painter over time).
    status at the moment, created low-poly from high poly assets, baked normals, height and AO's and stuck with making it all look good in Unity :)

    PROBLEM:
    I have been testing, tinkered and read up on GI and PBR for weeks now, but i always ran into problems when it comes to lighting my scene in unity, for this post i made an isolated example, im trying to achieve a gloss free hardsurface desert like scene (before post effects), using baked and realtime lights, including in my scene i have a basic Light probe setup and only uses the standard metal shader in unity.

    Things are rendering horrible wrong and i can't seem to figure out what is going on, metal and smoothness of my shader is set to zero, but my objects are still very 'reflective' with odd shadowing (unless i lover the normal to 0.x, but then you won't notice the bump's), at times the stone blocks looks more like gold than chalk-like-stones.

    i've been testing with professional materials and textures with the same results, i have read up on the issues with mixed lightning modes as well as UV1,2,3 mapping etc., but im still stuck with a very poor result, im fairly new in unity, my biggest problem right now, is figuring out what questions i should be asking and in what order. :)

    i hope you guys could help me out and guide me in the right direction.


    gi_issues_v1.png

    //Mads
    ps. i have attached a photo of my scene and the different light settings.
     
  2. madsny

    madsny

    Joined:
    Dec 11, 2015
    Posts:
    6
    PS. my current goal is to recreate this youTube example in unity, i love the style and it's very close to Blizzards Overwatch style.
     
  3. madsny

    madsny

    Joined:
    Dec 11, 2015
    Posts:
    6
    My current solution, went with Substance painter but im trying to have blender generating the same result as substance painter, thou it's constantly seems that, blender is overpowering the green channel a bit, im trying to figure out why and how at the blenderartist forum.

    current workflow for blender normal maps.
    first of, in blender i set the models shading to smooth, you can do it in unity, but it's cleaner this way, in Unity, i make sure the imported model have it's normal tangents set to "calculated tangens space", also ticked on the "generate lightmap UV" (since im using GI in my scene)

    when i bake my normal map in blender i created a new image without Alpha and 32 bit float
    in the bake settings under render, i set the normal space to tangent, tinkered with the distance and bias (0.0 and 0.2) and finally set the split to "fixed alternate", by setting the split i come closer to baked same result from Substance painter.

    from blender i save my file as s png, RGB 8 bit, no alpha.

    i Unity, made a lot of settings to the scene, including, color space from gamme to linear, HDR on for the camera, and a few other details i can't remember.

    conclusion, i still have issues with normal maps baked in Blender (see attached image), so i'll properly be using Substance painter in the future, i did try to get xNormals and Handplane baking running on Mac via Wineskin, but with no result (Handplane started, but would not load meshes??)...

    hope that would help if anyone encounters the same Blender baking issues as i have :). enjoy.
     

    Attached Files:

  4. Dhialub

    Dhialub

    Joined:
    Nov 11, 2013
    Posts:
    41
    I think the difference between Blender and Painter normal maps lies in the different smoothing.
    The shiny look in the first post is definitely caused by incorrect normals and/or normal maps.

    Maybe the limited precision of tagent space normals is the problem. I suggest beveling the edges and weighting the normals for a very clean look with almost no overhead compared to hard edges.

    Here's a free Blender plugin for weighting normals:
    https://blenderartists.org/forum/showthread.php?372785-Addon-Weighted-Normals-Calculator
     
  5. madsny

    madsny

    Joined:
    Dec 11, 2015
    Posts:
    6
    Thanks for the reply Chanhy, i've never heard about 'weighted normals' so this is pretty exiting information, i googled it and found this video for Maya, is it the same thing we are talking about ?

    Video link:


    it surely seems to solve some pretty bad issues i have with smooth shading, it's a tough one to get hang on, seems that Maya and 3DsMax have a better focus on this than blender. despite using Substance Painter and being carefull with my seams, using bevels etc. i've found that, if im not using smooth (ex. letting unity calculate the normals incl. tangent space), the effect of the normal map is very little and it looks ugly as hell, so im assuming when using normals you must have smoothing on, is this correct ?..

    here's a screen of the latest test im doing.

    GI_render_rests1.jpg

    the ground consist of blocks (instead of a tiled texture), thought modulare building blocks would be cool, but again i get this odd smoothness effect, with a gradient from the back fading out towards the front (or the light source i recon).

    same issue on the door way ornament, thou the normal is tottaly broken at this point, have to re-bake with a cage, but again, would the weighted normals help in getting rid of these drak gradient artefacts, without loosing the details from the normalmaps. ?

    another interesting point form the video is, the amount of vertices in a model, and with the technique he is using, you can have a bevel on a box but still be within the 24 vertices (if i understand correct, a flat shading cost 3 vertices pr. corner. 8 polys*3=24), meaning it's absolutely okay and not that costly. is that correct assumed ?.

    thanks again for your reply, i'll definitely to test the plugin when i come home.

    //Mads
     
  6. madsny

    madsny

    Joined:
    Dec 11, 2015
    Posts:
    6
    so i made a quick test to see if there were any quality to gain from using Weight normals or not, the short answer is, yes, but in my test not without bevel.

    the objects was made in Blender, the Weight normals was created with blender, the high poly for the normal map was sculpted with Sculptris and finally the normal map was baked using substance painter. (all weight and bevels was added before baking).

    in this test, im using realtime GI + light probs, the result was even better for static objects, and again you'll get an even better result with baked light, but until unity fixes the mixed light issues, realtime+static is the quickest fix.

    in my experiment i found, there wasn't that great a difference between smooth and flat shading (while using bevels), bevels makes a huge difference, which comes as no real surprise, but im still surprised to see that just by adding a bevel most of the glossiness disappeared (no weight normals, with normal maps), without normal maps we still get the unwanted glossiness.

    i my test, bevel and weight normals really helps shading the surfaces correctly, there's still some unwanted glossiness from the normal maps, but for my purpose i can live with it.

    weight_normals_test1.jpg

    i haven't tested blenders weight normal trick on more complex models or round surfaces, that's up next, also, seams are actually more visible using weight normals, in my test i used smart unwrap, which makes a horrible job, but wanted to see the effect, so if anyone got any cool tricks on how to smoothen out the seams, please share :).
     
  7. kemalakay

    kemalakay

    Unity Technologies

    Joined:
    Jul 12, 2016
    Posts:
    224
    Hey @madsny

    I recommend you to check Unity 5.6, we have introduced three new mixed light modes for Enlighten (baked indirect, distance shadowmask and shadowmask respectively). I can tell you that Overwatch uses shadowmask feature as well so most likely, that's what you are looking for. 5.6 offers more robust workflow for authoring your lighting on lightmap static/dynamic objects. I hope this helps.

    Thanks,
    QA Team
     
    Last edited: Mar 15, 2017
  8. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    This looks reminiscent to my character test in ue4, and turns out I needed to rebake my normals with ue4 in mind as opposed to unity. What are you using to bake your normals with? Many engines seem to have subtle variations on how they render normalmaps. I would give handplanebaker a try for baking, make sure to set unity in the tangent space settings. handplane3d.com
     
  9. madsny

    madsny

    Joined:
    Dec 11, 2015
    Posts:
    6
    sorry for the long responstime, i have put 3D on the shelf for a while, got to focus on other things for a while.
    i will definitely test 5.6 when i have time.

    about baking, i tested both with Substance painter and Blender's internal baking system, towards the end i primarily used substance for baking, but the results are very close, now my trial version of substance is sadly over so i'll have to find other ways hehe.

    Handplane looks very interesting, but currently no Mac version, thou i did try to make a WineHQ version of it, but not with the greatest luck, when i have time i'll tinker a bit more to see if i can make it run properly.