Monday, April 22, 2013

Marmoset's Skyshop

3D Rendering program, Marmoset, takes it a step further, allowing sky objects, HDR and more options being introduced as it makes it's way into the Unity Engine.

"Web-Player Demo:

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.

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)"


No comments:

Post a Comment