Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

38
Interactive Rendering of Meso- structure Surface Details using Semi-transparent 3D Textures Vision, Modeling, Visualization Erlangen, Germany November 16-18, 2005 Jean-François Dufort, Luc Leblanc, Pierre Poulin LIGUM, Université de Montréal

description

Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures. Vision, Modeling, Visualization Erlangen, Germany November 16-18, 2005. Jean-François Dufort, Luc Leblanc, Pierre Poulin LIGUM, Université de Montréal. Goals and Motivation. - PowerPoint PPT Presentation

Transcript of Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Page 1: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Vision, Modeling, Visualization Erlangen, Germany

November 16-18, 2005Jean-François Dufort, Luc Leblanc, Pierre Poulin

LIGUM, Université de Montréal

Page 2: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Goals and Motivation Hardware rendering semi-transparent details Flexible

Arbitrary mesh and 3D texture Mesh animation Texture animation

Semi-transparency neglected in most applications Important rendering features

Color blending because of semi-transparency Filtering Displaced silhouettes

Page 3: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Motivation

Page 4: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Motivation

Page 5: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Previous Work :Bump and Parallax mapping

[Welsh 2004]

Page 6: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Previous Work : Displacement Mapping

[Wang et al. 2003]

Adaptive tesselation [Moule and McCool 2002]

View-dependent displacement map [Wang et al. 2003]

Ray-tracing in height field [Hirche et al. 2003]

Page 7: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Previous Work : 3D Textures

Using proxy geometry

[Meyer and Neyret 1998]

[Lensch et al. 2002]

Generalized displacement maps

[Wang et al. 2004]

Shells maps

[Porumbescu et al. 2005] [Wang et al. 2004]

Page 8: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Previous Work :Volume Rendering

Data inside a grid Regular Tetrahedra [Kraus et al. 2004]

Ray marching

Page 9: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Plan

Algorithm overview Mesh processing Tetrahedra sorting Vertex shader: Ray construction Fragment shader: Opacity/color integration Results Conclusion and future work

Page 10: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Algorithm Overview

Mesh extrusionCPU

• Computed once

• Extrude a shell from the surface triangular mesh

• Divide each shell prism into three tetrahedra

Page 11: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Algorithm Overview

Mesh extrusionCPU Tetrahedra sorting

• Alpha blending involves sorting

• Sorting tetrahedra with the SXMPVO algorithm

Page 12: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Algorithm Overview

Mesh extrusionCPU

GPU

Tetrahedra sorting

Ray creation

• Vertex shader

• Defines an object-space ray within each tetrahedron

Page 13: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Algorithm Overview

Mesh extrusionCPU

GPU

Tetrahedra sorting

Ray creation Rendering loop

Color integration

• Per pixel, maps object ray in

texture space

• 3D texture sampling by ray marching

• Accumulate color in frame buffer

Page 14: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Mesh Processing

We map tetrahedra on base mesh Defines a tetrahedral shell in which the 3D

texture is mapped

Page 15: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Mesh Processing

Page 16: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Mesh Processing

Page 17: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Mesh Processing

Affine transformation from object space to texture space

Ptex = Mobj->tex Pobj

Page 18: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Tetrahedra Sorting

Alpha blending requires sorting SXMPVO: graph of « behind » relations

[Cook et al. 2004]

GA

B CF

E

D

Page 19: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Tetrahedra Sorting

Adjacent faces : object space

A

B C

G

F

E

D

Page 20: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Tetrahedra Sorting

Non-adjacent faces using A-buffer : screen space

A

B C

G

F

E

D

Page 21: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Tetrahedra Sorting

Non-adjacent faces using A-buffer : screen space

A

B C

G

F

E

D

Page 22: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Tetrahedra Sorting Depth-first traversal

A

B

D

E

CF

G

F

F

G

G

E

E

C

C

D

D

B

B

A

A

A

B CF

E

DG

Page 23: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Ray Construction

Tetrahedra sent down the pipeline Each vertex has

View vector Plane equation of other three faces

Vertex shader computes ray intersection with faces

Page 24: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Ray Construction : 2D Example Red triangle rasterized

Vertices A and B, Planes F1 and F2

B

F1

F2

A

Page 25: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Ray Construction : 2D Example Compute distance between A and other faces from viewpoint

AIA1

IA2

Page 26: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Ray Construction : 2D Example Compute distance between B and other faces from viewpoint

BIB1

IB2

Page 27: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Ray Construction : 2D Example Rasterization interpolates distances for each pixel covered

We keep the closest valid point

B

A

Page 28: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Color/Opacity Integration

Fragment shader picks closest valid intersection point

Matrix Mobj->tex maps point in texture space Defines texture ray in texture space Ray marching

Page 29: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Color/Opacity Integration 3D normal map for

shading Front-to-back blending Alpha at sample

location is modified based on distance traveled by light in object space

Page 30: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Performances

Implemented 2 schemes Uniform sampling DDA grid traversal

Brute force uniform sampling worked best in our test cases (3D textures 512x512x32) Fixed number of iterations User defined, trade-off for quality

Main bottleneck : sorting on CPU

Page 31: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Results : Filtering

Page 32: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Results : Transparency

Page 33: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Results : Volumetric Shadows

Page 34: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Results : Simpler Opaque Case

Page 35: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Results : Real-time Video

Page 36: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Conclusion

We reached our goals Interactive rendering of arbitrary 3D textures using GPU Flexible: Semi-transparent and opaque Rendering effects (transparency, volumetric shadows) Allows animation of mesh and texture

However… Not fast enough for real time Improve performance with precomputation? Faster sampling scheme?

Page 37: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Future Work

Level-of-detail framework Geometric details filtering Improve shading effects

Absorption within 3D texture Light scattering

Page 38: Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures

Thank you! Questions?