Description

Ice Cool is an advanced master material prepared especially to create multiple types of ice like ground ice, ice cubes, icebergs, crystals, glass, and icicles. The translucent material option is a great solution for improving your level by storytelling on cold arctic maps. Designed and optimized specially for Mobile, Virtual Reality, and stylized PC/Console games.

Features

  • Customization options. Over 200 parameters to make it look cool. Additionally, Over 50 switches allow controlling efficiency-quality trade-off.
  • Uses the NEW FAST cracks rendering method. Implementation of the new cheap iterative technique of parallax for rendering deep cracks based on Signed Distance Field Textures. Thanks to using the SDF result effect stays clean and smooth even on closeups with using only 7 texture reads! (5 times faster than other methods).
  • Supports multiple types of refraction. Supported cube map with box projection mapping/screen color/ build in refraction pin.
  • Advanced translucency options. Translucency supports depth fading fog for a better quality of covering the objects inside the ice.
  • Subsurface scattering and custom lighting. Useful for more advanced users to better fit the ice into the scene.
  • Extended reflection mode. The system supports pre-rendered cube map reflections mapped on meshes using box projection mapping and spherical mapping. This method is very fast even on translucent materials.
  • Icy vertex offsets. Material supports configurable Vertex displacement for Icicles.
  • Masked dithering. You can configure the system to use translucent material only where you need and dither the opaque material around the wholes.
  • Animated dust. Configurable dust map with refraction noise makes the material look even deeper and real.
  • Efficient and GPU friendly. Uses between 90-210 instructions depending on the number of features enabled can be used on VR and even mobile.
  • Extra tools. The system includes additional tools for generating new Signed Distance Fields and environment cube maps.
  • Multiple useful examples. The package contains an example map with a showcase of multiple samples of using the material.

Gallery

Documentation

Get Started

Ice Cool is a pack based on single advanced master material. The material is placed in folder IceCool/Materials/M_IceCool. Basically every user has two ways of working with the package.

  1. Copy Material (Easy one) – Copy example material and modify the parameter to fit the requirements. You can check the example materials in the demo IceMap.
  2. Create Material (Hard one) – Create a material instance from master material and setup material parameters from scratch.

This documentation covers both approaches to create cool ice material.

It is good practice to create New Folder where the materials created using Ice Cool package will be stored. Try to not modify or add any content do the Ice Cool package it will protect your project from problems after downloading the new updates of the package.

Copy existing material

Ice Cool package contains a demo folder with multiple examples of materials of ice prepared for the specific conditions that can be copied to your project. All examples of ice materials are stored in the Demo/ExampleMaterils folder.

  • Cracked ground
  • Half translucent ice cubes
  • Opaque icebergs
  • Translucent icicles
  • Ice coating
  1. Select material that you want to use in your game
  2. Click the right button on the material and choose duplicate (if you want to copy) or create a material instance (if you want to extend the material and modify parameters).
  3. Move the newly created material into your project folder.

Cracked ground

The cracked ground is the most advanced use of the Ice Cool package. This material is prepared to be used as a ground. The UV coordinates of ice texture are calculated in the world space so the material can be used regardless of mapping or ground size. There are multiple types of this material prepared for fulfil the requirements of quality and platform type that game targeting. The demo allows seeing differences between every type of the material by pressing keys 1-7 on the example map.

Material Type Lighting Reflections Platform
Opaque Unlit Material parameters Cubemap All
Opaque Lit Build-in UE4 Reflection Captures All
Translucent Unlit Material parameters Cubemap All
Translucent Lit Build-in UE4 Cubemap PC
Dithered Lit + Translucent Unlit Mixed Cubemap near the camera. PC
Dithered Lit + Translucent Lit Build-in UE4. Best quality. Cubemap near the camera. PC
Dithered Unlit + Translucent Unlit Material parameters Cubemap PC

Half translucent cubes

Half translucent means that this type of ice is a combination of two meshes opaque and translucent.

  1. Inside layer (MI_IceBlockBigInside) Opaque mesh is rendered from inside of the geometry (normal inverted front face culling)
  2. Outside layer  (MI_IceBlockBigOutside) Translucent mesh is rendered traditionally as a layer over the ice.

