21
John Biddiscombe CSCS Swiss National Supercomputing Centre

John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Embed Size (px)

Citation preview

Page 1: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

John Biddiscombe

CSCS

Swiss National Supercomputing Centre

Page 2: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Why pv-meshless?

pv-meshless is a (slightly) customized version of ParaView

Couldn’t add a new mapper as a plugin (resolved?)

Experimental platform for development

Particle renderer uses some widgets from VisIt for opacity control

Will be added to ParaView main. Eventually.

Page 3: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Representation/Display

• Standard Display panel• Surface/ Wireframe/ Points• Colour editor• Point Size• (Cube Axes)• (Interpolate)• Opacity

Page 4: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Color Editor

Change Presets Define your own Load Save Scale Log/Lin Fit to data (See Track changes) Change Color Space

(interpolation between RGB values)

Manually edit scale

Page 5: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Point Sprite Representation

03/06/2008

Opacity control Track changes (max/min) 3 render modes Simple point

As before, but with opacity Sprite

A sphere, clearer contrast Shader

Radius controls

Page 6: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Opacity

Auto Min/Max changes with scalar

Enable disable auto change

Set min max manually Values <min mapped to 0, >max, to 1 Values from 0-1 mapped to

range according to opacity control setting

Can also change overall value with slider (<1)

Page 7: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Opacity

03/06/2008

Gaussian control Select peaks Drag left/right Drag up/down Scale/shrink

Great for volumetric datasets

Page 8: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Background color map for opacity

03/06/2008

When colour and opacity have same variable and same range

Not 100% accurate, but useful

Page 9: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Volume render effect

Page 10: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Volume animation

Page 11: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

PointSize

Change size according to taste

All particles the same

No perspective (well actually yes, but not accurate)

No relative scale between particlesTry zooming in/out

Point smoothing changes particles to rounded squares/ almost circles

NB. Bug. If Point Sprite selected, then simple point selected, size clamped.

Page 12: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Depth Sort

For transparency – particles must either be sorted back to front

Cout = Csrc * Asrc + (1 - Asrc) * CdstSkip anything behind closest pixel

Colour correct

Alpha can get messy when compositing images in parallel – distributed overlap/sort. Depth sort shader and sphere shader don’t coexist.

TURN OFF DEPTH SORT FOR FASTER DISPLAY

Wrong Right

Page 13: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Depth Peeling

• Instead of sorting every object and drawing back to front• Draw everything once and save the image• Then draw it again, but only items in front of last one• Then do it again, and again in ‘peels’• Objects are not sorted, but each pass renders stuff in front, gradually

the final image is built up.• Not bad for brains/bones• Awful for lots of particles• Uses advanced shaders which mess up our renderer• Work in progress is getting depth peeling working with our renderer

Page 14: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Sprite mode

• Spheres are drawn with shaded edges• Improves contrast

Page 15: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Shader mode

• Better for smaller datasets• Where a parameter is to be highlighted• Radius can be controlled• 2 shaders possible in current implementation• FastSphere

• Computes size based on radius, then shades as sphere

• ExactSphere• Computes size based on radius, then shades as sphere• Also computes depth so that overlapping spheres look correct• Much slower• Only useful in small datasets or hi-zoom display

Page 16: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Radius Control

•Select scalar to use for radius•Radius input Min/Max is detected from data, or set manually.

•Output is mapped to {0,1} by default•Multiplier is used to define world coordinates to make it easier to change overall size. Avoid large numbers! Blank by default – for safety

•Safety limits pixels to avoid very long render times, when the wrong radius is selected.

Page 17: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Radius Example

Page 18: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Example Animation

Page 19: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Large Datasets

• Runs in parallel, if opacity is not used

• SubProxy is vtkCellPointsFilter instead of vtkGeometryFilter, so it can be used on any datatype.

• This dataset is 40 million particles, rendered on 16 GPUs. Frame speed 1-3 fps typically – should be much faster – still debugging

• Very interactive – for drilling down etc.

• (Beats MatLab etc)

Page 20: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Future Work

• Ellipsoids : Quadrics • New shaders can be added easily• tricky part is mapping scalars to shader parameters

• Better Parallelism• Track down slowness in certain circumstances

• Opacity fixes.• Need fast rendering with opacity in parallel

• New modes?

Page 21: John Biddiscombe CSCS Swiss National Supercomputing Centre Particle Rendering in ParaView/ pv-meshless a plugin

Ellipsoids : Quadrics : To be continued

EXAMPLE ANIMATION