Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ambient Occlusion and Edge Cueing for enhancing Real Time Molecular Visualization Marco Tarini, Paolo Cignoni, Claudio Montani.

Similar presentations


Presentation on theme: "Ambient Occlusion and Edge Cueing for enhancing Real Time Molecular Visualization Marco Tarini, Paolo Cignoni, Claudio Montani."— Presentation transcript:

1 Ambient Occlusion and Edge Cueing for enhancing Real Time Molecular Visualization Marco Tarini, Paolo Cignoni, Claudio Montani

2 2 Background: Molecular Graphics The discipline and philosophy of studying molecules and their properties through graphical representations Stereotypical Scientific Visualization task 3D shape Molecule functionality Long story Long bibliography Many established techniques and principles [ Capstone after lunch by Jane Richardson! ] image courtesy of Accelrys Hemagglutinin image courtesy of Riumplus

3 3 Background: Molecular Graphics Many 3D Metaphors: Ball and Sticks "Licorice" modes Space Fill (CPK) Solvent Excluded Surfaces (Connolly's) Various kind of isosurfaces (electron density, potential...) Higher level abstractions: e.g. ribbons images (animations, stereo images...) insight, understanding 3D molecular structure 3D represen- tation(s) modellingrendering

4 4 Background: Molecular Graphics insight, understanding images (animations, stereo images...) Problems: Readability: Unfamiliar, awkward 3D structures Hard to understand 3D shapes (spatial relationships, etc) Efficiency: Geometric complexity (need for real time) (e.g. for very large proteins) 3D molecular structure 3D represen- tation(s) modellingrendering

5 5 Background: Molecular Graphics insight, understanding images (animations, stereo images...) The content of this talk: Advanced rendering techniques can be of great help here! Advanced rendering techniques can be adapted to the specific case of molecular rendering 3D molecular structure 3D represen- tation(s) modellingrendering

6 6 The rest of this talk: ad-hoc Advanced Rendering Techniques Impostors for spheres, cylinders Ambient occlusion (for impostors) Depth aware borders (for impostors ) Localized depth cueing effect (for impostors)

7 7 Impostor based rendering For each primitive (sphere or cylinder): render a screen-oriented impostor quad per vertex: displace vertex in screen space preprocess all common sub-expressions for each fragment: test membership (discard outliers fragments) compute –z –normal –lighting –texture coords (as we will see)

8 8 The rest of this talk: ad-hoc Advanced Rendering Techniques Impostors for spheres, cylinders Ambient occlusion (for impostors) Depth aware borders (for impostors ) Localized depth cueing effect (for impostors)

9 9 Ambient Occlusion Global lighting technique Approximation of global illumination Concept: light each point p with normal n p with the irradiance I(p) (quantity of light directly reaching p from any direction) in our case, L is: k (a constant) if p visible from ω, 0 if p shadowed Effect: lighted by daylight under a cloudy sky:

10 10 Ambient Occlusion: why Known to conceive realism (but, we dont care) Local lightingAmbient Occlusion

11 11 Ambient Occlusion: why Known to conceive 3D shape understanding perceptual study in [Langer & Bulthoff, TechRep 99] Especially in our case (molecules) large scale structures composed by multitudes of tiny shapes normals noise see also: particle systems by [Bigler etAl. VCGT06]

12 12 Ambient Occlusion: why Local lightingAmbient Occlusion

13 13 Ambient Occlusion: how Store computed Irradiance of each point on molecule surface (fast precomputation) use it during rendering PROBLEM: where do we store it? use a texture… for impostors!

14 14 Texturing the molecule AB DC GH F E A B C D x,y,z gnomic projection unfolding y,z gnomic projection unfolding x,y,z object spaceu,v texture space [Praun and Hoppe. TG03]

15 15 Texturing the molecule AB DC GH F E A B C D x,y,z object spaceu,v texture space

16 16 Texturing the molecule AB DC GH FE A B C D x,y,z object spaceu,v texture space texel replications bilinear filetering

17 17 Texturing the molecule Global Texture for the molecule: one texture patch for each: atom (sphere) or bond (cylinder) in the scene pack together all texture patches (trivial) ATOM 1 BOND 1 ATOM 2 ATOM 3 ATOM 4 BOND 2 ATOM 5 ATOM 6 ATOM 7 BOND 4 BOND 2 BOND 5 BOND 6 BOND 7 ATOM 8 BOND 8 ATOM 9 ATOM 10 ATOM 11 BOND 9 BOND 10 BOND 11 ATOM 12 u v (unused)

18 18 Texturing the molecule For example: small molecule: ~80 patches ~40 atoms ~40 bonds texture size: 512x512 texels patch size: 50x50 texels large molecule: 120.000+ patches 60.000+ atoms 60.000+ bonds texture size: 2048x2048 texels patch size: 6x6 texels u v IRRADIANCE MAP

19 19 Computing irradiance map on the GPU Get N directions w 1..N sampling the unit sphere For each i in (1..N) : 1.render new depth-map from view direction w i 2.render over irradiance-map: for each patch: for each fragment (texel) f : 1.invert (u,v) map get pos p, normal n p 2.project p over depth-map & check visibility (compare depths) 3.if visibile, accumulate light K ( n p w i ) (if >0) at f (with alpha blending) project depth-map w i irradiance-map

20 20 Computing irradiance map on the GPU Get N directions w 1..N sampling the unit sphere For each i in (1..N) : 1.render new depth-map from view direction w i 2.render over irradiance-map: for each patch: for each fragment (texel) f : 1.invert (u,v) map get pos p, normal n p 2.project p over depth-map & check visibility (compare depths) 3.if visibile, accumulate light K ( n p w i ) (if >0) at f (with alpha blending) depth-map w i irradiance-map Render flat impostors! - mid z (better result) - no z-displacing (much faster)

21 21 Computing irradiance map on the GPU Get N directions w 1..N sampling the unit sphere For each i in (1..N) : 1.render 2 new depth-map from view directions w i & -w i 2.render over irradiance-map: for each patch: for each fragment (texel) f : 1.invert (u,v) map get pos p, normal n p 2.project p over depth-map & check visibility (compare depths) 3.if visibile, accumulate light K ( n p w i ) (if >0) at f (with alpha blending) depth-map w i irradiance-map depth-map -w i

22 22 The rest of this talk: ad-hoc Advanced Rendering Techniques Impostors for spheres, cylinders Ambient occlusion (for impostors) Depth aware borders (for impostors ) Localized depth cueing effect (for impostors)

23 23 Depth aware borders Example See demo

24 24 Depth aware borders: how Single pass technique! A depth impostor CB

25 25 Depth aware borders: how Single pass technique! A depth impostor C B

26 26 Depth aware borders: how Single pass technique! A depth impostor C B

27 27 Depth aware borders: how Single pass technique! A depth impostor C B

28 28 The rest of this talk: ad-hoc Advanced Rendering Techniques Impostors for spheres, cylinders Ambient occlusion (for impostors) Depth aware borders (for impostors ) Localized depth cueing effect (for impostors)

29 29 Localized depth cueing (halos) Depth cueing (fog) common technique to visually separate far from near BUT: 1.far parts lose contrast (global loss of contrast) 2.cannot discriminate between too many planes Our alternative: localized depth cueing (halos) like fog, but concentrate effects near depth jumps! Similar to: [T.Luft, C.Colditz, O.Deussen. SIGGRAPH 2006] (parallel result) See Demo! Dalì Picasso SeuretMatisse

30 30 Localized depth cueing (halos) First pass: render geometry and depth buffer Second pass: (alpha blended) render coronas around each atom choose alpha according to screen distance to atom distance of current fragment depth from destination depth

31 31 Putting all together Combining: Impostors for spheres, cylinders. Ambient occlusion (for impostors) Depth aware borders (for impostors ) Localized depth cueing effect (for impostors) with standard techniques Direct light (Lambertian + Phong) Cast shadow Standard depth cueing (fog) Toon shading (for illustrative renderings) Antialiasing (render to 2x, resample to screen)

32 32 Implementation OpenSource project win installer unix, mac versions coming up reads PDB files exports hi res. images (e.g. for print publications) …and small animations (e.g. for web sites, presentations) Just Google for GIF animation


Download ppt "Ambient Occlusion and Edge Cueing for enhancing Real Time Molecular Visualization Marco Tarini, Paolo Cignoni, Claudio Montani."

Similar presentations


Ads by Google