This kind of materials are useful when you want to put some meshes into an ice cube and achieve good effects of refraction. Mesh will be rendered between the inside and outside layers.

Half translucent ice based on two materials – mannequin mesh placed inside the ice.

Opaque icebergs

Very efficient good looking opaque material useful for icebergs that use refraction based on external cubemap.

Opaque iceberg material in action

Translucent icicles

This material type was prepared especially for creating icicles hanging from a roof. The additional layer of animated dirt makes it looks wet.

Translucent icicles material in action

Create new material

If you are not interested in using predefined materials of ice then there is always the harder path to follow. You can remove all demo content and create the material instance from scratch.

  1. Find the base material IceCool/Materials
  2. Duplicate the MI_IceCool or create a material instance from M_IceCool.
  3. Rename newly created material and move to the Ice materials folder in your project.
  4. Material is ready to use from now.

I’m not recommending you this method. It requires a lot of knowledge about the ice material and this documentation does not cover all details yet.

Reflection

The reflection effect is based on pre-rendered cube maps. A detailed explanation of how to create cubemap for ice can be found in the Tools/Cubemap Rendering chapter. Ice materials support two types of reflection mapping. Spherical reflections and box projection mapping.

  • Spherical mapping – Very fast but inaccurate. Works out of the box.
  • Box projection mapping – Very accurate in box-shaped rooms. Requires additional room size pieces of information in the materials.
Box projection mapping  
UseBoxProjection Allows using box projection mapping. If disabled then the system uses standard spherical cube-map projection.
ReflectionBoxExtend half size of the room cached in the reflection map.
ReflectionBoxPosition Position camera where the reflection was cached.
UseReflectionBoxLocal Forces system to use reflection box capture in local space of actor position. Useful when the mesh is connected to the same actor as the reflection capture component.

Other reflection parameters:

Reflections

 
ReflectionColor Color of reflection allows adjusting the cubemap to underwater conditions. Alpha channel represents the power of Fresnel.
ReflectionTexture Prebaked cubemap reflection texture should be cached in a place where the glass is rendered.
Use Shlick Reflection Enables physical-based Shlicks Fresnel calculations. Otherwise uses fast simplified dot(camera, normal) Fresnel.
UseReflectionBoxLocal When true then ReflectionBoxPosition will be added to the actor position.

Refraction

The package supports multiple advanced types of refraction. Each type of refraction is useful for a different scenario.

  1. Build-in UE4 refraction
  2. Screen color refraction
  3. Opaque cubemap refraction

Fast dithered layers

The dithered material is the composition of two meshes with the top layer implemented as dither translucent. That combination allows using the slow translucent materials only where it is needed and increases quality of lighting and reflections with low cost by using the opaque material over the translucent.

 

  • The top mesh layer uses opaque dithered opaque material that has high-quality reflections and lighting implemented by Epic.  
  • The bottom mesh layer uses layer translucent material that is covered by the top layer using a dithered transition.

It’s good practice to use bottom translucent layer only where it is needed and cut invisible parts of this mesh to increase a performance by lowering the geometry overdraw.

Dithered material can be masked by a vertex color alpha channel painted in the vertex paint mode. This functionality is active only when the UseDitheringVertexAlpha option in the top opaque material is active.

Material parameter  
Use Dithering Distance Use dithering in distance from the camera.
Use Dithering Vertex Alpha Use masking of the dithering by vertex alpha.
Use Dithering Per Vertex Calculate distance for dithering per vertex to lowers the shader complexity. It can cause some quality problems when using low-density meshes.
Dithering Border Dithering distance border.
Dithering Smooth Dithering border smoothing.

 

Parallax cracks

Advanced algorithm of rendering parallax cracks uses the information about the distance from crack to render very efficient and smooth effect in only 6-8 texture reads. In comparison to other algorithms, it is over 6 times faster and looks much better on closeups.

