Master's Thesis - Studierstube Augmented Reality Project - Graz ...
Master's Thesis - Studierstube Augmented Reality Project - Graz ...
Master's Thesis - Studierstube Augmented Reality Project - Graz ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
5.3 Visualization nodes and subgraphs<br />
18 // between different ones .<br />
19 // This color can now be illuminated per fragment with I.<br />
20 gl_FragColor = gl_Color * I;<br />
21 }<br />
22 // End of fragment shader<br />
5.3.3.4 Path lines<br />
Calculation of path lines is built upon the calculation of streamlines. This line type<br />
has to consider the fourth dimension as well since they represent a particle’s trajectory<br />
over time. The simplest way to generate a path line is to assemble it with parts of<br />
streamlines from each volume. This method is error-prone but efficient to implement<br />
by simple changing the volumes over time during the calculation of streamlines as<br />
described in section 5.3.3.3. Assuming that a given four dimensional dataset consists of<br />
t volumes and the position buffer texture is of the size n × m the volume number has to<br />
be incremented each floor( m t<br />
) frame. Since these lines are now constant when the user<br />
for example changes the image volume, an additional indicator should be available for<br />
convenience. Coloring parts of the lines with a signal color has proved to show the user<br />
in which volume which part of the line was generated. Figure 5.12 shows that behavior<br />
on an example.<br />
Certainly all illumination and further coloring techniques can be used with these<br />
lines in the same way as with streamlines. The remaining thing with this algorithm<br />
is to evaluate whether an interpolation in temporal direction - which means an about<br />
quadratic increase of computational costs - would produce a smaller error or not. These<br />
considerations are intended for future work.<br />
5.3.3.5 Stream tubes<br />
When path lines and stream lines calculations are done even a more realistic visualization,<br />
so called stream tubes are possible. The basic idea is described in detail in<br />
section 2.1.1.2 in chapter 2.<br />
Generating a real mesh of vertices around an actual calculated line would result<br />
in a vast amount of vertex calculations and consequently in a very low performance.<br />
To handle this problem a so called impostor rendering technique was used. This trick<br />
allows to render reasonably realistic tubes with only twice as many vertices as used with<br />
simple line visualizations. Instead of a line strip a quad strip 1 is stored in a display list<br />
and then subsequently displaced to the correct positions. The visualization algorithm<br />
can be performed in one vertex shader and one fragment shader which is illustrated in<br />
figure 5.13.<br />
The main task for the vertex shader is to displace the two(!) vertices corresponding<br />
to one supporting point position always perpendicular to the viewing direction. The<br />
points of the quad strip itself can be distinguished by different initial positions so<br />
1 GL QUAD ST RIP vertex definition for OpenGL)<br />
109