Editing Renderware Objects
From ActiveWiki
Renderware objects have the unique feature of being formatted in a human readable form, this allows for easy editing and touch-ups of 3d objects without the need for potentially expensive or complicated editing software. All that is truly needed to start working on Renderware objects is a simple text editor and an object viewer.
Due to the fact that this document is being compiled specifically for use within the Active Worlds software, all supported commands will be listed here. Check the individual command pages for any special notes on compatibility if you plan on using this information with older versions of Active Worlds, or other software.
Contents |
[edit] Standard Renderware Commands
| Command | Function |
|---|---|
| # | Allows a comment to be placed within the Renderware file. |
| AddMaterialMode | Adds the specified material mode to the current material modes. |
| AddTextureMode | Adds the specified texture mode the the current texture modes. |
| Ambient | Defines the amount that the polygons will be affected by ambient lighting. |
| AxisAlignment | Defines if the object is to be a 'facer'. |
| Block | Creates a block (Cube for example). |
| ClumpBegin | Declares the beginning of a clump. |
| ClumpEnd | Defines the end of a clump. |
| Collision | Determines if the object should be solid or not. |
| Color | Defines the color of an objects polygons. |
| Cone | Creates a cone. |
| Cylinder | Creates a cylinder. |
| Diffuse | Defines how the objects polygons will be affected by diffuse lighting. |
| Disc | Creates a flat disc. |
| GeometrySampling | Defines the geometry sampling mode of the current material. |
| Hemisphere | Creates a hemisphere. |
| Identity | Sets the current transformation matrix to the identity matrix. |
| LightSampling | Defines how lighting should affect an object overall. |
| MaterialBegin | Sets the beginning of a new material. |
| MaterialMode | Defines the material mode of the current material. |
| MaterialEnd | Sets the end of a material, to revert to a previous definition. |
| ModelBegin | Defines the beginning of a model. |
| ModelEnd | Defines the end of a model. |
| Opacity | Sets the opacity (transparency) of the current material. |
| Prelight | In conjunction with the Vertex command, defines subtle lighting effects on objects. |
| ProtoBegin | Defines the start of a new prototype. |
| ProtoEnd | Defines the end of a prototype. |
| ProtoInstance | Calls upon a defined prototype. |
| ProtoInstanceGeometry | Calls upon a defined prototype, ignoring it's materials. |
| Quad | Creates a 4 sided polygon. |
| RandomUVs | Applies random UV coordinates to the object. |
| RemoveMaterialMode | Removes the specified mode from the current material modes. |
| RemoveTextureMode | Removes the specified mode from the current texture modes. |
| Rotate | Used with a transformation matrix, rotating it to a given angle. |
| Scale | Used with a transformation matrix, scaling it accordingly. |
| Seamless | Used to remove lighting and texturing artifacts on wrap around style objects. |
| Specular | Defines how polygons will be affected by specular lighting, currently not used. |
| Sphere | Creates a sphere. |
| Surface | Defines ambient, diffuse and specular lighting properties in one command. |
| Tag | Specifies a tag number to be called for special uses. |
| Texture | Defines the texture and mask used in the current material. |
| TextureAddressMode | Specifies the texture addressing mode to be used for all following textures. |
| TextureMipmapState | Specifies the mipmap state of all following textures. |
| TextureMode | Defines the texture mode to be used in the current material. |
| Transform | Replaces the current transformation matrix with the specified elements. |
| TransformBegin | Defines the beginning of a new transformation matrix. |
| TransformEnd | Defines the end of the current transformation matrix. |
| Translate | Moves the current transformation matrix. |
| Triangle | Creates a triangle based on 3 indexed vertices. |
| Vertex | Defines the position of a vertex within the object. |
[edit] Renderware Extensions
Beginning with version 3.0 of the Active Worlds software there has been support for some extensions to the Renderware scripting language. Because these commands did not exist in previous versions care should be used if you plan on needing backwards compatibility with older versions or other software.
To ensure backwards compatibility of files a special variation of the comment command was developed. The use of the comment character # followed immediately by an exclamation point (resulting in #!) will be ignored by older versions of the Active Worlds browser and other software. Newer versions will not read this as a comment, including any following commands when rendering.
In the simplest of terms, when using an extension in your file, it should always be preceded with a #! to ensure the broadest compatibility with your file.
[edit] Unsupported Renderware Commands
The following commands are not supported by the Active Worlds software. If any of these commands are used in the creation of your object they will be ignored by the rendering engine of the software, additionally some may cause an error message to be displayed.
- AddHint
- Hints
- Include
- IncludeGeometry
- RemoveHint
- TextureDithering
- TextureGammaCorrection
- Trace
- TransformJoint
[edit] Renderware File Structure
The simplest file that can be programmed in Renderware has the following form.
ModelBegin Clumpbegin surface 1 1 0 Texture texturename TextureModes Lit Vertex -.2 0 0 UV 0 1 Vertex -.2 .4 0 UV 0 0 Vertex .2 0 0 UV 1 1 Vertex .2 .4 0 UV 1 0 Quad 2 1 3 4 ClumpEnd ModelEnd
- Code explanation on a line by line basis
| Script | Function |
|---|---|
| ModelBegin | begin of renderware file. |
| Clumpbegin | begin of actual object definition |
| surface 1 1 0 | lighting definition |
| Texture texturename | name of texture file used for textured surfaces |
| TextureModes Lit | lighting mode of surfaces |
| Vertex -.2 0 0 UV 0 1 | first defined point in space with UV values |
| Vertex -.2 .4 0 UV 0 0 | second defined point |
| Vertex .2 0 0 UV 1 1 | etc |
| Vertex .2 .4 0 UV 1 0 | etc |
| Quad 2 1 3 4 | tells the renderer what surface to render, |
| in this case only a single surface, | |
| creating a single sided object. | |
| Could also be defines as two triangles. | |
| ClumpEnd | end of object definition |
| ModelEnd | end of model |
