calacirya

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