The format of the scene file is as follows:
1.Description of the view port:
1.Height of the view-port in VCS
2.Width of the view-port inVCS
3.UP vector for the VCS
4.View Plane Normal
5.Position of the eye in VCS
6.Origin of the VCS
2.We give 0's or 1's corresponding to whether an effect is to be generated or not along with any values if needed in the following order:
1.Threshold value for Adaptive Depth Control
1.Anti-aliasing
2.Anti-aliasing with jitter
3.Depth of Field
4.Depth of Field with Jitter
5.Aperture of the lens(value)
6.Focal length(value)
7.Distance of the plane to be brought in focus from viewport(value)
8.Optimize using octree
9.Maximum objects per leaf node of octree
10.soft shadows
11.soft shadows with jitter
12.Blurred reflections
13.Blurred reflections with jitter
14.Blurred refractions
15.Blurred refractions with jitter
3.Then we give values for some of the attributes like:
1.Background color in RGB
2.Ambient intensity in RGB
3.Number of point light sources:
For each light source its diffuse Intensity and position alternatively
4.Now we start defining the objects, for each object we give values of some common attributes first.
1.Type of the object e.g. 1(sphere), 2(cuboid), 3(rectangle parallel to XZ), 4(CSG object), 5(triangle), 6(infinite plane), 7(quadric), 8(polyhedron)
2.Now we write 0's or 1's for certain properties along with values of some like:
1.IsReflective
2.IsTransparent
3.Exponent of the specular ratio
4.Refractive Index
5.Ambient-reflection coefficient
6.Diffuse-reflection coefficient
7.Specular-reflection coefficient
8.Transmission coefficient
9.IsTextureMapped
10.IsBumpMapped
11.IsAffineTransformed:
if the object is transformed, the 4x4 transformation matrix is then given
12.Color of the object
3.Now depending on different objects we give various values like:
1.Sphere
position of center and then radius
2.Cuboid
minimum values of x y and z and its thickness in the three directions
3.Rectangle parallel to XZ
xmin,xmax,zmin,zmax,y
4.CSG
operation (0:union 1:intersection 2:difference)
5.Triangle
The three vertices
6.Infinite plane
Apoint passing through plane and the normal to the plane
7.General Quadrics
Coefficients of x2 y2 z2 xy xz yz x y z and constant.
8.Polyhedron
1.Number of vertices
2.Number of faces
3.All 3-D vertices in sequence
4.All triplets corresponding to the faces where in each value in the triplet is the index of the corresponding vertex in the Vertex array (vertices given in anticlockwise order to find the normal easily).