Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
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 [email protected] *Partially funded by the Austrian Grid Project (BMBWK GZ 4003/2-VI/4c/2004) Agenda • • • • • • What are Transfer functions? Goal Approach Characteristics Use of the Grid Conclusion and Future Work Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 2 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) Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 3 What are Transfer Functions? • Example: – Given: Some volume data, a transfer function for transparency only. Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 4 What are Transfer Functions? • Example: Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 5 What are Transfer Functions? • Example: Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 6 What are Transfer Functions? • Example: Adding a color map Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 7 What are Transfer Functions? • Example: Adding a color map Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 8 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) Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 9 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 Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 10 Approach • Apply a genetic algorithm: 1. Generate an initial population of transfer functions 2. Evaluate the fitness of each chromosome 3. Select the best chromosomes (transfer functions) for the next population pi+1 4. Recombine the chromosomes 5. Mutate some chromosomes 6. Perform steps 2 to 6 until a good-enough transfer function has been found. Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 11 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) Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 12 Encoding (2) Chromosome (transfer function) Gene 0 Density value Hue, Saturation, Value Talk at CGW05 Gene 1 Density value Hue, Saturation, Value … Gene N-2 Gene N-1 Density value Hue, Saturation, Value Density value Hue, Saturation, Value Peter Praxmarer, GUP, Universität Linz 13 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 Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 14 Evaluation of the fitness 1. Render the population on the grid 2. Present the resulting images to the user 3. The user judges the transfer functions according to a like/don’t like scheme Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 15 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 Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 16 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 Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 17 Recombination (2) For example: Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 18 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 Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 19 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 Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 20 Rendering on the Grid • Use today’s grid technology to distribute the load on various resources • Prerequisites: – POVRay – Grid infrastructure Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 21 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 Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 22 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 Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 23 Results (1) Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 24 Results (2) Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 25 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 Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 26 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 Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 27 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 • … Talk at CGW05 Peter Praxmarer, GUP, Universität Linz 28