Search Unity

[RELEASED] SkyCube - HDR Panorama Converting / Rendering Tools & Shader Library

Discussion in 'Assets and Asset Store' started by Atom li liu, Oct 16, 2014.

  1. Atom li liu

    Atom li liu

    Joined:
    May 9, 2013
    Posts:
    26


    SkyCube is a tool kit & shader library for generating HDR panorama images (skybox or cubemap) from your scene or imported HDR file and encode them to RGBM. It also provides a full custom shaders library pacakge which gives you a solution to decode RGBM to HDR in Unity.

    In this tool you can also filter your HDR panorama map to make diffuse convolution or blur reflection, converting, and export panorama file into various format HDR skymap or cubemaps.
    From version 3.0 with new feature "Fast Sample" to let you generate blur reflection in high sample just a second. And support to generate pre-baked Specular Chain in Mipmap base on your glossiness setting.

    It supports popular panorama array formats as below:
    1. Horizontal Cross
    2. Vertical Cross
    3. NVidia DDS
    4. XSI Strip
    5. Spherical Map
    6. Light Probe Map
    7. Split Cube Face
    Since the version 3.5, it includes Skycube RT which a new tool for in-game real-time HDR/LDR image base rendering solution. It renders cubemap with specular chain in real-time and cost less than standard cubemap rendering. It is a perfect solution for the case when you want use the same environment map for different glossiness objects/materials.


    LINKS

    FEATURES LIST

    Unity5 Compatible
    • Realtime Mipmap specular chain sample
    • Realtime HDR/LDR Reflection Rendering
    • Realtime Roughness HDR/LDR Reflection
    • Fast Sample for high quality blur reflection
    • Baking Specular Glossiness Chain in Mipmap
    • Support to import Radiance HDR(.hdr) file as a source of HDR Map
    • Render-to-cubemap tools
    • High Dynamic Range (HDR) rendering
    • Linear and Gamma Space rendering support
    • Panorama convolution tools
    • RGBM encoded textures (32bit bitmap HDR)
    • Rendering as Skymap or Cubemap
    • Export to various panoramas format: Unity Cubemap, Split Cube Face, Horizontal Cross, Vertical Cross, NVidia DDS, XSI Strip, Spherical Map, Light Probe Map
    • Preview before export
    • Export channel selection
    • Export format: PNG32bit and TGA32bit

    VER3.5 RELEASE NOTE
    • New Feature: Add new tool Skycube RT: Real-time IBL HDR Cubemap Rendering Tools
    • Bug Fixed: Remove UnityEditor from DLL in build.
    • Bug Fixed: Clean useless variables from script..

    VER3.0 RELEASE NOTE
    • New Feature: Unity5 Compatible
    • New Feature: Fast Sample to generate blur reflection in high sample just a second.
    • New Feature: Baking Specular Glossiness Chain in Mipmap.
    • Bug Fixed: Fixed HDR maximum range update issue in both mode.

    VER2.5 RELEASE NOTE
    • New Feature: Fast diffuse convolution by Spherical Harmonics.
    • New Feature: Export HDR as LDR with customized exposure and gamma.
    • Bug Fixed: Fixed encode HDR maximum range update issue in Import HDR file mode.
    • Bug Fixed: Fixed Gamma correction display in Unity 4.x.

    VER2.0 RELEASE NOTE
    • New Feature: New way to import HDR map by import Radiance HDR(.hdr) file as a HDR source.
    • New Feature: Support import various panoramas format: Horizontal Cross, Vertical Cross, NVidia DDS, XSI Strip, Spherical Map, Light Probe Map.
    • New Feature: Auto detective the type of imported panoramas map.
    • New Feature: Customize how big HDR range you want to convert to RGBM HDR map from imported Radiance HDR file.
    • Bug Fixed: Fixed the issue of Corrupted Unity Cubemap asset if you didn’t export cubemap before you closed the tool.
    • Bug Fixed: Fixed cubemap sample seam issue when used Linear filter to do the diffuse convolution in low quality
    • Bug Fixed: Fixed RGBM Sky shader bugs.
     
    Last edited: Jun 6, 2015
  2. Atom li liu

    Atom li liu

    Joined:
    May 9, 2013
    Posts:
    26
    Added a tutorial:
     
  3. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    @Atom li liu
    I have a particular setup that I was wondering if it was possible to accomplish with your plugin. I've setup a scene with a HDRI as a cubemap skybox. I use a real-world camera setup (Kinect) that streams live images as textures into Unity as Texture2Ds.

    I was wondering is it possible to use your tool to convert the Texture2Ds into HDRI's at runtime and assign them to my skybox? I was hoping to achieve this, so that the skybox would match the real-world image that is incoming from the camera.
     
  4. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Has anyone used this plugin?
     
  5. Atom li liu

    Atom li liu

    Joined:
    May 9, 2013
    Posts:
    26
    Hi, thanks for interested in it. To answer your question, please tell me which texture format you use in your case.
     
  6. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    @Atom li liu I use the Kinect which reads the live images in to a Texture2D as TextureFormat.RGBA32.
     
  7. Atom li liu

    Atom li liu

    Joined:
    May 9, 2013
    Posts:
    26
    Ok, if Kinect give you image as TextureFormat.RGBA32, it means the texture is LDR 8bit image which no HDR information. It doesn't make sense to convert it to HDR RGBM. If you can let Kinect reads live images as TextureFormat.RGBAHalf or TextureFormat.RGBAFloat that contain bigger range details, you can use SC_EncodeRGBM.shader and SC_DecodeRGBM.shader to encode and decode it in HDR RGBM.
    In your case as I understood, what you want is a way to convert wide angle image which Kinect captured to a ambient map to lighting the object. Unfortunately Skycube is not a real-time tool for this case, and I believe you need to find a way to generate 360 degree ambient map from wide angle camera, even if you fake some parts.
    Thanks,
     
  8. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Ok. Thanks for the info. That sounds correct. Do you know of any libraries that can do this in real-time? Or is that unheard of for Unity?
     
  9. Atom li liu

    Atom li liu

    Joined:
    May 9, 2013
    Posts:
    26
    Sorry, I never heard anything like this in Unity, maybe you can find something after searching. I know there are some in-house tools can do this kind of job in film industry, they use them to re-build ambient lighting base on camera motion pictures for CGI composite. It looks like screen space reflection, maybe you can start research from there and you also can search ILM paper for more info.
     
  10. NorthernVisionStudio

    NorthernVisionStudio

    Joined:
    Oct 18, 2013
    Posts:
    60
    I would like to know if I can import an HDR with the runtime rather than the editor. My app allows users to upload their HDRs directly to it.
     
  11. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    116
    Hi there,
    Your plugin looks awesome!
    however I am very new to unity and I have a couple noob questions.
    I am wondering how this plugin works with other frameworks such as the unity standard shader, Alloy or lux?

    Thank you for your time
    --Joshua
     
  12. Atom li liu

    Atom li liu

    Joined:
    May 9, 2013
    Posts:
    26
    I remember I answered you by mail, but I still would like to answer it again here to help people who has similar question.
    If you want import HDR and encode it as RGBM in runtime you need check SkyCube https://atomsdev.wordpress.com/tools/unity3d/skycube/ not Skycube: RT.
    In SkyCube, yes you can import HDRE file in run time. Just use SC dll in top of your script like below:
    using SC;
    And then call read functions which inside SC_RGBE static Class like this:
    Code (CSharp):
    1. if(path != "") {
    2.     if (SC_RGBE.RGBE_ReadHeader(path) == -1)
    3.         return false;
    4.     else {
    5.        if (SC_RGBE.RGBE_Read(path) != -1) {
    6.           int width = SC_RGBE.sHeaderInfo.width;
    7.           int height = SC_RGBE.sHeaderInfo.height);
    8.           Import2RGBM();
    9.        }
    10.     }
    11. }
    You can check Import2RGBM() function to see how it convert RGBE to RGBM in SC_UI.cs file in SkyCube tool folder.
    I will add this info in next update.
    After test Skycube's RGBM is compatible with Unity5 RGBM, what you need just setup texture's properties as RGBM.
     
  13. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey there... i just purchased this asset and I am must say I am very impressed... however there is this strange ring on the UP axis of my cubemap... I created a sky texture using Vue and it looks REALLY good... but the only thing now is this nasty white ring...

    Black Ops 2016-06-24 10-53-51-435.png

    And the source image is a Lat-Long map exported from Vue... is there a way to fix this? This is from a 6 sided cube... thanks

    EDIT: I created a cubemap and used that and it worked perfectly... and I will have to tweak your cubemap shader to allow rotation of the cubemap...
     
    Last edited: Jun 24, 2016
  14. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Just so you know, when you use Unity reflection probes, you have to set the exposure to 8 to see the sky in the reflection probes. However the sky gets completely blown out and I am forced to bake two cubemaps, one with the default sky (Exposure 0 and HDR Range at Max) and another with the exposure cranked up. So it would be nice to get this fixed so I can use regular light probes...

    EDIT: Or, just use the HDR map AS IS so I don't have to fiddle with it. It is already at full HDR range, but the Unity reflection probes renders them underexposed...
     
  15. arumiat

    arumiat

    Joined:
    Apr 26, 2014
    Posts:
    321
    Hi @Atom li liu,

    Do you expect that this might work with Unity 5 / Unity 2017?
     
  16. PMJenks

    PMJenks

    Joined:
    Jan 20, 2020
    Posts:
    8
    Hi

    I'm looking for a toolkit that I can use to load a HDR file into the Skybox at runtime. The demo shows it working in the inspector, but at runtime is it able to load an HDR file that hasn't been imported into Unity yet? For example could I load a file from disk?