62
  Modeling
  RWX scripting - Tutorials part 1
 
1. Commands concerning the structure of the script
 
Modelbegin
 
This command is used at the beginning of the object
 
Modelend
 
This command is used at the end of the object
 
Clumpbegin
 
This command is used at the beginning of the construction part of the object.
 
Clumpend
 
This command is used at the end of the construction part of the object.
 
Protobegin
 
This command is used for the start of a new prototype
A prototype is a collection of vertices,polygons and materials that can be used repeatedly in the same object. (e.g. the legs of a table).
 
Protoend
 
This command is used for the end of a prototype
2. Commands concerning the object parts
 
Vertex
 
This command determines a point in the 3d model, indicated with 3 dimensions :
(x=width y=height z=depth)
This vertex can be follewed by the command UV.
vertex -.4 0 .4
 
UV
 
This command defines the size of the texture
vertex -.4 0 .4 uv 1 1
 
Quad
 
This command is used to connect 4 vertex points with eachother, creating a square surface. (a 4-sided polygon)
quad 1 2 3 4
 
Triangle
 
This command is used to connect 3 vertex points with eachother, creating a triangular surface.
triangle 1 2 3
 
Tag 100
 
This command is typed after a quad or triangle , and creates a surface that can be used to type text. In Activeworlds , such object are called sign objects.
quad 1 2 3 4 tag 100
 
Tag 200
 
This command is typed after a quad or triangle , and creates a surface that can be used to add an image. In Activeworlds , such object are called picture objects.
quad 1 2 3 4 tag 200
  Distances for .rwx
   
  In Renderware, the distances are in decameters. This means, if you want an object of 4 meters wide, then you need to type .4
   
 
RWX Activeworlds
1 10 meters
0.1 1 meter
0.01 10 cm
0.001 1 cm
3. Commands concerning primitives
 
Block
 
This command creates a block (e.g. a cube)
(x=width y=height z=depth)
block .1 .2 .1
 
Cone
 
This command creates a cone
(x=width y=height z=depth)
cone .1 0.05 5
 
Cylinder
 
This command creates a cone
cylinder 0.1 0.05 0.025 8
In this case : 1m high, 1m diameter at the bottom, 0.5m at the top , and 8-sided.
 
Sphere
 
This command creates a sphere
sphere 0.05 3
The first value is the radius of the sphere (of 1m diameter)
The second value is the density (of the polygons).
 
Hemisphere
 
This command creates a hemisphere
hemisphere 0.05 3
The first value is the radius of the sphere (of 1m diameter)
The second value is the density (of the polygons).
 
Disc
 
This command creates a flat disc
disc 0.1 0.05 8
The first value is for the displacement from the ground : 1meter
The second value is radius -> diameter of 1 meter
The third value is the number of sides of the disc
  Texture
   
  The command texture must precede the command of the primitive, otherwise the pirmitive will be without texture !