Material parameter  
Use Cracks Whether the effect of cracks should be used in the material. The cost of this effect is noticeable (about 30-40) instruction so it’s good to enable this flag only when intended to use effect.
Cracks SDF Texture Signed Distance Field texture used to generate the effect. Detailed description about preparing SDF textures can be found in the chapter “Signed Distance Fields rendering”.
Cracks Color A bottom color of the effect of the cracks.
Cracks Color Light   A top color of the effect of the cracks.
Cracks Depth Iteration The number of iterations used to calculate the effect. Best results can be achieved in between 5-10 iterations. It’s worth to minimize this value for optimization.
Cracks Depth Step Size Step size per iteration
Cracks Depth Scattering Depth scattering scale.
Cracks Depth Scale Depth intensity scale.
Cracks Depth Smooth Smoothing of the effect. It should be lowered when there is a lot of holes in the cracks.
Cracks Distortion Distortion of cracks based on normal-map.
Cracks Width Width of the effect. It should be between 0.93 and 1.0.
Cracks Height Height of the effect.
Parallax cracks in action

Dust

Ice Cool package supports a deep layer of animated dust.

Dust parameters  
Use Dust Whether the dust should be used in the material.
Dust Color The color multiplier for the dust texture
Dust depth shift An offset of the dust layer
Use Dust Layered Whether to use the second layer of dust.
Dust Layer Between Interpolation of layer rendered in between base layer and mesh surface.
Dust Texture The texture used as a dust layer.
Dust Texture UV Scale UV coordinates (X,Y) and scale(Z,W)
Dust Texture UV Anim UV animation speed per second (X,Y)
Use Dust World Space UV Whether to calculate dust UV in world space or take it from UV0.
Use Dust Noise Whether to distort the dust layer by noise texture.
Use Dust Noise Alpha Whether to read distortion of UV dust layer from noise alpha.
Dust Noise Texture Dust noise texture source.
Dust Noise Scale Dust noise texture UV scale.
Use Dust Noise World Space UV Whether to calculate dust noise UV in world space or take it from UV0.

Coating

The coating effect extrudes the mesh in direction created from normal and gravity vector. The coating effect is useful for covering geometry by ice with additional icicles hanging from a mesh.

Coating parameters  
Use Coating Whether the coating effect should be enabled
Coating Offset Channels RGB represents the direction of gravity length of this vector represents force. Channel A is a coating size in the direction of normal.
Coating Normal Distortion Changes noisy distortion in a normal direction.
UseCoatingNoise Whether to use noise function to calculate random offsets.
UseCoatingNoiseSkin When true noise will b calculated using Skin vertex position, false force system to use texture UV.
CoatingNoiseScale Noise irregularity
UseCoatingTexture Changes noisy distortion in a normal direction.
CoatingTextureUVScale Coating texture UV modyfikator.
CoatingTexture The texture used for coating effect.
Coating material in action.

Animated coating

Since update 1.1 Ice cool supports animated coating effect that can be useful during freezing meshes.

Multiple types of coating growing animation:

  1. SPHERE – UseCoatingSphereAnimation = true. Coating is growing inside the sphere described by (CoatingSphere.rgb – location, CoatingSphere.a – radius)
  2. PLANE – UseCoatingPlaneAnimatio = true. Coating is growing inside the sphere described by (CoatingPlane.rgb – normal, CoatingPlane.a – plane offset)
  3. FLAT – time based evenly growing. Growing controlled by CoatingFlatBlend float (0 – no coating, 1- full coating )
Coating Animation  
UseCoatingAnimation Whether the coating animation effect should be used.
CoatingAnimationTime Flat coating animation effect blend between no coating and full coating. Should be modified externally by blueprints.
CoatingAnimTranslucent Speed of showing the coating effect in the translucency channel.
CoatingAnimType Displacement mode type. 0 – firs type, 1 – second type (just check the difference in showing icicles and shell)
CoatingShapeDistanceBlend The soft blend between no coating effect and full coating used in a plane and sphere mode.
UseCoatingPlaneAnimation

The coating is growing inside the sphere described by   Coating Plane

