My very first image
This tutorial explains the basics of loading a geometry file, choosing a
viewpoint and calculating an image. The step by step example which follows uses parameters so as to
get a very good image. Much faster results can be obtained using more approximations.
Step by step
- Launch the graphics user interface
GUI
of HQR.
If everything goes ok, you get two windows: one for parameters, with many tabs, and one for display.
- go to the first tab, named Data. Click on the load button, and choose a X3D scene
in the box that appears. You may not have one with you know, so
try this cornell box.
- the graphical window uses a QGLViewer. You
can navigate in the scene with the mouse so as to see something like this:
The black square in the top is a diffuse yellow light source.
- go to the Photons tab. This panel controls how many photons you
send in the scene (Note: sending photons is only needed for indirect
lighting calculations, not for shadows). Set the number of photons to send to 20,000 and the maximum number
of bounces to 5, then click on Send more photons. You should soon see many colored points,
some yellow (corresponding to direct photons), some red (those which have bounced on the red surface), etc:
- now, go to the Drawer tab. Many parameters can be set here, but we won't spend time on them.
Play with the buttons if you want. In the bottom, click on the Load button to load the viewpoint
from the file supplied here.
- go to the Ray tracer tab. This controls the core of the photon mapping algorithm.
Uncheck Caustics (all surfaces are diffuse) and change the sampling strategy for
indirect calculation from Jittered sphere to Strattified BRDF.
Set the number of samples in theta and phi to 7 and 13 respectively. This
means that 91 secondary rays will be sent per pixel. Finally, set the number
of processors to 1 (in the bottom).
- go to the Still image tab. Click on the Ray trace button. In the file selection box, enter
some image name with a
.exr
extension, say toto.exr
. Then click ok.
- during the calculation, a progress bar indicates how much is done already, and how long it
may take to finish (leave the mouse on the progress bar). Go have a coffee (the calculation takes
approximately 15mn).
- Note: during the calculation, the current image is saved every 5 mn. It is
always recommended to have a look at it to check that parameters fit well
before waiting for a final result. When finished, see your toto.exr image with
exrdisplay:
> exrdisplay ./toto.exr
which should look like this:
Last modified on Thursday, February 24, 2005.