Information/Instructions/RTRT
From C-SAFE Wiki
Contents |
Using the Real Time Ray Tracer (RTRT) to Visualize C-SAFE Data
This page covers useful information for using the Real-Time Ray Tracer (RTRT) to visualize C-SAFE data.
RTRT Keyboard Commands
- 'w' - save the current image as a ppm (see saving images below)
- 'm' - toggle on/off movie recording (see saving images below)
- To unpack the movie bundle, use: pnmsplit movie00.ppm_stream image-%d.ppm
- Then convert them all to pngs using (assuming tcsh):
- foreach file (*.ppm)
- echo $file
- convert $file `basename $file .ppm`.png
- end
- foreach file (*.ppm)
- 'q' - quits rtrt... BE CAREFUL not to accidentally hit 'q'...
- 'v' - changes the eye point to display all data
- 't' - toggles on/off performance visualization
- 'j' - toggles jittering, which will smooth out the image, but can slow the framerate down
- 'c' - prints out (to the terminal) information on the camera's current location.
Saving Images
Single images will be saved into the 'images' subdirectory of the directory from which you run rtrt. Movies will be saved into 'movies'. WARNING, if you run rtrt from the directory it is in, then your images/movies could become confused with those of another user, so I suggest you move/copy them away as soon as you are done. (See the Running RTRT From your own directory section above.)
Visualizing Particles
There are two "scenes" for RTRT that will visualize particles:
- uintahparticle2
- tstdemo
Uintah Particle 2
This scene only displays particles. It reads data directly from a specified UDA.
TST Demo
The testdemo scene is used to render both a volume field (the fire) and particles at the same time. The volume (eg: temp_CC <- temperature-cell-centered) and the particles must both be in NRRD format (and in separate files). You can create the volume NRRDs using the uda2nrrd program. (Eventually, you will be able to create the particle NRRDs this way too, but for now) You must use the uintahparticle2 scene to read in an UDA and dump out the NRRD file for the particles.
Visualizing Particles and Fire
To visualize both Particles and Fire at the same time, the data must be converted to NRRDs and then visualized using the tstDemo scene. For information on this process, look here.
Combination index.xml file
You might want to create a single index.xml file pointing to all time-steps in multiple UDAs (assuming they are related). Then you can just point at this one index.xml file with all the tools. The best way to create this file (I think) is to copy the index.xml file out of one of the individual UDAs, and then just add more "<timestep href=" tags. I place the combined index file in the same directory as all the UDAs, and thus have to add the UDA name to the "<timestep>" tags.
- Once you have the particle and fire nrrds (probably named something like spheredata000.raw and temp_CC_M00_0000.nrrd), you need to create a data file that lists all the file pairs. Something like:
/usr/csafe/raid3/dav/Study02/nrrds/temp_CC_M00_0000.nrrd /usr/csafe/raid3/dav/Study02/nrrds/spheredata000.raw /usr/csafe/raid3/dav/Study02/nrrds/temp_CC_M00_0001.nrrd /usr/csafe/raid3/dav/Study02/nrrds/spheredata001.raw /usr/csafe/raid3/dav/Study02/nrrds/temp_CC_M00_0002.nrrd /usr/csafe/raid3/dav/Study02/nrrds/spheredata002.raw
- To generate NRRD files (for paritcle data), see information here.
Hack
By default, the 'volumes' (fire) cast shadows. This causes visual artifacts in the visualization. To prevent this (at least for now) you need to edit (and recompile) src/Packages/rtrt/Core/HVolumeVis.h.
On lines 494 and 946 (if light->isOn()), you need to add "false &&" (to turn off these if blocks).
RTRT Command Line
./rtrt -np 8 \ -scene scenes/tstdemo \ -type nrrdlist /usr/csafe/raid3/dav/Study02/nrrds/nrrd_list \ -numvars 7 \ -varnames 7 x y z p.id p.mass p.temperature p.velocity \ -minmax -0.496 -0.496 -0.496 0.496 0.496 0.496 \ -min 300 -max 2100 \ -rate 10 \ -radius 0.0004
Caveats
- Sometimes when you don't specify a "radius" for RTRT, it will segfault.
RTRT GUI
GridSpheresDpy
- Click the center mouse button (on a variable) to select the variable to use for color mapping.
- Control-left/right mouse button to limit the scale
- Shift-left/right mouse button limits the scale and "zooms" in.
- Shift or Control-middle mouse button resets the zoom or the scale (respectively).
Back to: Main
