Escher User Guide

Escher is a system for modeling visually rich designs directly on the geometry of a 3D mesh imported from Alias Power Animator 8.x.  Escher does this by implementing a concept called Geometric Substitution pioneered by Dr. Andrew Glassner (now) of Microsoft Graphics Research Group.  It is very simple :  Any mesh is made of triangles.  To model a design on its geometry, you replace its triangles with a pattern.  This pattern is not a texture, but an another collection of triangles.  The resultant mesh thus has its integrity maintained and the arrangement of its triangles suggest a design to the eye.  The number of ways in which you can arrange a set of triangles is infinite and a pattern is defined as a particular arrangement of triangles -- therefore the user can create an infinite variety of patterns,  apply them to the mesh in layers and thus produce an infinite variety of designs.  

The Escher system has two programs:

patternEdit and
escher

patternEdit:

Description :

patternEdit is an interactive tool for constructing and editing patterns (See Figure 1).  The white triangle in Figure 1 represents any triangle of the input mesh.  It helps you decide the orientation of your pattern triangles when escher starts applying the pattern on the mesh. 

  editor.gif (7108 bytes)  
 

Figure 1

 

Using patternEdit:

patternEdit is a simple program.  Use the Create Triangle, Move Vertex and Delete Triangle tools to create, edit and delete pattern triangles.   You can build patterns from scratch or modify sample patterns that come with Escher. 

You can learn patternEdit very quickly and need no more help than the brief messages that appear on the status bar    However, when you save your patterns, make sure the file name you enter in the Save dialog ends with .pat.

About Complex Patterns:

The patterns you create and modify in patternEdit are what I call simple patterns.  They are just a collection of triangles.  When you layer two or more such simple patterns (or the same pattern over and over again), a complex pattern emerges.  Since a complex pattern is made by layering simple patterns together, it is also a collection of triangles.  In Figure 2, Gasket and Trole - I are simple patterns while Gastrole is a complex pattern formed by stringing Gasket and Trole - I together.

gasket.gif (2289 bytes) trole1.gif (2328 bytes) gastrole.gif (2078 bytes)
Gasket Trole - I Gastrol

Figure 2

patternEdit cannot handle complex patterns. Complex patterns are simple to create -- all you need is a text editor like Jot (on IRIX) or edit (on Windows NT) and knowledge of their simple syntax that follows:

complex
layers n
pattern_1 i_1
pattern_2 i_2

...

...

pattern_n i_n

In the first line, you indicate that the pattern is a complex pattern.  In the second line, you declare the number of layers your complex pattern will be made of.  In the subsequent lines, you list the simple pattern belonging to each layer and the number of times it must be applied.   Thats all.  You save the contents into a text file with a .pat extension.  

For example, these are the steps to create the complex pattern Gastrole shown in Figure 1.

Change to the directory where you have installed Escher
Open your favorite text editor
Type the following lines:

complex
layers 2
gasket 1
trole1 1
Save the text into a file named gastrole.pat
Exit your text editor

About Pattern Scripts:

You can model simple and complex patterns to different portions of the mesh by supplying escher (described below) pattern scripts.   Pattern Scripts are simple to create -- all you need is a text editor like Jot (on IRIX) or Edit (on Windows NT) and knowledge of their syntax that follows:

passes n
pattern_1    startFace_1     endFace_1      skipFace_1     distance_1      roughness_1     seed_1

--

--

pattern_n     startFace_n      endFace_n    skipFace_n      distance_n     roughness_n      seed_n

The number of passes is analogous to the number of portions on the mesh to which you want to model the patterns.  At the nth pass, pattern_n is modeled from startFace_n upto but not including endFace_n skipping every  skipFace_ndistance_n, roughness_n and seed_n determine whether the built-in terrain generator is activated.   If distance_n or roughness_n is 0, the terrain generator is not activated.  Please read the escher documentation below for a fuller understanding of pattern scripts.

escher:

Description:

