Material properties configuration

1. Usage

You can configure material properties using an XML file. This is useful to configure behavior that is naturally dependent on a given material or texture. Right now this allows to define things like:

See TMaterialProperties docs.

In code, you have to load this file like this:

uses ..., CastleMaterialProperties;
MaterialProperties.URL := ApplicationData('material_properties.xml');

It's usually best to do it as early as possible, for example at the beginning on Application.OnInitialize (if you use CastleWindow) or TForm.OnCreate (if you use CastleControl in Lazarus).

2. Example material_properties.xml file

This is a sample material_properties.xml file with links to documentation for every attribute.

<?xml version="1.0"?>

    Contains a list of <property> elements.
    Only the "texture_base_name" attribute is required, and it must be unique.

        time="0.0" />

    alpha_channel="TEST" />

  <!-- You can use as many <property> elements as you like... -->

  <!-- You can also use <auto_generated_textures> elements
       as documented in the next chapter: