home *** CD-ROM | disk | FTP | other *** search
-
-
- Light Magic Scene Description Language Reference Section.
- ==========================================================
-
-
- Version 2.0 of Light Magic has a greatly improved Scene Description Language to previous releases. Not only has the language
- become more versatile and powerful by offering greater control of Light Magic but has become more logical in its layout, allowing
- the user greater freedom to design scenes. The language is now almost totally free-format, meaning that the order in which items
- appear in the text is irrelavent. There is, however, one exception to this rule - a surface has to be defined before it can be
- used.
- In this section each of the commands available in the scene description language will be described in turn. Some of the
- commands require integer numbers, some require real numbers and others require ordinary text. In this reference section the
- following naming convention is followed :-
- Int - Integer required
- Real - Real number required
- Colour - This is equivalent to a red, green blue triple of Reals between 0 and 1. eg. 0 0.556 0.9 is a valid colour.
- Point - This is also a triple of Reals often consisting of the x, y and z coordinates of a point eg. 12 15.3 0.001
- 'Text' - A string of text is required. The single quotes are not required and are only included to seperate
- the text from the other section. Such a string can not exactly match any of the keywords.
- Keywords are shown in capital letters, eg. CAMERA is a keyword.
- Items enclosed in square brackets [] are optional.
- Where there is a choice between one set of commands and another, the two groups are enclosed in brackets {} and
- the brackets seperated by the 'C' OR symbol ||. eg {int} || {int int}
-
- An example file is included at the end of this reference section to help you understand the principles described.
-
- ============================================================================================================================
-
- List of keywords (Note :- These words are reserved and can not be used as strings.)
-
- AMBIENT ANGLE AT ....
- BACKGROUND BEAM BLOB BOX BUMP ....
- CAMERA CHECKED CONE CYLINDER ....
- DARK DEFAULT DIFFUSE ....
- EYE ....
- FALLOFF FROM FILETYPE FOG FUZZ ....
- GRIDSIZE ....
- HITHER ....
- JITTER ....
- LIGHT ....
- MARBLE MIRROR ....
- OFF ON OUTFILE ....
- PBM PHONG POINT POLYGON ....
- QUADRIC ....
- RAW RECURSION RESOLUTION RINDEX ROTATE ....
- SHADOWS SPECULAR SPHERE SPOT STATIC SURFACE ....
- TEXTURE TORUS TRANSLATE TRANSMIT TRANSFORM TRI ....
- UP ....
- VERBOSE ....
-
-
- The commands and their structure...
-
- CAMERA [FROM Point]
- [AT Point]
- [UP Point]
- [ANGLE Real]
- [HITHER Real]
-
- This command allows the user to set up the viewing camera that will be used to look at the scene. You may supply as many or as
- few of the parameters as you require, though it is recommended that you set FROM and AT to approriate values every time. FROM
- is the 3D coordinates of the camera actual location. AT is also a 3D point, representing the point at which the camera will be
- looking towards. UP tells the camera which direction should be regarded as upwards, relative to the camera. This defaults to
- the Z axis. ie. The Z axis will run vertically up the screen. ANGLE allows the viewing angle to be altered (default is 45
- degrees), while changing HITHER alters the distance from the camera to the view plane. This defaults to 1.
-
-
-
- RESOLUTION Int Int
-
- This command sets the resolution of the image produced. The two integers represent the X and Y resolution of the image
- respectivly. These can be any positive values, eg. 512 512. Light Magic always assumes that pixels are square. On the
- Archimedes I am using now, the x resolution of the screen is twice that of the y resolution, so to produce an accurate
- image I have to set the X resolution higher eg. 512 256.
-
- BACKGROUND Colour
- This command sets the colour of the areas of the picture that have no objects in them ie. the background or sky.
-
-
- GRIDSIZE Int
- This allows tight control of the amount of memory Light Magic uses when rendering an image. The higher the number, the
- more memory Light Magic will require to run, but the faster it will be able to render complex images. It is not worth setting
- this to be high when the number of objects is low (less than 10). A good, all round value, is about 40-50.
-
-
- JITTER
- Switches Jittered ray tracing on. Doing this will slightly improve the image quality but will result in rendering taking
- 9 times longer than normal! This algorithm is obviously not very efficent - I'm working on it!
-
-
- SHADOWS { ON } || { OFF }
- Tells Light Magic if it should bother calculating shadows while rendering the image. Swithching them off will be faster, but
- less realistic. Shodows become very slow when there is a great deal of glass in the scene.
-
-
- VERBOSE
- Puts Light Magic into Verbose mode. It will produce more information before rendering starts and print a '+' for every
- line of the image that is calculated.
-
-
- RECURSION Int
- Sets the maximum depth that Light Magic should continue to follow the path of rays before ignoring them as irrelavant.
- Each time a ray hits a mirrored object a new reflected
-
-
- DARK Real
-
-
- OUTFILE 'filename'
-
-
- FALLOFF Real
-
-
- FILETYPE { RAW } || { PBM }
-
-
- LIGHT POINT Point { Real } || { Colour }
-
-
- SPHERE 'surfacename' Point Real [ TRANSLATE Point]
- [ ROTATE Point Real]
- [ TRANSFORM Point Point Point]
-
-
- TRI 'surfacename' Point Point Point [ TRANSLATE Point]
- [ ROTATE Point Real]
- [ TRANSFORM Point Point Point]
-
-
- BOX 'surfacename' Point Point [ TRANSLATE Point]
- [ ROTATE Point Real]
- [ TRANSFORM Point Point Point]
-
-
- POLYGON 'surfacename' Int Point Point Point ... [ TRANSLATE Point]
- [ ROTATE Point Real]
- [ TRANSFORM Point Point Point]
-
-
-
- SURFACE 'surfacename' [ DIFFUSE Colour]
- [ MIRROR Colour]
- [ AMBIENT Colour]
- [ TRANSMIT Colour]
- [ RINDEX Real]
- [ SPECULAR Real]
- [ PHONG Int]
- [ FUZZ Real]
-
-
-
- DEFAULT 'surfacename' [ DIFFUSE Colour]
- [ MIRROR Colour]
- [ AMBIENT Colour]
- [ TRANSMIT Colour]
- [ RINDEX Real]
- [ SPECULAR Real]
- [ PHONG Int]
- [ FUZZ Real]
-
-
- TEXTURE { BLOB Real Real 'surfacename' } ||
- { CHECKED Real Real Real 'surfacename' } ||
- { BUMP Real } ||
- { MARBLE Real Real Real } ||
- { STATIC Real }
- [ TRANSLATE Point]
- [ ROTATE Point Real]
- [ TRANSFORM Point Point Point]