Visualization - Assignment 2
Rendering of Scalar Data
Due: Sunday, Apr 28 2013, 23:59
Start Early!!!
- Individual Effort:
- No team participation is really encouraged in the case of the homework or the labs.
- Late Submission:
- In general late submission is not encouraged/accepted unless there is a very good reason.
Academic Misconduct
Before you start:
This is an exercise to understand visualization algorithms from the
bones up. For this I don't want you to use vtk or any other high level
visualization package. You may use (and I would encourage you to)
OpenGL and the GLUT libraries. Also check out GLUI
for some nice interface widgets, which are very easy to program.
You can develop it wherever you like, but the final version should run
on a unix environment with a makefile, e.g. the Ubuntu machines that are
available to you in the labs.
Tasks:
In this lab I would like you to write a renderer, that renders volumetric (3D) scalar data. You have the choice of doing iso-surface extraction or direct volume rendering.
Implement one of the following:
- Span Space (Livnat et al - see Ch2 of the Vis Handbook, (local link))
- Surface Tracking (Itoh and Koyamada - see Ch5 of the Vis Handbook, (local link))
- Raycasting algorithm (see Chapter 1+7 of 'Real-time Volume Graphics', (local link))
- texture-based slicing (see Chapter 3 of 'Real-time Volume Graphics', (local link))
- Shear-Warp Algorithm (Lacroutte Levoy 1994, (online))
- your own choice (after clarifying with me)
Implement the Volume Rendering algorithm of your choice on a
regular dataset using a procedural language (e.g. C++). Adequate
transfer functions should be designed for classifying material.
Your program should be able to write your rendered image to a
file. I don't want you to spend lots of time to
create cute GUI's, but a flexible way to communicate input
parameters is required. At a minimum you should provide
a text based input file where one can specify:
- input data set
- iso-value OR transfer function (tell me how!)
- light position
- eye position (always looking towards the center of the volume)
- name of the (image) output file
and some documentation of how this works in your program.
Data:
You can find a whole bunch of different data sets
here. You're program must work for
the *.vol data.
Hints:
- You might want to start by writing a simple program that renders a
a bunch of polygons. (Don't forget to switch on a light!)
- Next write a program that creates simple volumes and writes them
to a file. This will provide you with a tool for the next hint.
- Start with a small data set (e.g. a sphere).
That way you can debug your program better.
- Provide ample time to find interesting iso-values or transfer
functions. Not every selection will yield interesting images.
- Do NOT start the week the program is due - you will not finish!
- In order to write code to write the framebuffer to an image file
you might want to consult the man pages on the
portable bitmap format (PBM+, PGM, PPM).
Also get familiar with the OpenGL command
glReadPixels
.
Submitting Files
You submit your assignment by emailing it to me. Don't submit data files or compiled code, just source code.
For this course you need to submit the necessary *.cxx,
and *.h files and the Makefile to build your program. You are not
to submit any object files (*.o) or the final executable files. When I
grade your files I will first make your lab with the command:
> make
So you need to make sure that the makefile you submit is correct and all
your programs compile. It is advisable that you make a special temporary
submit directory before you submit the files. With this directory you
should place all the files needed to compile the program and perform a
clean compile to make sure you have everything sorted out correctly. A
clean compile will include first performing a make clean command
followed by a make command. If the program compiles you know you have the
correct files in place. After you are sure you have all the files in place
perform a make clean.
A 'readme.txt' file should be included with the submission. The 'readme.txt' should
include a brief description of your program and how to use it. It should
also contain instructions for compiling and running the program as well as
a description of any command line parameters you use.
Grading Criteria
Grading the labs will be based on the following:
- 1 point: if a hardwired image appears on the screen and it can be written to a file
- 2 points: if you can read arbitrary files and display them
- 3 points: if the proper lighting effects work
- 4 points: if you can change the eye point / view of the object
- 5 points: for good images, i.e. nice lighting and nice iso-surfaces / transfer functions
- 0.5 bonus point: for clearly structured code
Last modified: April 2013
Torsten Möller /
torsten dot moeller AT univie DOT ac DOT at