CoatingPlane CoatingPlane.rgb – normal, CoatingPlane.a – plane offset. Should be modified externally by blueprints.
UseCoatingSphereAnimation The coating is growing inside the sphere described by Coating Sphere
CoatingSphere CoatingSphere.rgb – location, CoatingSphere.a – radius radius. Should be modified externally by blueprints.
UseCoatingShapeLocalPosition Use local space position of vertex during sphere/plane calculations.
UseCoatingDebugAnimation Show example debug animations. Disable when you want to animate manually in blueprint by using material parameters.

Tools

Ice Cool package contains additional tools that can help to use the full potential of the material system.

Cubemap reflections rendering

Materials use cube maps for simulating reflection and refraction of opaque materials. Those cube maps can be created using BP_CaptureCubeMap blueprint. 

  1. Place Blueprints/BP_SceneCaptureCube on your map and set up a proper position to capture the scene (center of the room would be great).
  2. Open IceCool/Tools folder and select the render target (RT_SceneCapture).
  3. Click right on the RT_SceneCapture and select “create static texture” newly created texture is ready to use.
  4. Set reflection texture cubemap to the material parameter called ReflectionTexture.

Signed Distance Fields rendering

Signed Distance Field is an image where each pixel contains the distance to the nearest point on the boundary. An additional sign of distance allows determining if the pixel is inside or outside rendered shape. SDF image that looks like a gradient can be loaded from a file or generated by mathematical functions called Signed Distance Functions.

Short description of how to create the SDF texture:

  1. Place the BP_SignedDistanceFiled on map.
  2. Setup parameters.
    Source Texture The texture that will be used for generating the SDF.
    Search Width Width of search the distance in pixels. W*W is the number of iterations per pixel. Big numbers can crash the program.
    Texture Size Resolution of the texture.
  3. Click generate to update the render target.
  4. Click right on the RT_SceneCapture and select “create static texture” newly created texture is ready to use.
  5. Use the texture as CracksSDFTexture parameter.

 

Description

Volumetric Glass is an advanced and efficient master material designed for rendering volumetrics and glass. The package is useful for creating sci-fi stylized environments like water tanks, aquariums, and underwater tunnels even glass in submarines. The package is perfectly balanced between quality and efficiency. Designed and optimized specially for Mobile, Virtual Reality, and stylized PC/Console games.

Features

  • Two types of material underwater volume  and shaped glass
  • GPU friendly and very efficient can be used on mobile as well as in the VR
  • Multiple shapes (box, sphere, ellipse, cylinder, mesh)
  • Spline based tunnel blueprint
  • GPU friendly very efficient (only 150 instructions)
  • Over 70 parameters to setup: light shafts, volumetric, scattering, glass color, fog density, wet color, reflections, etc.
  • Animated clip plane surface
  • Vertex color based texture masking
  • Example map contains underwater world and sci-fi laboratory
  • High-quality fast scattering
  • Fast box projected reflections
  • Custom multi-channeled point lights
  • Easy for integrating with other water surfaces like Aquatic Surface.

Documentation

Get Started

The most important think about the Volumetric Glass is that the package is divided into two materials specialized for use in different cases:

  1. Glass Volume (Materials/M_GlassVolume) – Supports rendering of glasses from the inside of the fluid volume. Represents underwater windows, tunnels, glasses, and world rendered from the inside of the water. Material is called M_GlassVolume.  
  2. Glass Shape (Materials/M_GlassShape) – Supports rendering shapes from the outside of the fluid volume. Useful for water tanks sci-fi stylization, volumetric fog used as an environmental effect.

Both materials should be instanced before using on the meshes. To create material instance from the base material click right button on the chosen material and select “Create Material Instance” option.

Glass Shape

Glass Shape material can be used on different geometric objects like a box, cylinder ellipse. 

Different shapes of the glass in sci-fi laboratory

 

Basically, the system requires to use of meshes with unified size (100cm,100cm,100cm) and pivot in the center. The mesh can be scaled properly in actor properties. Example shapes can be found in the Package/Meshes folder.

