Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Lightmap RGBM PNG at runtime

Discussion in 'Scripting' started by r3dwolf, Sep 26, 2018.

  1. r3dwolf

    r3dwolf

    Joined:
    Feb 16, 2012
    Posts:
    39
    Hello,
    I'm trying to use a lightmap texture starting from a png file loaded at runtime.
    The file is loaded correctly but the pixels are not interpreted as RGBM but as ARGB and therefore I do not get the desired result.
    How is it possible to force the RGBM "mode" for the texture, obviously at runtime?
     
  2. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    923
    Some more info:
    We are generating lightmap outside unity3D and we need to load them at runtime.
    Seems that we we check in unity inspector the "lightmap" checkbox for the thexture file unity define somewhere a special value that allow the texture to be readed using RGBM.

    Is there any way to import via script correctly an external lightmaps from a file?
     
unityunity