MGS online documentation

Brush scripting tutorial

Brush scripting is based on L-systems. L-systems are text files that contain a set of iterative rules. These rules are interpreted in terms of brush scripting. In this tutorial you will learn how to configure the brush scripting parameters.

Start by loading the BasicStair.map prefab in the QERadiant/MGS/ directory.

Open the brush scripting dialog box:

Select the brushes. (notice that they are aligned along X-axis) You will be asked for an origin point, select it as shown below :

Enter the script name to execute. Use Stair.ls for your first try. You don't need changing the parameters for now. Your brushes are 64 units length along X-axis, and 16 units height (Z-axis) between each stair. You will get something like that :

Now repeat the same procedure with another script, SpiralStair.ls for example. Here you can use the angle parameter, that sets the basic angle rotation of the stair:

You will notice that MGS recomputes some faces of the selected brushes. Faces that can be changed during the process are YZ faces, that have an X value equal to your origin point's X value, or X+length. In some cases, you will need to disable this behaviour by setting the process parameter to 1.