Example of use:

  1. Chose the shape and place on the map. For example SM_Box
  2. Create a material instance from M_GlassShape
  3. Open newly created material instance and set up the parameters. Find the Shape tab and select the shape that you want to use:
  4. Setup the Reflection Texture cubemap in the material. It should be the texture cached from the scene using the Scene Capture Actor. If you don’t know how to prepare a cubemap read the Capture Reflections chapter.
  5. Apply glass material on your glass on the meshes and see the magic 🙂

It is not possible to use Box/Sphere shaped meshes on the characters props or customization elements because it is not geometric compatible. There is additional UseShapedMesh mode in the M_GlassShape material that implements approximated shape for the undefined shapes.

Base parameters

M_GlassVolume

 
Use Fog Exp2 Use exponential fog or linear if false.
Fog Base Base depth of the fog effect.
Fog Density The density of the fog effect.
Fog Color Color of the deep fog.
Use Wet Color Enable wet color functionality. 
Wet Color The color multiplier applied to geometry inside the shape.
Use Translucency Whether the translucent effect should be active.

Clipping plane surface

Clip plane surface is the effect of clipping the geometry by plane filled by an animated fluid surface.

Clip plane  
Use Shape Clip Plane Whether the clipping plane effect should be active
Shape Clip Plane Equation of clipping plane RGB-normal, A-translation
Use Surface Normal Map Use the surface normal map
Surface Normal Map Texture The texture used as a normal-map.
Surface Normal Map UV

UV scale and translation in an animation of normal maps on two layers.

  • R – Layer 1 scale, 
  • B – Layer 2 scale, 
  • G – Layer 1 move, 
  • A – Layer 2 move, 
Surface Normal Scale Surface normal z value multiplier before normalization. Allow changing height ow wave.
Surface Normal Flatness Surface normal flatness. Allow changing height ow wave.
Use Surface Normal Scale Whether to use Flatness or Scale
Use Surface Normal Map Use the surface normal map
Use Clip Plane Reflection Allow using clip plane reflection effect
Use Water Line Allow rendering waterline on the glass. (experimental)

Lighting

System supports multiple methods of lighting the meshes:

  • coloring edges of the mesh at lower depth (simple and fast) Use Light Color Edge = true
  • simplified directional diffuse light UseLighting = true
  • advanced subsurface scattering (very complex slowest) UseSubsurfaceScattering = true

All of these methods can be used separately or combined at the same time. The only single light source can affect the glass and it can be point light or directional light.

Use Directional Light True – Use Directional Light False – Use Point Light  
Use Channel = true

Reads the directional lighting values from global settings Materials/UtilsPC_VolumetricGlass DirLightChannel0 

Reads the directional lighting values from global settings Materials/UtilsPC_VolumetricGlass  PointLightChannel0-2. 

Point light channels can be controlled by the BP_ScatteringLight blueprint placed on the level with the selected channels to set.

Use Channel = false Reads the directional lighting values from local variable Light Direction in the material.

Reads the directional lighting values from the local variable Light Position in the material.

 

Lighting

 
Diffuse Power Diffuse lighting color.
Light Color Color of light inside the volume.
Use Directional Light
Whether to use directional or point light.
Light Direction If Use Directional Light = true then uses this value as light direction. Length of vector changes fading.
Light Location If Use Directional Light = false then this is the default location of the light relative to the actor. Alpha channel contains Attenuation.
Use Light Color Edge Use the light color as the edge of the shape. The shape will be lightened in depth. The scale of depth can be changed in the alpha channel of the Light Color parameter.
Use Channel 0/1/2 Select which channel will be used as a global point light.

Scattering

Scattering

 
Scattering Ambient Scattering ambient value
Scattering Depth Scattering depth scale
Scattering Depth Block Scattering blocked by mesh depth inside the volume
Scattering Distortion Light distortion inside the scattering inside the volume
Scattering Power Exponential power scattering effect inside the volume
Scattering Sale The scale of scattering effect inside the volume
Use Lighting Whether the lighting and scattering effect should be active.

 

Glass Volume

