• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Unity - IllumClone shader [DEPRECATED]

  • Views Views: 857
  • Last updated Last updated:

Navigation

      Modeling guidelines
         Architecture
         Unity - Modelsetup (MAYA)
         Unity - Setup of a gun in Maya
         Advanced foliage shader
         Emissive shader
         Fabric shader
         Main shader
         ReliefTerrain shaders
         Sail shader
         SSS shader
         Suimono 2.0 water shader
         VolumeGlass
         WindowGlass
      Texturing Guidelines
            (3a) CryEngine - CGF setup Maya
            (3b) CryEngine - CGA setup Maya
         CryEngine - Console commands
         CryEngine - Important keys
      Bahamas
      Greater Antilles
         Cuba
         Hispaniola
         Jamaica
         Puerto Rico
         St Domingo
      Lesser Antilles
         Anegada
         Anguilla
         Antigua
         Barbados
         Barbuda
         Dominica
         Granada
         Grenadines
         Guadeloupe
            La Désirade
            Marie-Galante
         Martinique
         Montserrat
         Nevis
         Saba
         Sint Eustatius
         St Barts
         St Croix
         St Johns
         St Kitts
         St Lucia
         St Martins
         St Thomas
         St Vincent
         Tortola
         Virgin Gorda
      Southern Caribbean
   03. Credits
  • Unity - IllumClone shader last updated 2014-11-14

    IllumClone
    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.​
    speccol.jpg

    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.​

    New!
    (exponent/bias)
    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%20off.jpg
    bump%20fresnel.jpg

    Fresnel on:
    fresnel%20on.jpg
    beauty.jpg


    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.

    Glossiness
    - values 0-1.
    shading1.jpg

    New!
    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.

    POM
    - 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.
    pom_cube_0.jpg
    pom_cube_1.jpg
    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…
Back
Top