calacirya

view doc/scnfmt.tex @ 3:71a3eb026e80

writing the scene file spec
author John Tsiombikas <nuclear@mutantstargoat.com>
date Thu, 22 Sep 2011 02:23:50 +0300
parents 0c1aab0534c5
children
line source
1 \documentclass[a4paper]{article}
3 \title{ARDA \\
4 \large \emph{a 3D scene file format for the calacirya renderer}}
5 \author{}
6 \date{}
8 \begin{document}
9 \maketitle
11 \begin{abstract}
12 Arda is a scene description format for the calacirya photorealistic renderer.
13 It's a binary hierarchical chunk-based format, designed for simplicity and
14 extensibility.
15 \end{abstract}
17 \tableofcontents
18 \newpage
20 \section{Overview}
21 The ARDA file format is a hierarchical scene description for the
22 \emph{calacirya} photorealistic renderer. The idea behind
23 ARDA is to allow the core of the renderer to be completely oblivious about
24 the file format beyond the root, and just prune subtrees and pass them to other
25 modules for parsing. For instance, the core doesn't need to know anything about
26 how triangle meshes are structured, it just cuts off that whole subtree and
27 gives it to the mesh module for parsing.
29 \section{Chunk layout}
31 \begin{tabular}{ccl}
32 offs & size & description \\
33 0 & 4 & type id (four-cc) \\
34 4 & 4 & size (including header and children) \\
35 8 & size - 8 & data (chunk specific)
36 \end{tabular}
38 %defined chunk ids
39 %-----------------
40 %root "root"
41 %material "mtl "
42 %object "obj "
43 %camera "cam "
45 \section{Chunks}
47 A description of all predefined chunks follows.
49 \subsection{Root}
50 \begin{tabular}{rl}
51 chunk id: & ``root'' \\
52 data: & none \\
53 children: & object (0 or more), material (0 or more), camera (0 or more)
54 \end{tabular}
56 This is the root node of the scene graph. Allowable children are any number of
57 objects, materials, and cameras.
59 \subsection{Material}
60 \begin{tabular}{rl}
61 chunk id: & ``mtl '' \\
62 data: & none \\
63 children: & name (1), shader (0 or 1), material attribute (0 or more).
64 \end{tabular}
66 \subsection{Material attribute}
67 \begin{tabular}{rl}
68 chunk id: & ``matr'' \\
69 data: & none \\
70 children: & name (1), vec3 (0 or 1), float (0 or 1), texture (0 or 1).
71 \end{tabular}
73 The material attribute carries its value as a vec3 or a float or both,
74 modulated by a texture image.
77 \subsection{Name}
78 \begin{tabular}{rl}
79 chunk id: & ``name'' \\
80 data: & zero-terminated string of characters \\
81 children: & none
82 \end{tabular}
85 \end{document}