AUFLIC: An Accelerated Algorithm for Unsteady Flow Line Integral Convolution Zhanping Liu Robert J. Moorhead II Visualization Analysis & Imaging Laboratory MSU / NSF Engineering Research Center May 27, 2002
Outline Motivation Flexible seeding strategy Dynamic activation-deactivation scheme Save & reuse pathlines AUFLIC (Accelerated UFLIC) Conclusions Results Introduction Vector field visualization LIC (Line Integral Convolution) UFLIC (Unsteady Flow Line Integral Convolution) Key points Basic idea Pipeline
Introduction— Vector Field Visualization Vector Field Visualization Challenges Representation: magnitude & direction Performance: quality & speed ROI: feature extraction & tracking Complexity: unstructured grids & unsteady flow Methods Hedgehogs: arrows, wedges & headed lines Lines: streamlines, pathlines, streaklines & timelines Surfaces: stream-surfaces, stream-ribbons & stream-tubes Volumes: flow volumes Graphics Based Texture Based Spot noise Jark J. Van Wijk, Computer Graphics, Line Integral Convolution
Introduction— LIC (Image courtesy of Mike Chupa, ERC VAIL)
Introduction— LIC Presented by Brian Cabral & Leith Caisey Leedom, SigGraph’93. Low-pass filter noise texture along streamline, exploiting the correlation. Produce a synthesized image with fine details. LIC (Line Integral Convolution) Noise texture (fine sands) Vector field (wind) LIC image (pattern) L: kernel length K: convolution kernel : streamline T: noise texture value
Basic idea 2D Vector Streamlining by bi-directional integration Noise texture LIC Image O Introduction— LIC (stream)Line Integration Convolution output pixel value
Introduction— LIC Colored mapped with velocity magnitude (blue: lowest; red: highest)
Introduction— LIC LIC Animation shift periodic kernel phase frame by frame
Introduction— LIC LIC on curvilinear gridsLisa K. Forssell & S. D. Cohen Fast LICDetlev Stalling & Hans-Christian Hege Parallel LICDetlev Stalling, and et al Multi-frequency LIC Ming-Hoe Kiu and David C. Banks.1996 Surface LIC Christian Teitzel, and et al Oriented LIC R. Wegenkittl, and et al Enhanced LIC A. Okada & D. L. Kao Volume LIC (Dye advection) Han-Wei Shen, and et al Victoria Interrante & Chester Grosch C. Rezk-Salama, and et al Variations
Introduction— LIC LIC fails to convey temporal coherence of unsteady flow. Inter-frame pulsation is introduced to LIC animation. Disadvantage does not work for unsteady flow field
UFLIC— Key Points unsteady flow pathline given a particle at a time step, to locate on-pathline particles & scatters its contribution to them over time object-space oriented UFLIC steady flow streamlinegiven a pixel in the output image, to locate the correlated pixels & accept their contributions image-space oriented LIC FieldLineStrategyFocusMethod UFLIC vs. LIC PLIC Vivek Verma, David Kao, and Alex Pang Hardware-assisted texture advection Bruno Jobard, Gordon Erlebacher, and M. Yousuff Hussaini UFLIC: Unsteady Flow Line Integral Convolution Han-Wei Shen & David L. Kao UFLIC can maintain both spatial and temporal coherence. Available methods for unsteady flow visualization Key Points
UFLIC— Key Points Two principles Time Accurate-Value Scattering Scheme Convolve along pathlines to exploit spatial & temporal correlation Texture Feed-Forward Strategy Advect textures over time to enhance temporal coherence One intra-processing Noise-Jittered High Pass Filtering High Pass Filtering Noise Jittering Pass vector direction information forward Maintain noisy characteristics in the forwarded texture
pathline3 texture t+3 texture t+2 texture t+1 pathline1 texture t time step t time step t+1 time step t+2 time step t+3 integrate locate scatter value release a seed from pixel center pathline2 DIFFERENT points but in the SAME pixel DIFFERENT points but in the SAME pixel The CURRENT scattering process is now completed. Convolve the scattered values and output texture t+1 as frame t+1. Apply Noise-jittered High Pass Filtering to texture t+1 and then take it as the input texture of the NEXT scattering process. Now take texture t+1 as input and begin the new scattering process to produce frame t+2 Release a NEW seed from pixel-center Continue the value scattering until time step t+4 …… The CURRENT scattering process is now completed. Convolve the scattered values and output texture t+2 as frame t+2. Apply Noise-jittered High Pass Filtering to texture t+2 and then take it as the input texture of the NEXT scattering process. Now take texture t+2 as input and begin the new scattering process to produce frame t+3 Release a NEW seed from pixel-center Continue the value scattering until time step t+5 …… The CURRENT scattering process is now completed. Convolve the scattered values and output texture t+3 as frame t+3. Apply Noise-jittered High Pass Filtering to texture t+3 and then take it as the input texture of the NEXT scattering process. UFLIC— Basic Idea Suppose 1 scattering process covers 3 time steps Basic Idea
UFLIC— Pipeline Life span The duration (in terms of the number of time steps, usually = 4) in which a particle scatters its value to the succeeding particles along the pathline Bucket A ring-buffer by which each pixel saves those scattered values and the weights for later convolution Input Texture Time Accurate Value Scattering Process if within life span Vector Data Buffer White NoiseDisk Files ( N time steps) Refresh Convolution Buckets Always Release New Seeds Pathline Integration Bucket Convolution Noise-Jittered High Pass FilterFrame Feed Texture Forward t = t + 1 Pipeline
AUFLIC— Motivation Motivation Problem — UFLIC is time consuming Texture synthesis: convolution & noise-jittered high pass filtering Pathline integration: computationally expensive Multi-timestep value scattering: more computation needed Over 90% UFLIC computation time results from pathline integration Reason — pathline redundancy Always release a new seed from each pixel center at each time-step Existing pathlines are not taken into considerations Generally, more than 2 pathlines pass through a pixel simultaneously We proposed AUFLIC (Accelerated UFLIC) Solution — reuse pathlines Reuse existing pathlines as many as possible Much less integration, the same scattering effect
pathline texture t+3 texture t+2 texture t+1 texture t AUFLIC— Motivation time step t time step t+1 time step t+2 time step t+3 integrate locate scatter value release a seed from pixel center Now, begin to save the on-pathline points (pixels). They will be reused during scattering process t+1, t+2, t+3, …… From here, the on-pathline points (pixels) to be saved will be reused during scattering process t+2, t+3, t+4, …… Life span = 3 time steps Begin scattering process t to produce frame t+1 : Scattering process t: Scattering process t+1: Scattering process t+2 Scattering process t is now completed. Convolve the scattered values and output texture t+1 as frame t+1. Apply Noise-jittered High Pass Filtering to texture t+1 and then take it as the input texture of the NEXT scattering process. Begin scattering process t+1 to produce frame t+2 Now further advect the pathline ONLY 1 time step ahead (to time step t+4). Save the new on-pathline pointsand let them ACCEPT the scattered value Scattering process t+1 is now completed. Convolve the scattered values and output texture t+2 as frame t+2. Apply Noise-jittered High Pass Filtering to texture t+2 and then take it as the input texture of the NEXT scattering process. Begin scattering process t+2 to produce frame t+3 For this pixel, NO need to release a new seed from the pixel-center Instead, reuse this previously saved on-pathline point (NOT necessarily the pixel-center) as the seed to scatter the pixel value DIRECTLY to the succeedingpoints (pixels) along the already-known pathline For this pixel, NO need to release a new seed from the pixel-center Instead, reuse this previously saved on-pathline point (NOT necessarily the pixel-center) as the seed to scatter the pixel value DIRECTLY to the succeedingpoints (pixels) along the already-known pathline Basic idea
AUFLIC— Flexible Seeding Strategy Flexible Seeding Strategy Adaptively released A new seed is released when no extracted seed for the pixel is available. How flexible a seed particle can be? Freely positioned It is NOT necessarily located exactly on the pixel center. Whatever particle within the pixel qualifies for scattering the pixel value. Possibly extracted A seed may be extracted from the existing pathlines used during the previous scattering processes. A scattering process: the procedure in which a seed particle scatters its value within its whole life span covering several (4) time steps. Condition: ALL pixels seeded At each time step, there is at least 1 seed from each pixel to scatter value.
AUFLIC— Flexible Seeding Strategy How old a pathline can be? UFLIC pathlines die younger An UFLIC pathline is forcibly terminated as soon as the life span expires. The life span is usually set to 4 time steps. it reaches the flow field boundaries it meets a critical point it is deactivated by the Dynamic Activation-Deactivation Scheme AUFLIC pathlines live older An AUFLIC pathline will NOT stop its advection until: Older pathlines can be repeatedly used during subsequent scattering processes without much effort of expensive integration calculation. The older, the more reused, the less computation
AUFLIC— Flexible Seeding Strategy Flexible seeding strategy Large amount of new seeds are cancelled due to those extracted seeds. Excessive new pathlines’ integration is therefore avoided. : the seed actually released from the pixel center at time step t : the seeds extracted from the existing pathline at time step t+1, t+2, t+3, and t+4, called potential seeds : the actually cancelled seeds at the pixel-centers : the reused pathline : the pathlines cancelled before births
AUFLIC— Dynamic Activation-Deactivation Scheme Dynamic Activation-Deactivation Scheme Excessivly & un-necessarily reused pathlines Too many active pathlines inevitably degrade acceleration performance No sufficient memory to save the pathlines Un-evenly distributed pathlines As pathlines are released, reused & advected over time, problems arise: Too many potential seeds passing through a pixel simultaneously scatter the same pixel value There are so many pixels NOT visited by any potential seeds Problems
AUFLIC— Dynamic Activation-Deactivation Scheme pixel Mutex — an exclusion flag A cleared mutex (= 0): there has been NO active seed from the pixel A set mutex (= 1): there has been an active seed from the pixel Dynamic Activation-Deactivation Scheme Current-Mutex — whether to release a new seed or NOT Indicate pixel status during the current scattering process Next-Mutex — whether to activate or de-activate a potential seed Indicate pixel status during the next scattering process Dynamically updating Current-Mutex & Next-Mutex Release new seeds ONLY on REAL demand. Excessive & un-necessary “potential” seeds are actually cancelled. The least necessary pathlines are maintained for enough value-scattering.
AUFLIC— Save & Reuse Pathlines Save & Reuse Pathlines time step 0time step 1time step 2time step 3 time step 4time step 5 scattering process 0 (time step 0 ~ time step 4) works to produce frame 0 all Current-Mutex & Next-Mutex are inited to 0 the pixel’s Current-Mutex = = 0, so release a new seed from the pixel center the active seed scatters the pixel value to the succeeding points (pixels) along the pathline check the potential-seed’s pixel flag if (Next-Mutex = = 0) save the pathline else do NOT save the pathline suppose (Next-Mutex = = 0), update the pixel status to refuse other pathlines: Next-Mutex = 1 begin to save the pathline as the advection continues the life span just expires, save the tail seed save this part and insert it into the pathline-list NOT saved :active seed :potential seed:tail seed:non-seed point life span = 4 time steps During each scattering process, pixels along each pathline are saved in a pixel-ring-buffer when necessary and N (<= xres×yres) pathlines are stored in a pathline-list for subsequent access and reuse.
AUFLIC— Save & Reuse Pathlines time step 0time step 1time step 2time step 3 time step 4time step 5 After all pixels complete scattering process 0, convolve the pixel-buckets to produce frame 0 scattering process 1 (time step 1 ~ time step 5) works to produce frame 1 firstly update ALL pixel’s two Mutex let Current-Mutex = Next-Mutex; to check if a new seed is needed to release. let Next-Mutex = 0; to choose the FIRST pathline for the next scattering process check the pixel flag if(Current-Mutex = = 0) release a new seed from the pixel center else reuse the saved pathline information suppose (Current-Mutex = = 1) load the pathline information saved during the last scattering process activate the seed directly scatter the pixel value to the already-known on-pathline points (pixels) without pathline integration calculations check the pixel status if(Next-Mutex = = 1) delete the pathline from the pathline list else keep the pathline still in the pathline list Suppose (Next-Mutex = = 0) cut this part and keep the rest still in the pathline list let the tail seed advect the pathline forward, and begin to save the new points into the existing pathline the life span just expires save this part into the existing pathline keep the updated pathline still in the pathline list After ALL pixels complete scattering process1, convolve the pixel-buckets to produce frame 1 :active seed :potential seed:tail seed:non-seed point life span = 4 time steps scattering process 0 (time step 0 ~ time step 4) works to produce frame 0 Save & Reuse Pathlines the lastest pathline is saved in a pixel-ring-buffer and the ring-buffer stay inserted in the pathline-list During each scattering process, pixels along each pathline are saved in a pixel-ring-buffer when necessary and N (<= xres×yres) pathlines are stored in a pathline-list for subsequent access and reuse.
Results 2D unsteady flow data sets & parameters Platform SGI Onyx2 with four 400MHZ MIPS R12000 processors 4GB memory Concerns Image quality Acceleration Memory cost 2D Data setResolutionTime stepsLife spanOutput frames Weather576 × time steps37 Vortex397 × time steps97 Pixel ring-buffer size 72
Results— Image Quality Image Quality (A) UFLIC image weather data set 576 × 291 (B) AUFLIC image weather data set 576 × 291
Results— Image Quality (C) UFLIC image vortex data set 397 × 397 (D) AUFLIC image vortex data set 397 × 397
Results— Acceleration Acceleration AUFLIC is designed to accelerate the value scattering process in the UFLIC pipeline. Theoretically, AUFLIC & UFLIC are exactly in the same speed for pipeline’s other stages. methoddata loadingscatteringconvolutionfiltering UFLIC AUFLIC color&outputtotal AUFLIC / UFLIC % AUFLIC compared with UFLIC in breakdown of the computation time (in second) (A) weather data; resolution: 576 × 291; life span: 4; 37 frames / 41 time steps; pixel-ring-buffer size: 72. methoddata loadingscatteringconvolutionfiltering UFLIC AUFLIC color&outputtotal AUFLIC / UFLIC % (B) vortex data; resolution: 397 × 397; life span: 4; 97 frames / 101 time steps; pixel-ring-buffer size: 72.
Results— Memory Cost Memory Cost Pathline statistics items method AUFLICUFLIC released pathlines release percentage28.42 %100 % un-reused pathlines reused pathlines reuse percentage67.77 %0 % total reuse times average reuse times3.720 de-activated pathlines total pixels average pathline length83.23 pixels49.83 pixels (A) weather data; resolution: 576 × 291; life span: 4; 37 frames / 41 time steps; pixel-ring-buffer size: 72. items method AUFLICUFLIC released pathlines release percentage22.90 %100 % un-reused pathlines reused pathlines reuse percentage63.90 %0 % total reuse times average reuse times5.270 de-activated pathlines total pixels average pathline length pixels48.39 pixels (B) vortex data; resolution: 397 × 397; life span: 4; 97 frames / 101 time steps; pixel-ring-buffer size: 72.
Results— Memory Cost Memory consumption for saving pathlines Low memory cost Peak : 80.46MB Steady consumption ~ 70.86MB
Conclusions AUFLIC is proposed to speed up UFLIC computation for unsteady flow visualization in value scattering process Flexible Seeding Strategy reuse existing pathlines from last scattering process Dynamic Activation-Deactivation Scheme maintain the least necessary pathlines No image quality degradation Nearly half time saved High reuse percentage Very low & quite steady memory consumption Easily extended to 3D case Future work Enhanced with feature-driven seeding strategy Extended to 3D unsteady flow field
Thank You !