source: GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/doc/userManual/tex/userManual.tex @ 963

Revision 963, 24.3 KB checked in by igarcia, 18 years ago (diff)
Line 
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2% Author: Ismael García Fernández
3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4%-------------------------------------------------------------------
5% Formato del documento
6\documentclass[10pt,a4paper,english,twoside]{book}
7\usepackage[a4paper]{geometry}
8\usepackage{color}
9\usepackage{floatflt}
10\usepackage{subfigure}
11\usepackage{listings}
12\usepackage{url}
13\ifx\pdfoutput\undefined
14  \usepackage[dvips]{graphicx}
15\else
16  \usepackage[pdftex]{graphicx}
17\fi
18\usepackage{epstopdf}
19\ifx\pdfoutput\undefined
20\usepackage[ps2pdf,
21            pagebackref=true,
22            colorlinks=true,
23            linkcolor=blue
24           ]{hyperref}
25\else
26\usepackage[pdftex,
27            pagebackref=true,
28            colorlinks=true,
29            linkcolor=blue
30           ]{hyperref}
31\fi
32
33\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}}
34
35%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
36\begin{document}
37
38%-------------------------------------------------------------------
39
40\begin{titlepage}
41
42\vspace*{1cm}
43\begin{center}
44{\huge IBR Billboard Cloud Tree Generator}\\
45\vspace*{1cm}
46{\Huge Documentation}\\
47%{\huge{\today}}
48%\vspace*{1cm}
49\end{center}
50\begin{figure}[!hbtp]
51\centering
52\includegraphics[scale=0.2]{../figures/gametoolsLogo.png}
53\end{figure}
54
55\vspace*{2cm}
56
57\begin{figure}[!hbtp]
58\centering
59\includegraphics[scale=0.3]{../figures/chestnutShadowMapping.png}
60\end{figure}
61
62\end{titlepage}
63
64%-------------------------------------------------------------------
65
66% Índice general del proyecto
67\clearemptydoublepage
68\tableofcontents
69\thispagestyle{plain}
70\clearemptydoublepage
71
72% Índice de figuras del proyecto
73\setcounter{lofdepth}{2}
74\listoffigures
75\thispagestyle{plain}
76\clearemptydoublepage
77
78% Índice de tablas del proyecto
79%\listoftables
80%\thispagestyle{plain}
81%\clearemptydoublepage
82
83%-------------------------------------------------------------------
84
85%\chapter{User Manual}
86
87%User manual...
88%
89%\section{Installation}
90%
91%Installation...
92%
93%\section{Getting Started}
94%
95%Getting Started...
96%
97%\section{Frequently Asked Questions}
98%
99%Frequently Asked Questions...
100%
101%\section{Troubleshooting}
102%
103%Troubleshooting...
104
105\chapter{Reference Manual}
106
107%\section{Features}
108%
109%Features...
110
111\section{Introduction}
112
113The \emph{IBR Billboard Cloud Tree Generator} provides a set of
114tools creating and preview tree 3d models for being used in
115real-time applications. The generated tree is thus represented by a
116set of billboards, called billboard cloud. The billboards are built
117automatically by a clustering algorithm.
118
119Unlike classical billboards, the billboards of a billboard cloud are
120not rotated when the camera moves, thus the expected occlusion and
121parallax effects are provided. On the other hand, this approach
122allows the replacement of a large number of leaves by a single
123semi-transparent quadrilateral, which considerably improves the
124rendering performance. A billboard cloud well represents the tree
125from any direction and provides accurate depth values, thus the
126method is also good for shadow.
127
128The billboard cloud decomposes the original object into subsets of
129patches and replaces each subset by a billboard (See figure
130\ref{IBRBBCGenToolSteps}). These billboards are fixed and the final
131image is the composition of their images (See figure
132\ref{leafClustered}).
133
134\begin{figure}[!htbp]
135\centering
136\includegraphics[scale=0.30]{../figures/leafClustered.png}
137\caption{Billboard image generation.}
138\label{leafClustered}
139\end{figure}
140
141\begin{figure}[!htbp]
142\centering
143\includegraphics[scale=0.30]{../figures/IBRBBCGenToolSteps.png}
144\caption{Decomposition of the original leaves model.}
145\label{IBRBBCGenToolSteps}
146\end{figure}
147
148The method \cite{leafClusterImpostorsEG2005} falls into the class of
149billboard clouds, but it prepares the billboards automatically and
150so carefully that the results are satisfactory not only on vehicle
151scale, but also on human scale, and with some compromises on insect
152scale as well. Since the billboard cloud model has been proposed to
153model conventional man-made 3D objects, such as teapots,
154helicopters, etc., we have to alter their construction to take into
155account the special geometry of natural phenomena.
156
157\begin{figure}[!htbp]
158\centering
159\includegraphics[scale=0.20]{../figures/chestnutSample.png}
160\caption{Visual and speed comparisons of the original polygonal tree
161and the tree rendered with different number of billboards.}
162\end{figure}
163
164\section{Application components overview}
165
166The \emph{IBR Billboard Cloud Tree Generator} has been developed
167using the Ogre3D graphic engine, being compatible with both, the
168OpenGL and Direct3D render systems, the other optional dependency is
169OpenEXR. The system has been tested under Windows but there
170shouldn't be big problems for making it to work under Linux or Mac
171platforms.
172
173\begin{figure}[!htbp]
174\centering
175\includegraphics[scale=0.30]{../figures/IBRBillboardCloudTreeGenerationToolBlocksDiagram.png}
176\caption{\emph{IBR Billboard Cloud Tree Generator} standard
177dependencies.} \label{applicationDependencies}
178\end{figure}
179
180\section{Typical Use Case}
181
182Create a tree suitable for real-time rendering must take in care
183some restrictions, basically the polygon and texture memory used.
184The sample tree shown \ref{originalDataManagement} has 11291 leaves
185defined by defined by 112910 faces and 338731 vertices. The trunk of
186the tree has 46174 faces. Current graphic hardware can't handle a
187forest using this tree model. In these cases this tool is being
188necessary.
189
190\begin{figure}[!htbp]
191\centering
192\includegraphics[scale=0.30]{../figures/originalDataManagement.png}
193\caption{Sample polygonal tree decomposed in two models. The leaves
194model will be processed with the IBR Billboard Cloud Tree
195Generator.}
196\label{originalDataManagement}
197\end{figure}
198
199\begin{figure}[!htbp]
200\centering
201\includegraphics[scale=0.30]{../figures/inputAndOutputForIBRBBCGenTool.png}
202\caption{} \label{inputAndOutputForIBRBBCGenTool}
203\end{figure}
204
205
206\begin{enumerate}
207\item The 3d content creator at first have to create a high\-detailed tree
208with some of the available tools, such as Xfrog or Pov\-Tree. (See
209\cite{xfrog} and \cite{povtree}). However you can use some of the
210great Xfrog public plants \cite{xfrogpublicplants} instead.
211
212\item Then the high\-detailed tree model should be decomposed in two,
213the leaves and the trunk models. (See figure
214\ref{originalDataManagement})
215
216\item The leaves model must be converted into the Ogre3D Mesh file
217format, there are exporters available for the main 3D DCC, such as
218Maya or 3ds Max \footnote{Check the Ogre 3D webpage
219\url{http://www.ogre3d.org} in the \emph{Downloads} / \emph{Tools}
220section}.
221\end{enumerate}
222
223The trunk model won't be processed with the generator tool and the
224designer must create a set of levels of detail of the original mesh
225using a simplification sofware.
226
227The \emph{IBR Billboard Cloud Tree Generator} receives as input the
228leaves model and the texture used to map each leaf (See figure
229\ref{inputAndOutputForIBRBBCGenTool}).
230
231The output generated is a billboard cloud mesh and three texture
232atlas as described here:
233
234\begin{itemize}
235
236\item The billboard cloud model that replaces the original leaves
237model. The billboard cloud model will be used in with two techniques
238described in section \ref{usedInGames} in the in\-game
239visualization.
240
241\item The texture atlas that contains the diffuse color texture
242atlas that contains all the textures that will be used with the
243billboard cloud mesh. This texture will be used by the lower\-end
244technique with standard texture mapping.
245
246\item The rotated leaf texture atlas, that contains the leaf placed
247with different orientations.
248
249\item The leaves distribution atlas texture. This texture will be
250used with the rotated leaf texture atlas in the technique
251\emph{indirect texturing technique} detailed in section
252\ref{indirectTexturingSection}.
253
254\end{itemize}
255
256The \emph{IBR Billboard Cloud Tree Generator}, is a command\-line
257application managed through configuration files. For each kind of
258tree we want to process we should create a configuration file.
259
260The application must have as input parameter the configuration file
261as shown here:
262
263\scriptsize
264\begin{lstlisting}[frame=tb]
265IBRBillboardCloudTreeGeneratorCmd.exe -cfg
266../../media/chestnut/leaves/sample.cfg
267\end{lstlisting}
268
269\normalsize
270These configuration files contain all the parameters you have to
271specify in order to obtain the desired output.
272
273Those parameters can be sumarized as:
274
275\begin{itemize}
276\item The media folders parameters.
277\item The input files parameters.
278\item The output files parameters.
279\item The application parameters.
280\end{itemize}
281
282\section{Media folders}
283
284\begin{itemize}
285\item \textbf{Input folders:}
286
287\scriptsize
288\begin{lstlisting}[frame=tb]
289# Folder where the sample input leaves model can be found...
290Entities Folder ../../media/chestnut/leaves/
291
292# Folders where the sample temporary data will be stored... Entity
293Distribution Folder ../../media/chestnut/leaves/
294
295Entity Clusters Folder ../../media/chestnut/leaves/
296
297# Folder where the sample output files will be stored... Billboard
298Cloud Folder ../../media/chestnut/leaves/
299\end{lstlisting}
300
301\normalsize
302
303
304\item \textbf{Temporary folders:}
305
306\scriptsize
307\begin{lstlisting}[frame=tb]
308# Folders where the sample temporary data will be stored...
309Entity
310Distribution Folder ../../media/chestnut/leaves/
311
312Entity Clusters Folder ../../media/chestnut/leaves/
313\end{lstlisting}
314
315\normalsize
316
317
318\item \textbf{Output folders:}
319
320\scriptsize
321\begin{lstlisting}[frame=tb]
322# Folder where the sample output files will be stored...
323Billboard
324Cloud Folder ../../media/chestnut/leaves/
325\end{lstlisting}
326
327\normalsize
328\end{itemize}
329
330\subsection{Input files parameters}
331
332\scriptsize
333\begin{lstlisting}[frame=tb]
334# This is the sample input leaves model filename
335Entities Mesh Name
336chestnutLeaves.mesh
337
338# This is the sample input leaf texture filename
339Entity Clusters
340Grouped Texture Unit 0 Name chestnutLeaf.png
341\end{lstlisting}
342
343\normalsize
344
345
346\subsection{Output files parameters}
347
348\begin{itemize}
349
350\item \textbf{Rotated leaf texture atlas parameters:}
351
352\scriptsize
353\begin{lstlisting}[frame=tb]
354# This is the sample input leaf texture filename
355Diffuse Color
356Entity Texture Name chestnutLeaf.png
357
358# The output texture atlas file name
359Diffuse Color Entity Texture
360Atlas Name chestnutRotatedLeafAtlas.png
361
362# The output texture atlas bit range (8 bits, 16 bits, 32 bits per
363channel)
364Diffuse Color Entity Texture Atlas Bit Range 8
365
366# The output texture altas size in pixels
367Diffuse Color Entity
368Texture Atlas Size 512
369
370# The number of textures with different leaf orientations we want
371Diffuse Color Entity Texture Atlas NumSamples 16
372\end{lstlisting}
373
374\normalsize
375
376
377\item \textbf{Diffuse color texture atlas parameters:}
378
379\scriptsize
380\begin{lstlisting}[frame=tb]
381# The output texture atlas file name
382Diffuse Color Texture Atlas
383Name diffuseColorAtlas.png
384
385# The output texture atlas bit range (8 bits, 16 bits, 32 bits per
386channel)
387Diffuse Color Texture Atlas Bit Range 8
388
389# The output texture altas size in pixels
390Diffuse Color Texture Atlas
391Size 1024
392
393# The size of each billboard texture in the texture
394atlas
395Diffuse Color Texture Size 16
396\end{lstlisting}
397
398\normalsize
399
400
401\item \textbf{Leaves distribution texture atlas parameters:}
402
403\scriptsize
404\begin{lstlisting}[frame=tb]
405# The output texture atlas file name
406Indirect Texture Atlas Name
407indirectTextureAtlas.png
408
409# The output texture atlas bit range (8 bits, 16 bits, 32 bits per
410channel)
411Indirect Texture Atlas Bit Range 8
412
413# The output texture altas size in pixels
414Indirect Texture Atlas
415Size 1024
416
417# The size for each billboard texture in the texture atlas
418Indirect
419Texture Size 16
420\end{lstlisting}
421
422\end{itemize}
423
424\normalsize
425
426
427\subsection{Application parameters}
428
429\scriptsize
430\begin{lstlisting}[frame=tb]
431# This is the maximum number of billboards desired
432Entity Clusters
433MaxClusters 1024
434\end{lstlisting}
435
436\normalsize
437
438\section{Keyboard Controls}
439
440\textbf{Navigation controls:}
441\begin{itemize}
442\item \textbf{Key F1:} Enable \emph{Diffuse Color Texture Atlas View Mode}.
443\item \textbf{Key F2:} Enable \emph{Indirect Texture Atlas View Mode}.
444\item \textbf{Key F3:} Enable \emph{Rotated Leaf Texture Atlas View Mode}.
445\item \textbf{Key F4:} Enable \emph{Billboard Cloud Final View Mode}.
446\item \textbf{SPACE:} This key iterate along all the billboards
447generated to see how each group of leaves have been placed on it.
448This key is working only in the \emph{Diffuse Color Texture Atlas
449View Mode} and \emph{Indirect Texture Atlas View Mode}.
450\end{itemize}
451
452\textbf{Navigation controls:}
453
454This controls are enabled only in the \emph{Billboard Cloud Final
455View Mode}. With them you can go around the billboard cloud, using
456the mouse as the looking forward direction.
457
458\begin{itemize}
459\item \textbf{Key E/Key D:} Accelerate/Brake
460\item \textbf{Key S/Key F:} Turn
461\item \textbf{Key PGUP/Key PGDOWN:} Shift
462\end{itemize}
463
464\textbf{Special controls controls:}
465
466This controls are enabled only in the \emph{Billboard Cloud Final
467View Mode}. With them you can tweak the indirect texturing leaf
468texture position. This is explained in detail in section
469\ref{usedInGames}.
470
471\begin{itemize}
472\item \textbf{Key UP/Key DOWN:} Move up/down the leaf texture.
473\item \textbf{Key RIGHT/Key LEFT:} Move rigth/left the leaf texture.
474\end{itemize}
475
476\section{Using IBR Billboard Cloud Trees in Games}
477\label{usedInGames}
478
479For using the billboard cloud trees in games, two techniques are
480shown:
481
482\begin{itemize}
483\item \textbf{Standard texturing technique}: Use only diffuse color
484texture atlas generated. This technique is for low-end graphic
485cards.
486\item \textbf{Indirect texturing technique}: This technique uses the
487rotated leaf texture atlas and the leaves distribution texture atlas
488in order to have hight resolution rendered leaves.
489\end{itemize}
490
491\begin{figure}[!htbp]
492\centering
493\includegraphics[scale=0.50]{../figures/directTexturingData.png}
494\caption{Diffuse color texture atlas that contains all the billboard
495textures. This texture atlas is used in the \emph{Standard texturing
496technique}.}
497\end{figure}
498
499\begin{figure}[!htbp]
500\centering
501\includegraphics[scale=0.40]{../figures/indirectTexturingData.png}
502\caption{Leaves distribution texture atlas and rotated leaf texture
503atlas. These texture atlases are used in the \emph{Indirect
504texturing technique}}
505\end{figure}
506
507We will cover only the \emph{Indirect texturing technique} more in
508detail, because the \emph{direct texturing technique} is
509straightforward.
510
511\subsection{Indirect texturing technique}
512\label{indirectTexturingSection}
513
514The indirect texturing technique is an only one pass technique.
515
516\begin{itemize}
517\item [(A)] the billboard cloud is the input geometry. The billboard cloud model
518generated with the \emph{IBR Billboard Cloud Tree Generator} encodes
519some information in the the \emph{TEXCOORD0} and \emph{COLOR0}
520parameters.
521    \begin{itemize}
522    \item \textbf{COLOR0:} Encodes the billboard coordinates in the range [0,0] - [1,1]. They are used to compute the current rotated leaf coordinates respect the leaf top-left corner stored in \emph{(r,g)}.
523    \item \textbf{TEXCOORD0:} Encode the texture coordinates that tells us where the billboard texture is in the leaves distribution texture atlas.
524    \end{itemize}
525\end{itemize}
526
527\begin{figure}[!htbp]
528\centering
529\includegraphics[scale=0.25]{../figures/inGameDiagram.png}
530\caption{This is the diagram showing the indirect texturing
531rendering pass. Where \emph{A} is the billboard cloud geometry,
532\emph{B} is the rotated leaf texture atlas and \emph{C} is the
533leaves distribution texture.}
534\end{figure}
535
536The render state block has the following configuration:
537
538\begin{itemize}
539\item ALPHAFUNC = CMP\_GREATER\_EQUAL
540\item ALPHAREF = 110
541\item ALPHATESTENABLE = TRUE
542\item CULLMODE = CULL\_NONE
543\end{itemize}
544
545For each texture unit:
546
547\begin{itemize}
548\item [(B)] Rotated leaf texture:
549    \begin{itemize}
550    \item TEXTURE FORMAT = A8R8G8B8
551    \item MAGFILTER = ANISOTROPIC
552    \item MINFILTER = ANISOTROPIC
553    \item MIPFILTER = ANISOTROPIC
554    \end{itemize}
555
556\item [(C)] Leaves distribution texture:
557    \begin{itemize}
558    \item TEXTURE FORMAT = A8R8G8B8
559    \item MAGFILTER = POINT
560    \item MINFILTER = POINT
561    \item MIPFILTER = NONE
562    \end{itemize}
563\end{itemize}
564
565\begin{enumerate}
566\item During the rendering pass, the leaf distribution texture is accessed using the \emph{TEXCOORD0 (u,v)}
567coordinates.
568\item
569    \begin{itemize}
570    \item [(a)] If the value stored in the \emph{a} channel equal to 0, then this texel is not indexing a leaf position inside the
571    billboard. Therefore will be rendered as a transparent texel
572    above the billboard plane.
573    \item [(b)]
574    \begin{itemize}
575    \item [1.] Else if the \emph{a} channel is not equal to 0, the stored coordinates at \emph{(r,g)} will be the top-left coordinates of the position where the leaf will be shaded.
576    \item [2.] Using the leaf orientation top-left coordinates, stored in \emph{(b,a)}, we will lookup from the rotated leaf texture atlas the desired one.
577    \end{itemize}
578    \end{itemize}
579\end{enumerate}
580
581\begin{figure}[!htbp]
582\centering
583\includegraphics[scale=0.45]{../figures/indirectTexturingAlgorithm.png}
584\caption{Indirect texturing. The billboard is replaced by a leaf distribution impostor and the rotated images of the leaves. All the texels that represents one leaf in the leaf distribution impostor has the same information the (r,g) top-left leaf coordinates and the (b,a) top-left rotated leaf coordinates.}
585\end{figure}
586
587\scriptsize
588
589\begin{lstlisting}[frame=tb]
590// Indirect texturing vertex shader
591struct VS_OUTPUT {
592   float4 Pos:       POSITION;
593   float2 texCoord:  TEXCOORD0;
594   float2 subTexCoord: TEXCOORD1;
595};
596
597
598float4x4 worldviewproj;
599
600VS_OUTPUT IndirectTexturing_VS(
601      float4 position: POSITION,
602      float2 subTexCoord: TEXCOORD0,
603      float4 color: COLOR
604      )
605{
606    VS_OUTPUT Out;
607
608    Out.Pos = mul(worldviewproj, position);
609    Out.subTexCoord = subTexCoord;
610    Out.texCoord = color.xy;
611    return Out;
612}
613\end{lstlisting}
614
615\scriptsize
616
617\begin{lstlisting}[frame=tb]
618// Indirect texturing pixel shader
619sampler indirectTexture: register(s0); // leaves impostor distribution texture atlas
620sampler sourceTexture: register(s1);   // rotated leaf texture atlas
621
622// epsilon value for the leaf position correction
623uniform float epsilonX;
624uniform float epsilonY;
625
626uniform float sourceTextureSize;       // billboard texture size in the leaves impostor
627                                       // distribution texture atlas
628
629uniform float sqrtNumSamples;          // Sqrt(numberLeaves) in the rotated leaf texture atlas
630
631float4 IndirectTexturing_PS(float2 texCoord: TEXCOORD0,
632                            float2 subTexCoord: TEXCOORD1) : COLOR
633{
634   // Default transparent fragment (fragment without leaf)
635   float4 ocolor = float4(0.0, 0.0, 0.0, 0.0);
636   // Leaf position correction value
637   float2 epsilon = float2(epsilonX, epsilonY);
638   // Look-up the leafPositionUVTopLeftCorner and leafRotationUVTopLeftCorner
639   // using subTexCoord, which tells where the billboard texture is in
640   // the leaves distribution texture atlas
641   // * leafPositionUVTopLeftCorner <=> leafInfo.xy
642   // * leafRotationUVTopLeftCorner <=> leafInfo.zw
643   float4 leafInfo = tex2D(indirectTexture, subTexCoord).xyzw;
644   // Leaf UV current coordinates (range [0,0] - [1,1])
645   // Using texCoord (billboard coordinates in the range [0,0] - [1,1])
646   // we can compute the current leaf coordinates respect the leafPositionUVTopLeftCorner
647   float2 leafPositionUVCoord = float2(0.0, 1.0) -
648                                abs(texCoord - (leafInfo.xy - epsilon ) );
649   // We found a leaf?
650   if (leafInfo.w != 0.0)
651   {
652       // Conversion from [0,0] - [1,1] to [i,j] - [i+(1/sqrtNumSamples),j+(1/sqrtNumSamples)]
653       // In order to look-up the leaf with the choosen orientation from the rotated leaf
654       // texture atlas
655    float2 leafRotationUVCoord = (float2(1.0, 1.0) - leafInfo.zw) +
656                         ((leafPositionUVCoord * sourceTextureSize) / sqrtNumSamples);
657    ocolor = float4(tex2D(sourceTexture, newcoord).xyzw);
658   }
659   return  ocolor;
660}
661\end{lstlisting}
662
663\normalsize
664
665The billboard cloud trees has been used in two applications:
666
667\begin{itemize}
668\item Ogre Demo: Developers how will work with Ogre3D should take a
669special look into this demo. The demo has been tested under OpenGL
670and DirectX using GLSL/Cg Cg/HLSL shaders respectively.
671
672\item RenderMonkey Effect: This demo has the same effects as the the
673Ogre3D Demo, using GLSL/HLSL shaders. This application should be
674easiest to understand for those developers who want to use this
675technique with other game engines and applications.
676\end{itemize}
677
678\begin{figure}[!htbp]
679  \begin{center}
680    \begin{tabular}{c}
681      \resizebox{80mm}{!}{\includegraphics{../figures/wforest_02_03.png}} \\
682      \resizebox{80mm}{!}{\includegraphics{../figures/result01.png}} \\
683    \end{tabular}
684    \caption{Screenshots of the Ogre Demo application.}
685    \label{romanicoRT}
686  \end{center}
687\end{figure}
688
689\begin{figure}[!htbp]
690\centering
691\includegraphics[scale=0.30]{../figures/renderMonkey.png}
692\caption{Screenshot of the RenderMonkey indirect texturing effect.}
693\end{figure}
694
695The indirect texturing technique is good also for shadows. The Ogre
696Demo has been implemented using Texture Modulative / Additive
697Shadows and Depth Shadow Mapping.
698
699\begin{figure}[!htbp]
700\centering
701\includegraphics[scale=0.40]{../figures/wforest_02_02.png}
702\caption{Ogre Demo application with texture modulative shadow
703mapping.}
704\end{figure}
705
706\subsection{Implementation Issues:}
707
708\textbf{Billboard cloud mesh TEXCOORD0 and COLOR0 parameters:}
709
710The billboard cloud mesh generated by the IBR Billboard Cloud Tree
711Generator can be used for both techniques, the standard texture
712mapping and the indirect texturing one.
713
714The pixel shader used in the standard texture mapping technique will
715only use the TEXCOORD0 parameter. And the indirect texturing pixel
716shader will use both the COLOR0 and TEXCOORD0 parameters.
717
718\subsubsection{Incorrect leaf placement with indirect texturing:}
719
720One problem that can appear is due to the wrong placement of the
721leaf texture, this can be avoided adjusting an epsilon shift
722displacement.
723
724\begin{figure}[!hbtp]
725  \begin{center}
726    \includegraphics[scale=0.40]{../figures/epsilonTweaking.png}
727    \caption{The first picture shows the result of the indirect texturing before fixing the shift displacement that should be used. In the second picture all the leaves are placed correctly. Those views are from the IBR Billboard Cloud Tree Generator, and with the key controls UP/DOWN and RIGHT/LEFT in the Billboard Cloud Final View Mode this small epsilon is applied. The numeric value applied appears at the bottom of the screen. This epsilon should be used as a uniform float2 parameter of the indirect texturing pixel shader. In the RenderMonkey Demo you can tweak this value directly.}
728    \label{romanicoRT}
729  \end{center}
730\end{figure}
731
732\begin{figure}[!htbp]
733\centering
734   \begin{tabular}{c}
735      \resizebox{100mm}{!}{\includegraphics{../figures/epsilonXRenderMonkey.png}} \\
736      \resizebox{100mm}{!}{\includegraphics{../figures/epsilonYRenderMonkey.png}} \\
737      \resizebox{100mm}{!}{\includegraphics{../figures/renderMonkey.png}} \\
738    \end{tabular} \caption{These pictures show how to tweak the epsilon value inside RenderMonkey.}
739\end{figure}
740
741%\chapter{Developers Manual}
742%
743%Developers manual...
744
745%-------------------------------------------------------------------
746
747\begin{thebibliography}{99}
748
749\bibitem{leafClusterImpostorsEG2005}
750    Leaf cluster impostors for tree rendering with parallax.
751  García, Ismael, Sbert, Mateu, Szirmay-Kalos, Laszlo.
752    Short Paper of Eurographics (Dublin, Ireland), pp. 69-72, 2005.
753
754\bibitem{leafClusterImpostors3rdHungarianCGG}
755    Tree rendering with billboard clouds. Third Hungarian
756    García, Ismael, Sbert, Mateu, Szirmay-Kalos, Laszlo.
757    Conference on Computer Graphics and Geometry, Budapest, 2005.
758
759\bibitem{xfrog}
760    Xfrog, Greenworks Organic-Software
761    \url{http://www.xfrogdownloads.com/greenwebNew/products/productStart.htm}
762
763\bibitem{povtree}
764    Pov-Tree
765    \url{http://propro.ru/go/Wshop/povtree/povtree.html}
766
767\bibitem{xfrogpublicplants}
768    Xfrog Public Plants
769    \url{http://web.inf.tu-dresden.de/ST2/cg/downloads/publicplants/}
770
771%\[7\] Collada, An open Digital Asset Exchange Schema for the interactive 3D industry
772%http://www.collada.org
773%\[8\] Shark3D, Game Engine Spinor GmbH
774%http://www.shark3d.com
775%\[9\] Ogre3D, Graphic Engine 7
776%http://www.ogre3d.org
777%\[10\] Xfrog 7
778%http://www.xfrogdownloads.com/greenwebNew/news/newStart.htm
779
780\end{thebibliography}
781
782\end{document}
783%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracBrowser for help on using the repository browser.