280 likes | 393 Views
Making the Best of Your Data -Offloading Visualization Tasks onto the Grid Semiautomatic Generation of Transfer Functions through Grid-based Parameter Studies*. Peter Praxmarer GUP, Joh. Kepler University Linz praxmarer@gup.jku.at. Agenda. What are Transfer functions? Goal Approach
E N D
Making the Best of Your Data -Offloading Visualization Tasks onto the GridSemiautomatic Generation of Transfer Functions through Grid-based Parameter Studies* Peter Praxmarer GUP, Joh. Kepler University Linz praxmarer@gup.jku.at
Agenda • What are Transfer functions? • Goal • Approach • Characteristics • Use of the Grid • Conclusion and Future Work Peter Praxmarer, GUP, Universität Linz
What are Transfer Functions? • Volumetric data represents: • A volume with some scalar property at every point • Properties can be: density, temperature, chemistry, … • Rendering methods: • Isosurface: A 3d contour is created at a selected density, the resulting surface shows all the regions that are more (or less) dense than the chosen contour level. • Raytracing/Raycasting: A transfer function provides a mapping of the density values to color and transparency. • Thus: D->(R,G,B,A) Peter Praxmarer, GUP, Universität Linz
What are Transfer Functions? • Example: • Given: Some volume data, a transfer function for transparency only. Peter Praxmarer, GUP, Universität Linz
What are Transfer Functions? • Example: Peter Praxmarer, GUP, Universität Linz
What are Transfer Functions? • Example: Peter Praxmarer, GUP, Universität Linz
What are Transfer Functions? • Example: Adding a color map Peter Praxmarer, GUP, Universität Linz
What are Transfer Functions? • Example: Adding a color map Peter Praxmarer, GUP, Universität Linz
Task • Find transfer functions for visualizing volume data • Application:Offline-Rendering (Raytracing) of gas distributions in galaxy clusters • Given: • Voxel data (density, temperature) • Wanted: • Mapping: D->(R,G,B,A) Peter Praxmarer, GUP, Universität Linz
Properties of the data • Astrophysical volume data generated by N-body SPH simulations • Unlike MRI data the astrophysical data is highly amorphic • In MRI data there are sharp boundaries -> we can use the gradient information for detecting boundaries • Galaxies often consist of a lot of gas which gradually gets denser -> the gradient alone is not sufficient to generate good visual representations (especially with isosurface rendering) • Finding a transfer function that reveals the ‘interesting’ parts of the simulated data is difficult Peter Praxmarer, GUP, Universität Linz
Approach • Apply a genetic algorithm: • Generate an initial population of transfer functions • Evaluate the fitness of each chromosome • Select the best chromosomes (transfer functions) for the next population pi+1 • Recombine the chromosomes • Mutate some chromosomes • Perform steps 2 to 6 until a good-enough transfer function has been found. Peter Praxmarer, GUP, Universität Linz
Encoding (1) • A chromosome represents one transfer function • Each chromosome has N<50 genes • Each gene stores • Density value • Color • Thus: Mapping D -> (R,G,B,A) Peter Praxmarer, GUP, Universität Linz
Encoding (2) Chromosome (transfer function) Gene 0 Gene 1 Gene N-2 Gene N-1 Density value Hue, Saturation, Value Density value Hue, Saturation, Value Density value Hue, Saturation, Value Density value Hue, Saturation, Value … Peter Praxmarer, GUP, Universität Linz
Generating an initial population • Collecting statistical measures: • Histogram of the voxel data • Mean, average, mode • Used to generate the initial population using a heuristics. • Selection based on • Density interval • Frequency Peter Praxmarer, GUP, Universität Linz
Evaluation of the fitness • Render the population on the grid • Present the resulting images to the user • The user judges the transfer functions according to a like/don’t like scheme Peter Praxmarer, GUP, Universität Linz
Selecting the next population • Select transfer functions for popi+1 proportional to their fitness (the better a transfer function is, the more often it is selected) • Introduces a bias towards ‘better’ transfer functions • Is not sufficient to generate new transfer functions Peter Praxmarer, GUP, Universität Linz
Recombination (1) • Allows a transfer function to move towards interesting ‘places’ • Applied with a probablity pcrossover (usually pcrossover = 0.7) • Generates two offsprings from two parent chromosomes • The parent chromosomes are chosen by random from the previously selected chromosomes Peter Praxmarer, GUP, Universität Linz
Recombination (2) For example: Peter Praxmarer, GUP, Universität Linz
Mutation • Applied with probability pmutation (usually pmutation=0,001) per gene • Randomly change the gene (color or density value) • Introduces new solutions into the search space • Prevents the premature convergence to local optima Peter Praxmarer, GUP, Universität Linz
Application characteristics • The user directs the search • Only the domain expert knows what he wants to see • Allows finding transfer functions for volume data with an amorphous structure (galaxy data vs. MRT data) • Requires large computational power to render the images of a population Peter Praxmarer, GUP, Universität Linz
Rendering on the Grid • Use today’s grid technology to distribute the load on various resources • Prerequisites: • POVRay • Grid infrastructure Peter Praxmarer, GUP, Universität Linz
Components • Consists of • GUI: Presents the rendered images • Master: Server that maintains the connection to clients; Runs on the same machine as the GUI. • Clients: Are running on the Grid. Connect back to the Master and receive and execute commands from the master: • Retrieve Density data • Retrieve Scene description • Execute Rendering • Send Output back to GUI Peter Praxmarer, GUP, Universität Linz
Parameter study • The transfer function is saved as a colormap in the POVray scene description file • Clients receive commands to execute the Rendering and transfer back the results • Rendering is parallelized across multiple Grid nodes • Data transfer using GridFTP Peter Praxmarer, GUP, Universität Linz
Results (1) Peter Praxmarer, GUP, Universität Linz
Results (2) Peter Praxmarer, GUP, Universität Linz
Results (3) • Rendering time: ~60 sec / transfer function with POVRay; resolution 600x600 • By Parallelizing the POVRay rendering the rendering time can be significantly reduced (depends of number of available nodes) • Population size: typically 16, up to 64 Peter Praxmarer, GUP, Universität Linz
Conclusion • Supports astrophysicists in finding useful transfer functions for visualizing their simulated data • The astrophysicists directs the search to what he wants to see in his data • Due to the use of Grid Technology he is able to explore many different settings at once in a considerably short time • Due to ray-tracing he gets high-quality representations of the volume data Peter Praxmarer, GUP, Universität Linz
Future Work • Improve heuristics for generating the initial population • Use good transfer functions from astrophysicists as a starting point • Improve the GUI to allow manually changing the presented transfer function. This should be done locally on the workstation to provide interactivity. • Reduce the response time • … Peter Praxmarer, GUP, Universität Linz