Search Unity

Baking directional lightmaps with Blender Cycles

Discussion in 'Works In Progress - Archive' started by Skolstvo, Apr 13, 2016.

  1. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    Hello,

    We all know that Enlighten is utter dog S*** at baking static lightmaps.

    If you want lightmaps that look good, then your only options is to use an external rendered like Vray or Blender Cycles. The problem is that you can't bake directional lightmaps with Blender Cycles or Vray.

    So I took a stab at creating lights that attempt to do just that with Cycles. Here is my node setup:



    This node setup sends different colored rays depending on direction from light source.

    The only problem here is that Unity directional lightmaps appear to be bound to a 8-bit per channel texture with every colour representing one direction. I have not been able to clamp these values, and they often go above a brightness of 1.0. Also there is some crosstalk between light rays that can change the direction of the light. This can be mitigated by manipulating the bounce light levels.

    The potential benefits if someone has any idea on how to make this work, are a drastic reduction if light acne and pixel errors that are produced regardless of how many hours you bake with Enlighten.
     
  2. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Hey. Do you worked further on this?
     
  3. R0man

    R0man

    Joined:
    Jul 10, 2011
    Posts:
    90
    Last edited: Jul 9, 2019
    JamesArndt likes this.