\documentclass[a4paper]{article}

\title{ARDA \\
\large \emph{a 3D scene file format for the calacirya renderer}}
\author{}
\date{}

\begin{document}
\maketitle

\begin{abstract}
Arda is a scene description format for the calacirya photorealistic renderer.
It's a binary hierarchical chunk-based format, designed for simplicity and
extensibility.
\end{abstract}

\tableofcontents
\newpage

\section{Overview}
The ARDA file format is a hierarchical scene description for the
\emph{calacirya} photorealistic renderer. The idea behind
ARDA is to allow the core of the renderer to be completely oblivious about
the file format beyond the root, and just prune subtrees and pass them to other
modules for parsing. For instance, the core doesn't need to know anything about
how triangle meshes are structured, it just cuts off that whole subtree and
gives it to the mesh module for parsing.

\section{Chunk layout}

\begin{tabular}{ccl}
offs 	& size	& description \\
0		& 4		& type id (four-cc) \\
4		& 4		& size (including header and children) \\
8		& size - 8 & data (chunk specific)
\end{tabular}

%defined chunk ids
%-----------------
%root		"root"
%material	"mtl "
%object		"obj "
%camera		"cam "

\section{Chunks}

A description of all predefined chunks follows.

\subsection{Root}
\begin{tabular}{rl}
chunk id: & ``root'' \\
data: & none \\
children: & object (0 or more), material (0 or more), camera (0 or more)
\end{tabular}

This is the root node of the scene graph. Allowable children are any number of
objects, materials, and cameras.

\subsection{Material}
\begin{tabular}{rl}
chunk id: & ``mtl '' \\
data: & none \\
children: & name (1), shader (0 or 1), material attribute (0 or more).
\end{tabular}

\subsection{Material attribute}
\begin{tabular}{rl}
chunk id: & ``matr'' \\
data: & none \\
children: & name (1), vec3 (0 or 1), float (0 or 1), texture (0 or 1).
\end{tabular}

The material attribute carries its value as a vec3 or a float or both,
modulated by a texture image.


\subsection{Name}
\begin{tabular}{rl}
chunk id: & ``name'' \\
data: & zero-terminated string of characters \\
children: & none
\end{tabular}


\end{document}
