Creating new material effects
Material effects in CryENGINE are defined as the way a surface material reacts to other materials. For example, a metal material will react to bullet impacts differently (that is, by generating sparks) than a grass material does (that is, by generating dirt or dust). Because hardcoding these effects in C++ would require a huge amount of maintenance, these effects are exposed through a number of small asset files.
Getting ready
It is important that the files involved in this recipe are explained.
The SurfaceTypes.xml
, defined in <CryENGINE_root>/<game_folder>/Libs/MaterialEffects/SurfaceTypes.xml
, defines the physical properties of all the available material types. It can be edited with any text editor. The MaterialEffects.xml
, which usually resides in<CryENGINE_root>/<game_folder>/Libs/MaterialEffects/MaterialEffects.xml
, defines the interaction of two materials as it defines what effect to generate on an interactive event between two surface...