First, you have to place the BP_GlassVolume blueprint on the scene. BP_GlassVolume represents the shape of the fog volume that will be used for volumetric glass.

  1. Volume is visible only throw the glasses that use specialized material called M_GlassVolume.
  2. Create a material instance from M_GlassVolume and set up the parameters.
  3. Apply glass material on your glass meshes and see the magic 🙂

 

Base parameters

M_GlassVolume

 
Use Fog Exp2 Use exponential fog or linear if false.
Fog Base Base depth of the fog effect.
Fog Density The density of the fog effect.
Fog Color Color of the deep fog.
Fog Scattering Clamp Maximum scattering power.
Fog Scattering Scale Scale config of the scattering color effect.
Fog Scattering Shift Shift config of the scattering color effect.
Fog Scattering Width Width config of the scattering color effect.

Light shafts

Glass material supports simplified optimized light shaft effect settings and configuration listed below.

Light shafts

 
LightShaftColor Light shaft color in scattering.
LightShaftDistance The distance of the light shaft effect from the camera.
LightShaftIntensity The intensity of the light shaft effect.
LightShaftPosition Camera position scale when moving light shaft.
LightShaftSpeed Light shaft animation speed.
LightShaftTexture The texture used as a light shaft.
UseLightShaft

Activates light shaft effect.

Tunnel Spline

BP_TunelSplineActor is an additional blueprint useful for creating underwater tunnels. To start using this actor just place the BP_TunelSplineActor  on the scene and setup parameters.

BP_TunelSplineActor

 
Static Mesh Looped mesh used for tube
Forward Axis The forward axis of the mesh.
Translucency Sort Priority The priority of mesh rendering. Can fix some translucency bugs.

Hold Alt+Drag the point of spline to create duplicate of spline point.

Capture Reflections

The Volumetric Glass system renders reflections based on the cube maps cached from the scene. It is really efficient method but requires some additional effort to cache the reflection.

  1. Place Blueprints/BP_SceneCaptureCube on your map and set up a proper position to capture the scene (center f the room would be great).
  2. Open Material/Textures and find the render target (RT_SceneCapture).
  3. Click right on the RT_SceneCapture and select “create static texture” newly created texture is ready to use in the volumetric glass system.
Example reflection texture from sci-fi laboratory used on all shapes inside the room.

Reflections Settings

The reflection effect is based on a prerendered cubemap. Volumetric glass supports two types of reflection mapping. Spherical reflections and box projection mapping.

  • Spherical mapping – Very fast but inaccurate. Works out of the box.
  • Box projection mapping – Very accurate in box-shaped rooms. Requires additional room size pieces of information in the materials.
Box projection mapping  
UseBoxProjection Allows using box projection mapping. If disabled then the system uses standard spherical cube-map projection.
ReflectionBoxExtend half size of the room cached in the reflection map.
ReflectionBoxPosition Position camera where the reflection was cached.
UseReflectionBoxLocal Forces system to use reflection box capture in local space of actor position. Useful when the mesh is connected to the same actor as the reflection capture component.

Other reflection parameters:

Reflections

 
ReflectionColor Color of reflection allows adjusting the cubemap to underwater conditions. Alpha channel represents the power of fresnel.
ReflectionTexture Prebaked cubemap reflection texture should be cached in the place where the glass is rendered.
Use Shlick Reflection Enables physical-based Shlicks fresnel calculations. Otherwise uses a fast simplified dot(camera, normal) fresnel.
UseReflectionBoxLocal When true then ReflectionBoxPosition will be added to the actor position.

Glass Settings

Volumetric glass materials support advanced glass surface configuration that allows customizing appearance to specific requirements. Glass surface is rendered before the volume and can cover the objects behind the glass.

M_GlassVolume

 
Glass Color Color of glass mesh (with translucency).
UseGlassTexture Allow using glass texture instead of flat color.
UseGlassTextureColor Glass texture color multiplier.
GlassTexture Glass texture used when UseGlassTexture = true
GlassTextureU Scale glass texture on U axis
GlassTextureV Scale glass texture on V axis
UseGlassTexturVertexAlpha Uses vertex color alpha channel as a multiplier for glass texture. Broken glass example.