Search Unity

Can you import Unity 4 Lightmaps into Unity 5?

Discussion in 'Global Illumination' started by Deleted User, Jan 12, 2016.

  1. Deleted User

    Deleted User

    Guest

    Hello,

    I have a project that has lightmaps baked in Unity 4. It uses the same FBX assets and import settings for those FBX assets. The lightmaps work great in Unity 4.

    There are ways to use externally made lightmaps inside of Unity. You first have to supply the Lightmap system with the map textures themselves (as far as I can tell, this can only be done at runtime, but it works).

    Afterwards, you must then tell each object that uses lightmap textures where it is in the lightmap using a Vector4 offset variable.

    It turns out the Unity 4 project in question was already doing all this (for reasons unknown to me), but it worked. The lightmap values were being assigned at runtime, and the offset values were stored on scripts attached to relevant game objects.

    However, when I do this in Unity 5, the offset values seem to be completely off sometimes. Some parts of the geometry appear totally fine, while others are so far off that I they appear incomprehensible.

    If this is not supported, that's fine. I would just like to know if there is some technical reason that it is not working.

    Thank you,
     
  2. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    The main reason is that Unity 5 completely revamped lightmapping system for betterment of product ....In Unity 4 they were using Umbra, now they are using Enlightning technique
     
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,741
    Umbra is the Occlusion Culling tech. You meant Beast.

    To the OP, what do you mean here :

    What scripts? What happens? I'm not sure I understand.
     
    idurvesh likes this.
  4. Deleted User

    Deleted User

    Guest

    What I am talking about is, you can (through script) tell the lightmapping system to use a particular lightmap texture index and then offset values. When you do this, you achieve the coordinates of the lightmap that are relevant to your scene's geometry.

    I have accurate values taken from Unity 4 for every object in the scene. So, in Unity 4, those offset values result in accurate lightmap placement.

    However, in Unity 5, the offset values are not always correct. Sometimes they are, as in for some objects, but for others, they are so far off that manually trying to 'nudge' the offset values is useless.