escher is a command-line tool for modeling simple patterns, complex patterns and patterns from pattern scripts onto 3D meshes imported from Alias Power Animator 8.x.  

Using escher:

escher is a command-line tool with a syntax structure similar to such tools found in UNIX environments.  Figure 3 illustrates its syntax. 

escher <meshName> -p <patternName> or -S <scriptName> [ -o <outputName>  -f <startFace> -t <endFace> -n <skipFace>  -d <distance> -r <roughness> -s <seed> ]

Figure 3

 

meshName is the root name of the file containing the 3D mesh created and saved in Alias Power Animator 8.x.  This file confirms to the OBJ file format. 
patternName is the root name of the file containing a simple pattern or a complex pattern.  This file is a normal ASCII text file. 
scriptName is the name of the file containing a pattern script.  This file is a normal ASCII text file.
patternName and scriptName parameters are mutually exclusive but at least one must be supplied.
outputName is the root name of the file that holds the output mesh (ie) the input mesh that has the design modeled on it.  If this parameter is not supplied, the output mesh is stored in the file output.obj in the current directory.  The output mesh file confirms to the OBJ format and can be imported into Alias Power Animator 8.x for editing, rendering or animation.
startFace is the face from which escher starts modeling the pattern.  The first face of the mesh is 0 and not 1.
endFace is the face upto (but not including) which escher models the pattern.
skipFace is the number of faces escher skips after it has modeled a pattern on a face.

escher is capable of modeling patterned terrain.  The following parameters affect how the terrain looks:

distance determines the highest point on the terrain.  distance is any integer.  The default is 0
roughness, as the name implies, determines the roughness of the terrain.   It ranges from 0.0 to 1.0.  The default is 0.5.
seed is responsible for the randomness in the terrain.  By supplying the same seed value you can recreate a particular terrain.  seed is any integer.   The default is 100.

Examples:

GOOD EXAMPLES:

escher cube -pgasket causes the pattern gasket to be modeled on all faces of the cube

escher cube -pgasket -n2 causes the pattern gasket to be modeled on alternate faces of the cube

escher cube -pgasket -f0 -t4 causes the pattern gasket to be modeled on first 4 faces (0, 1, 2 and 3) of the cube .  The rest is discarded.

escher cube -Sscript causes the patterns defined in script to be modeled on the cube.

escher cube -pgasket -odesign causes the pattern gasket to be modeled on all faces of the cube.  The resultant mesh is saved in the file design.obj in the current directory.

escher /usr/people/woody/cube -p/usr/people/buzz/gasket -o/usr/people/bo/ans causes the pattern gasket [in /usr/people/buzz/gasket.pat] to be modeled on the cube [in /usr/people/woody/cube.obj] and the result saved into /usr/people/bo/ans.obj

escher plane -pterrainer -d2 -s2000 causes a patterned terrain to be produced.  If terrainer was a complex pattern containing the following definition:

layers 2
gasket 1
subdiv1 4

The resulting terrain is shown in Figure 4

perspterr.gif (14292 bytes)

Figure 4

BAD EXAMPLES:

escher cube -- patternName or scriptName must be supplied.  Both missing.

escher cube -p gasket -- A very subtle mistake.   There should be no space between p and gasket.  Therefore the CORRECT version is escher cube -pgasket

escher cube.obj -pgasket -- The .obj extension need not be supplied if the cube is stored in the file cube.obj.  However, this is correct if the file you are referring to is cube.obj.obj -- an unlikely case.

escher cube -pgasket.pat -- The .pat extension need not be supplied if the pattern gasket is stored in the file gasket.pat.  However, this is correct if the file you are referring to is gasket.pat.pat -- an unlikely case.

 

Best viewed in Netscape 4.x or IE 4.x @ 1024 | 768 | 16-bit colors
Please send bouquets or brickbats to sjagan@hotmail.com
Copyright (c) 1998 Jaganathan Sampath
All Rights Reserved


This page was last updated on: December 9, 1998
All content on this web site is dedicated to the luse