Overview
Animaze items such as avatars, props, and environments, are rendered using a complex shader (material), called The Animaze Shader. It is built modular, such that it can be customized to the needs of the rendered item. Every mesh has its own material that holds the configuration for the Animaze Shader and references to all textures bound to the mesh. Currently, a mesh Material can configure the Animaze Shader and it is the only way one can change the way an item is rendered.
The Animaze Shader lighting model is Blinn-Phong and has custom methods to compute specular, environment reflections, refractions, etc. So all texture maps will have to be adjusted having this shading model in mind. The Animaze Shader does not follow the Physically-Based Shading equations currently.
For better performance, you can group all the components that have the same material. In the picture above, grouped components share the same color.
Feature breakdown
Feature | Current support |
Shaded Surfaces | Supported (Blinn-Phong model) |
Glossy Surfaces (Specular) | Supported |
Transparent surfaces | Back to front simplified blending (alpha blending and alpha test discard methods) |
Translucent surfaces | limited (warp effect like glass not supported) |
Cel shading (lighting) | Supported |
Cel shading (object outline) | Supported |
Normal mapping | Supported |
Fur surfaces | Supported |
Environment mapping (skybox reflections) | Supported |
Shadows | Supported, shadow mapped from first light in the scene. |
Animated textures | Supported |
Animated alpha noise | Supported. Custom method. |
Color Tint | Supported |
Vertex Color only surfaces | Supported |
SSAO or any real-time Ambient Occlusion method | Not supported yet. |
Numbers of lights computed | 4 |
Animation driven normals and/or diffuse | Limited* with Live2D technology |
Realtime reflections | Not supported yet |
Dedicated hair shading | Not supported yet |
Depth test / Depth write control | Supported |
Material Components
Animaze uses a component system for the Animaze Shader, each component adds a feature to the item shading, e.g. Environment Mapping component adds the skybox reflection to the surface rendering. Some of the material components need extra info in the form of float values (e.g. fur length for the Fur component), geometric info (e.g. normals) or texture maps (RGB/RGBA/Grayscale textures).
Furthermore, texture maps encode per texel information in their RGB (and Alpha in some cases) channels that require careful tuning and are compliant to specific Animaze shading rules. Texture channel rules are described for each component in particular, although some of the texture maps are shared among them, the rules apply the same.
Some components are solely unique and they exclude each other out when one tries to add them together. For example, the fur and skin dot mapping components cannot coexist on a single mesh material. The reason behind this, is that the Animaze Shader model is built this way in order to reduce the performance expense of the models.
Material Components can be customized by the data fed to the Animaze Editor (e.g. the geometry, the textures) and can also be customized within the Editor's Material Editor (e.g. changing the diffuse texture, setting a tint color etc.). All components that can be changed only from the Animaze Editor are marked accordingly by (*).
Warning!
There are currently two main restriction regarding Materials in Animaze:
the mesh can only feature a single material
the mesh needs to be exported with a single UV set
List of Material Components
Render Queues
Animaze materials can control the rendered surfaces' render queues. The basic concept is that we need to have a distinction between opaque surfaces and transparent ones, as the transparent ones need to modulate the color of the previously rendered surfaces (the opaque ones). Having render queues brings more control to how the meshes are displayed.
Queues are sorted as follows:
Environment – drawn first. Commonly used for the skybox.
Opaque – opaque meshes are drawn front to back so we can leverage depth testing and have less overdraw.
Fur – fur meshes are very peculiar, they have instanced meshes, where the first layer is opaque and the rest are transparent or blended. Meshes rendered through this queue are sorted back to front.
Alpha Test – rendered back to front, pixels under a certain alpha value are discarded. This is a more efficient way of adding transparent surfaces.
Blended – transparent meshes, rendered back to front.
Overlay – reserved for UI