This tool is a shader that tries to match the viewport shading of Allegorithmic's Substance Designer and Painter software more that is toward the shading found in CRYENGINE.
Download Designer_shaders.zip and unzip it to c:\Program Files\Allegorithmic\Substance Designer\5\resources\view3d\shaders or the respective folder where your Designer is installed.
Restart the Designer. After this, the new shader should appear in the shader list named ce_physically_specular_glossiness.
Download CryEngine.glsl and when your project is open, drag&drop it to the Shaders shelf in the Painter:
- Base Color
This shader tries to mimic CRYENGINE shading. It supports default Physically Based Rendering (PBR) shading, together with Parallax Occlusion Mapping (POM) with selfshadow and also supports translucency.
Most of the settings from the Designer or Painter software should be straightforward and mean exactly the same as in CRYENGINE.
Parallax Occlusion Mapping
Substance Designer: As a target map for a heightmap use "Height"
Substance Painter: As a source channel for POM use "Displacement"
Since Substance doesn't support small step changes in values, the depth for POM is displayed as being in the 0-1 range, but it is the same as a CRYENGINE range of 0-0.05.
The only difference in setup is in light handling, since Substance Designer only allows having light intensity defined by color while Substance Painter doesn't have any light in the scene at all.
Therefore, for Substance Painter, Sun-related parameters were introduced to mimic the sun in the scene. In Substance Designer, Sun Multiplier Intensity was added as a shader parameter to allow increasing the sun intensity in the scene.
Using CryEngine Cubemap in a Viewport
It is also possible to use CRYENGINE cubemaps as a Panorama image in Substance:
- Open a cryengine tif cubemap in Photoshop. (found in the cubemaps folder, with _cm suffix). Don't be scared by strange colors.
- Run this vertical_cubemap.jsx Photoshop script to transform the image to a vertical cross cubemap.
- You can now expand the border of the cubemap so there are less seams.
- Save the image as an HDR image format.
- Open the image in HDRShop.zip.
- Go to menu Image/Panorama/PanoramaticTranform.
- Make sure the settings are as below, and potentially raise resolution.
- Save as a new HDR image.
- In Substance Designer, change the panorama image in the scene options.
Substance Render vs CRYENGINE Render Differences
Apart from using a different cubemap format where Substance uses a latitude-longitude environment map and CRYENGINE uses a 6-sided cubemap, there is also a difference in the sampling. Where in CRYENGINE cubemap importance sampling is done during dds generation in the Resource Compiler, in Substance it is done directly in the shader. Also, CRYENGINE uses a secondary low res diffuse cubemap, whereas Substance uses SphericalHarmonics coefficients calculated from the environmental map. However, results should be similar.
The biggest difference is in tonemapping. CRYENGINE lights the scene with raw values that it gets from light and cubemaps (see the very top right in the cubemap example above) and then applies tonemapping to the final scene to compensate.
Substance, however doesn't compensate too much or use too lower light in postprocessing, but it allows changing the exposure of the Environmental map. This is almost the same as lowering the Diffuse and Specular multiplier for an Environmental probe in the Sandbox Editor.
This is why it's highly recommended to lower Environmental map exposure in Substance and higher sun intensity to get more similar results to that produced in CRYENGINE.