Unity Community


Page 1 of 13 12311 ... LastLast
Results 1 to 20 of 242

  1. Location
    Minneapolis, MN
    Posts
    422

    Skyshop - Image-Based Lighting Tools

    I've been working on bringing Marmoset Toolbag shaders into Unity, and along with it, a suite of tools for processing HDR skies into IBL data.

    Introducing: Marmoset Skyshop!


    Skyshop takes sky images (panoramas, crosses, or cubemaps) as input and will generate diffuse and specular IBL cubemaps from them.

    Web-Player Demo: http://marmoset.co/skyshopdemo/

    Mipmapped Gloss-
    The specular cubemap also stores varying gloss levels in the different mip-map levels, allowing for blurry specular reflections and gloss-maps in the IBL shader.
    A custom cubemap importer saves and loads these mip levels from sub-assets of the cubemap for now. Eventually I want to use DDS cubemaps for everything.

    Sky Objects -
    The IBL cubemaps can be stored and managed by a custom Sky object in your scene. Sky objects are treated as ambient light-sources in your scene and work along-side Unity's direct lights. They also take care of binding all cubemaps, skyboxes, and exposure settings to our IBL shaders globally, making swapping out skies and messing with exposure through scripting very easy.

    HDR(!) -
    High dynamic range skies are handled with a .pbm importer and turned into RGBM textures. All the shaders handle RGBM cubemaps as well, allowing for super light-weight HDR without floating-point textures or any hardware restrictions really; HDR that'll run on a phone!
    I plan to write more file formats later, .pbm was just one I had code for already.

    Gamma Correct-
    Much care is taken to do all the fancy maths and light convolution in linear color-space. All the output textures will work in both Linear and Gamma color-space so both Pro and Free versions of Unity are supported.



    Shaders-
    Along with the IBL tools, Skyshop will come with all the permutations of shaders and material types you've come to expect from Unity:
    diffuse, Blinn-specular, normalmaps, and transparency. The IBL overhead for a shader is really just two cubemap lookups so adding new shader types is easy and I plan to do more of it.

    The shaders I've written so far conform to what Toolbag uses and include parameters for:
    - Diffuse Color
    - Diffuse Intensity
    - Specular Color
    - Specular Intensity
    - Specular Exponent
    - Specular Fresnel

    And channels for:
    - Diffuse map (RGBA)
    - Specular (RGB) Gloss (A)
    - Normalmap (RGB)

    Support-
    Edit: Skyshop now works in both free and pro versions of Unity 3.5 and 4.
    Last edited by monkeyscience; 05-21-2013 at 01:22 AM.


  2. Location
    Des Moines, IA
    Posts
    271
    So exciting to see Marmoset finally make its way to Unity! Looking great so far


  3. Location
    San Francisco
    Posts
    139
    That's fantastic, I've been searching for exactly this sort of toolset.


  4. Location
    Boston, Ma
    Posts
    2,441
    This is KICK ASS!!! I have custom shaders I made a while back...and I wonder if my shaders will work with this... and how much is this?


  5. Location
    Minneapolis, MN
    Posts
    422
    Quote Originally Posted by Neptune_Imaging View Post
    This is KICK ASS!!! I have custom shaders I made a while back...and I wonder if my shaders will work with this... and how much is this?
    Thanks!

    I'm sure it will, using IBL cubes in a shader is not hard, once you have the data. Generating the data and making sure Unity does not eat your mipmaps along the way can be tricky though. We'll be polishing and selling the whole workflow, if that makes sense.


  6. Location
    San Francisco
    Posts
    139
    Do you have an ETA for release?


  7. Location
    Boston, Ma
    Posts
    2,441
    Quote Originally Posted by monkeyscience View Post
    Thanks!

    I'm sure it will, using IBL cubes in a shader is not hard, once you have the data. Generating the data and making sure Unity does not eat your mipmaps along the way can be tricky though. We'll be polishing and selling the whole workflow, if that makes sense.
    Well, the shaders were made in Strumpy... but if your shaders are flexible, this should not be a problem... My shaders do accept cubemaps so this transition will be painless. Also will this work with Beast?
    Last edited by Neptune_Imaging; 03-10-2013 at 02:15 PM.


  8. Posts
    3,149
    This is all well and great but we need screens!

    Cant wait


  9. Location
    Minneapolis, MN
    Posts
    422
    Quote Originally Posted by janpec View Post
    This is all well and great but we need screens!

    Cant wait
    Whoa Firefox does not display my attached screenshots, fixed! I've also put up a webplayer demo at http://www.reinot.com/skyshop/


  10. Location
    Minneapolis, MN
    Posts
    422
    Quote Originally Posted by mstevenson View Post
    Do you have an ETA for release?
    ETA is in the coming weeks, its close .


  11. Location
    Boston, Ma
    Posts
    2,441
    I am very impressed with the webplayer...it definitely has the quality I am looking for too... how is it under strain during game play... and will this work with Light Probes, Beast, and skinned meshes? I have custom shaders that will accept cubemaps, and this will be a great addition... keep up the good work


  12. Location
    Minneapolis, MN
    Posts
    422
    Quick update: Unity 4 support, hazaa!

    I've also cleaned up the UI quite a bit and added an overlay of little bulb icons for all the directional lights in the scene. Very handy for positioning a direct light-source for the sun. You can even color-pick the hue and intensity of the light from the input image.



  13. Location
    Des Moines, IA
    Posts
    271
    Fantastic work Being able to visualize the placement of a light for the sun will make it worth using over the default skybox!


  14. Location
    Des Moines, IA
    Posts
    271
    Is it possible to rotate the skybox without going through the trouble of setting up another camera? I'd love to be able to do that, but for some weird reason, there's no skybox rotation with the default setup.


  15. Location
    Minneapolis, MN
    Posts
    422
    Yes, actually! The skybox and lighting orientation is hooked to the Sky object transform. So if for example you wanted to make the lighting environment spin around your model, you can script the Sky object transform to spin.

    Not as important for full games perhaps, but an IBL environment spinning slowly makes for great turn-table presentations, for example:
    Last edited by monkeyscience; 03-18-2013 at 06:23 PM.


  16. Posts
    2
    Oh wow, this is perfect for a project we're working on! You mention it working on pretty much any hardware; do you know if it'll play nice with exporting to Flash?


  17. Location
    Minneapolis, MN
    Posts
    422
    Quote Originally Posted by BossaDigital View Post
    Oh wow, this is perfect for a project we're working on! You mention it working on pretty much any hardware; do you know if it'll play nice with exporting to Flash?
    Good question, I tried it out in 3.5 this afternoon and Unity Flash has trouble even with the cubemap skybox. It will need a little more love before I can say we have Flash support, I'm afraid.
    Last edited by monkeyscience; 03-23-2013 at 07:30 PM.


  18. Location
    Minneapolis, MN
    Posts
    422
    One last pre-GDC update, I've made sure light probing and mapping all works. I also wrote a little UI for adding HDR skies into the Beast Settings XML file. Now any time you bake lightmaps or light-probes and Beast's raytracer misses your geometry, it samples your sky panorama!


    Beastly light-probing, featuring Joe Wilson's boss little Vespa

    p.s. We will be showing off Skyshop and our IBL Unity shaders at GDC13, albeit informally, like nomads on the expo floor. Look for scruffy fellas in "Marmoset Toolbag" T-shirts and say hello .


  19. Location
    East Yorkshire, UK
    Posts
    1,100
    Looks great, I don't suppose it'd work on mobile very well?
    Unity 5 pre-ordered.
    Officially licensed Sony developer.


  20. Posts
    2
    Quote Originally Posted by monkeyscience View Post
    Good question, I tried it out in 3.5 this afternoon and Unity Flash has trouble even with the cubemap skybox. It will need a little more love before I can say we have Flash support, I'm afraid.
    In my own 4.0 tests, I've found Flash able to handle pretty much anything shader-related as long as you don't go above 4 texture lookups. Cubemaps work fine from what I've tested, so if your IBL technique only uses two cubemap lookups, then that'll leave 2 texture lookups left for whatever else

Page 1 of 13 12311 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •