Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Baking lighting on a race track made in Blender

Discussion in 'Global Illumination' started by andracer108, Jan 28, 2018.

  1. andracer108

    andracer108

    Joined:
    Dec 12, 2016
    Posts:
    35
    Hello everyone!

    I am currently quite confused on how to generate / manually create a lightmap for an arrayed and curved (Blender modifiers) 3D model in Unity (3D model in question is a race track). I searched tutorials on the Internet and followed the exact same steps both for automatically generating a lightmap for a 3D model in Unity and manually creating one in Blender and using it as a "secondary" UV Map. However, both methods have led my 3D model to have these hideous shadows and shading shown in the screenshot. If you looked at the screenshot, you can see that my race track has a lot of banks, elevations and twists.

    What I would like to know is, in my scenario, what can I do to try and fix this weird baking issue? Also, is there anyone who has experienced the same and has some tips?

    P.S. Some more info on my situation:
    • Current model has no UV Maps (tried with a UV Map as well)
    • Generate Lightmap UVs is ticked (tried with manual creation as well)
    • Progressive lightmapper was used
    • Scale factor for model is currently 250
    • The only static objects in the scene are the directional light and the the visible track parts
    • The baking issue appears on multiple other parts of the track as well
    • In Blender, 5 objects in total were used, 2 were the hexagonal guardrails, 2 were the top side and bottom side of the road and the curve itself which is a NurbsPath
    • Then, the array and curve modifiers were applied accordingly to the road and guardrail parts to follow the curve
    • Current indirect lighting resolution is 0.01 to speed up process, but even with a normal indirect lighting resolution, the problem persists
    If this info, is not enough, I'll gladly clarify more. Thanks for the help! :)

     
    Last edited: Jan 28, 2018
  2. andracer108

    andracer108

    Joined:
    Dec 12, 2016
    Posts:
    35
    After some experimenting, I've noticed that I forgot a crucial step when making my model. After applying the array and curve modifiers, I had to use "Remove Doubles" from my mesh which caused most of the errors in the lightmap. After this, I tried re-doing the steps and also used a larger lightmap and the results definitely improved. Still need to improve further though. I would also appreciate some tips, if any.
     
  3. andracer108

    andracer108

    Joined:
    Dec 12, 2016
    Posts:
    35
    Further updates for whoever is interested... I removed the guardrails and the track looks quite good when baked. I guess you need to be careful when making your models as overlapping objects can mess it up.