1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

Unity - IllumClone shader [DEPRECATED]

Nov 13, 2014
Unity - IllumClone shader [DEPRECATED]
  • Unity - IllumClone shader last updated 2014-11-14

    is a universal one-sided, opaque, Blinn-Phong ├╝ber-shader, intended to emulate CryEngine's Illum shader functionality in Unity engine.

    Current version is: IllumClone 1.63D
    Name Coding: D- deferred shader for Unity Pro, now - without DX11 features.
    F- forward shader for DX11 and Unity Free (older versions).

    Diffuse term: sets base material color

    Diffuse map - diffuse map is mandatory.

    Diffuse tinting - adds color to diffuse texture. Currently works like Overlay blending mode in Photoshop. It allows to darken, lighten and tint base texture, while preserving contrast.

    Tint color - default (no effect) color - middle grey RGB128.

    Decal material - Uses diffuse map alpha channel to determine, where material is transparent. Mostly used for decals, vegetation, ironwork. Also known as alpha-test.
    Specular term: deals with shinyness and reflections

    Specular color - is the reflective or shiny color of a material when light shines onto the object. It is a simplified reflection effect.​
    For non-metal materials it is always white, making highlights monochrome, only tinted by the color of incoming light. For metals, specular color is very light color of the metal itself ant it tints the reflections and specular highlights.
    If you use the specular map, leave the specular color white.

    Fresnel effect: amount of reflectance you see on a surface depends on the viewing angle.

    All materials exhibit Fresnel effect!
    Currently, because of Unity limitations, we use heavily cheated effect, that does not use physical IOR values, but exponent and bias

    Fresnel exponent - values 0-8.​

    Fresnel bias - values 0-1.​


    Bricks - 29.5/0.6275
    Ceramic, shiny glaze - 4.81/0.2
    Ceramic, rougher glaze - 5.05/0.3216
    Concrete - 29.5/0.6275
    Glass, common - 5.37/0.2392
    Ivory - 3.91/0.2431
    Leather - 5.92/0.5843
    Metals - 1/1
    Paint, oil based - 4.02/0.2314
    Paint, synthetic - 6.65/0.4627
    Tree bark, leaves - 5.85/0.5333
    Sand, gravel - 5.85/0.5333
    Stone - 5.85/0.5333
    Suede - 5.85/0.5333
    Varnish - 4.02/0.2314
    Water - 4.0/0.2314
    Wood, raw - 5.92/0.5843
    Wood, weathered - 29.5/0.6275

    warning: subject to changes and improvements!

    Note: In Blinn-Phong shading model, reflectivity is affected by Fresnel effect in such way, that full value of specularity or specular map is applied to surfaces, parallel to viewing direction (grazing angles), and is masked most in surfaces, perpendicular to viewing direction. The reflectivity and shinyness of material is greatly affected by Fresnel values. So it is recommended, if judging specularity by eye, to set Fresnel values first, before Specular ones.

    Fresnel off -
    Fresnel on:


    Specularity - values o-1. It is the 'strength' of reflection or 'shinyness'. It is tied to diffuse color in energy conserving manner, so the more specular (reflective) the surface is, the less diffuse color it shows. For ex.: mirror or chrome has specularity of almost 1, and do not show diffuse color, which is very dark grey.
    Using specular map, specularity value has no influence.

    Use specular map
    - works like combined effect of Specular color and Specularity. The luminance determines how reflective the pixel is, and hue/saturation adds tint for metal reflections.
    Great reference for specular maps of different materials can be found here.

    - values 0-1.[​IMG]

    Bricks - 0.4
    Concrete - 0.5
    Leaves - 0.8
    Mirror - 1.0
    Paint, matte - 0.6
    Paint, glossy - 0.85
    Tree bark - 0.4
    Steel, shiny - 0.96
    Wood, weathered - 0.45

    Use gloss map - takes glossiness values from _SPEC texture alpha channel.
    Most materials should have a gloss map, as it can give a lot of good variation to the shading. Gloss is closely related to normal maps, as high frequency details in a normal can create some feeling of roughness as well. However, gloss is more the micro-scale roughness of the material.​
    Normal mapping and displacement:

    Use normal mapping - self explanatory.

    Normal map
    - For correct display in scene viewport, normal maps have to be marked in material inspector for compression as 'Normal map'.
    Normal map strength is not adjustable, so set the correct value outside Unity.

    - Parallax Occlusion Mapping. It's a depth effect given to your surfaces with the help of displacement map, it does not however change surface, so object contours stay the same.

    Use it sparingly! Best use is for surfaces of strong relief and sculpted details.

    POM height
    - Perceived depth of POM effect. Beware, stronger values easily break the perspective.

    Displacement map
    - currently only alpha channel is used for POM heightmap.
    In heightmap, white color is taken as default surface height. To 'recess' surface deeper, use darker tones.
    Image Based Lighting (advanced): controls are exposed only while it isn't handled automatically.

    Image based lighting is the method to handle scene lighting without direct light sources, and to fake reflections. Unity's light probes work the same way. Textures, called cubemaps, are employed to to project lighting information to each object's surface (Diffuse IBL) and to add static pre-baked environment reflections to reflective surfaces (Specular IBL).

    Diffuse IBL On - Off value defaults to uniform Ambient light, settable in project settings.

    Use RGBM cubemaps
    - it's the default way. High dynamic range cubemaps, in order to store information outside RGB 0-255 range, use alpha channel for luminance multiplier.

    Diffuse RGBM multiplier
    - Set it in 1-16 range, depending on cubemap, used in the scene. Multiplier is multiplied with pixel values in RGB and alpha channels to get HDR pixel values.

    Specular IBL On - Off value has no environment reflections, and only direct light sources form specular highlights.

    Use RGBM cubemaps
    - the default way.

    Specular RGBM multiplier
    - Set it in 1-16 range, depending on cubemap, used in the scene. It is multiplied with values in RGB and alpha channels to get HDR pixel values. Verify the multiplier in mirror material (Specularity=1, Glossiness=1); The reflection should be the same intensity as the skybox.
    Vertex colors: Enables vertex color reading for masking Dirt and Blend layers.

    Helps re-use small quantity of dirt maps for multiple situations.​

    Dirt layer: allows you to blend another texture onto your base material without the need to place an extra decal.

    Dirt layer has only Diffuse texture with layer mask in alpha channel.​

    Dirt texture - dirt texture slot, is tiled (doesn't use UV set).

    Dirt tint color - tints dirt texture. Currently works like Overlay mode in Photoshop.

    Use dirt specularity - Switches to individual specularity slider for dirt layer. If dirt layer has same specularity as base material, uncheck for better performance.

    Dirt specularity - values 0-1.

    Use dirt glossiness - Switches to individual glossiness slider for dirt layer. If dirt layer has same glossiness as base material, uncheck for better performance.

    Dirt glossiness - values 0-1.​

    Blend layer: allows mixing a second set of textures with the base set to get more variation on tiled surfaces.

    (page is being periodically updated)
  • Loading...