RGL file format specification


The RGL format is a binary file format containing a scene rendered by RadiosGL. The file contains coordinate information and texture information for each triangular patch in the scene. The textures are produced by the RadiosGL rendering process and contain all lighting and shading information necessary to render views of the scene. Binary number values are stored in big-endian format (high-order bytes first). A symbolic representation of the file format follows:

num_patches


v1x v1y v1z
v2x v2y v2z
v3x v3y v3z

text_size_x text_size_y
v1_anchor_x v1_anchor_y
v2_anchor_x v2_anchor_y
v3_anchor_x v3_anchor_y
pixel_1_r pixel_1_g pixel_1_b
pixel_2_r pixel_2_g pixel_2_b
pixel_3_r pixel_3_g pixel_3_b
.....


.....


v1x v1y v1z
v2x v2y v2z
v3x v3y v3z

text_size_x text_size_y
v1_anchor_x v1_anchor_y
v2_anchor_x v2_anchor_y
v3_anchor_x v3_anchor_y
pixel_1_r pixel_1_g pixel_1_b
pixel_2_r pixel_2_g pixel_2_b
pixel_3_r pixel_3_g pixel_3_b
.....


num_patchesa 32-bit integer describing the number of patches in the file
vnx, vny, vnz, n in {1,2,3}32-bit floating point values representing the x, y, and z coordinates of the nth vertex of a patch
text_size_x, text_size_y32-bit integers representing the size of the texture for this patch
vn_anchor_x, vn_anchor_y, n in {1,2,3}32-bit integers representing the anchor coordinates for each vertex on the texture for this patch
pixel_n_r, pixel_n_g, pixel_n_b, n in {1,2,...}8-bit unsigned integers representing the red, green, and blue components for each pixel in the texture for this patch