2.5D Clip-Surfaces for Technical Visualization
Matthias Trapp & Jürgen Döllner
Hasso-Plattner-Institut, University of Potsdam, Germany
WSCG 2013
21st International Conference in Central Europe on Computer Graphics, Visualization and Computer Vision, 2013
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner2
Clippling-Plane vs. 2.5D Clip-Surface
Original Mesh
w/o Clipping
Clipping using
Half-Space Test
Clipping using a
2.5D Clip-Surface (CS)
h
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner3
Motivation
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner4
Exemplary Result
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner5
Motivation – Wrap Up
2.5 Clip-Surfaces (CS):
 Enables non-planar cut-surfaces
 Create more sophisticated cut-away views
Contributions:
 Extended clipping-plane parameterization
 Automatic cap-surface generation
Implementation Goals:
 Hardware-accelerated rendering
 Interactive configuration
 Material
 Silhouettes
 Lighting & Shading
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner6
Outline
Clipping using 2.5D Clip-Surfaces
Creating & Rendering of Cap-Surfaces
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner7
2.5D Clip-Surface Parameterization
 O Plane Origin
 U, V Direction Vectors
 S = (sx,sy,sz) Scaling Vector
 OM Offsetmap
VectorScaling
TexturemapOffset
NormalPlane
VectorsDirection,
Origin
,,,,,
3
3
3
RS
OM
VUN
RVU
RO
SOMVUOCS
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner8
Clipping Equation
y
N
x
N
N
zsample
s
V
VOP
s
U
UOP
T
NNOPPP
otherwisefalse
sTOMfONNPtrue
PCSclip
,
0,
,
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner9
GLSL Implementation
bool clipReliefPlane(in mat4 config, // configuration matrix
in vec4 point, // position in eye-space
in sampler2D reliefSampler) // 2D relief texture
{ // compute plane in eye space...
vec3 O = (gl_ModelViewMatrix * vec4(config[0].xyz, 1.0)).xyz;
vec3 A = normalize( gl_NormalMatrix * normalize(config[1].xyz) );
vec3 B = normalize( gl_NormalMatrix * normalize(config[2].xyz) );
vec3 N = cross(A, B);
// project current fragment coordinate on plane
vec3 pV = point.xyz - dot(point.xyz - O, N) * N;
// compute offset texture coordinates
float s = dot(pV - O, A) / length(config[1].xyz);
float t = dot(pV - O, B) / length(config[2].xyz);
// fetch height... maybe zero
float height = texture2D(reliefSampler, vec2(s,t) * config[3].st).x;
// compute reference plane
float plane = dot(point.xyz, N) - dot(N, O) + (height * config[3].z );
// perform clipping
return (plane < 0.0 && bool(config[3].w));
}
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner10
Multiple 2.5D Clip-Surfaces
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner
Capping Openings – Real-World Example
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner12
Capping Approach
Goals:
 Convey material / inner structure of the input mesh
 Enable assisted modeling of cap-surface appearance
Approach:
 Compute polygonal cap-surface from 2.5D clip-surface
 Subsequent rendering after the clipping pass
=+
Clipped Mesh Cap-Surface Final Result
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner13
Generating the Cap-Surface
A B
CS Derived Surface Clipped Surface
A: Generate Cap-Surface:
 Use Dynamic Mesh Refinement or Tessellation Shader
 Perform displacement, shading, texturing,…
B: Clip Cap-Surface to Opening of the Clipped Mesh:
 Clip “outside” parts of the cap-surface
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner14
Clipping the Cap-Surface
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner15
Capping – Challenges for 2.5D Surfaces
Cap
Capping Clipping Planes:
Render planar mesh using back-face
information and stencil test
Capping 2.5D Clip-Surfaces:
Back-face information does not
determine non-planar surface
completely
Back Faces CapCap
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner16
Decision Problem
Is a point P on the cap-surface inside a solid mesh S ?
Volumetric depth-test approach [Trapp08] :
Additional data structure required:
 Layered Depth Image (LDI) [Shade98]
 Image-based representation of shape volume
 Computed in pre-processing using depth-peeling [Everitt01]
SPOutside
SPInside
SPVDT ,
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner17
Example of a Layered Depth Image
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner18
Volumetric Depth Test
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner19
Volumetric Depth Test – Performance
2 FS 2 BS
2 LS
4 FS 4 BS
4 LS
8 FS 8 BS
8 LS
10 FS 10 BS
10 LS
14 FS 14 BS
14 LS
16 FS 16 BS
16 LS
400
500
600
700
800
900
1000
1100
640x480
800x600
1024x768
1600x1200
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner20
Application Examples
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner21
Application Examples
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner22
Wrap-Up
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner23
Conclusions
Summary
 Advanced clipping approach for non-planar surfaces
 Multi-pass real-time rendering technique
 Fully implemented on GPU
Drawbacks
 Requires additional data structure
 Requires high-tessellated cap-surface
Future Work
 Direct manipulation techniques
 Stencil-routed A-Buffer [Myers07] instead of LDI
2.5D Clip-Surfaces for Technical Visualization :: Matthias Trapp & Jürgen Döllner24
Thank You ! - Questions ?
Contact:
Matthias Trapp
matthias.trapp@hpi.uni.potsdam.de
Jürgen Döllner
juergen.doellner@hpi.uni.potsdam.de
Computer Graphics Systems Group
http://www.hpi.uni-potsdam.de/doellner/

2.5D Clip-Surfaces for Technical Visualization

  • 1.
    2.5D Clip-Surfaces forTechnical Visualization Matthias Trapp & Jürgen Döllner Hasso-Plattner-Institut, University of Potsdam, Germany WSCG 2013 21st International Conference in Central Europe on Computer Graphics, Visualization and Computer Vision, 2013
  • 2.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner2 Clippling-Plane vs. 2.5D Clip-Surface Original Mesh w/o Clipping Clipping using Half-Space Test Clipping using a 2.5D Clip-Surface (CS) h
  • 3.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner3 Motivation
  • 4.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner4 Exemplary Result
  • 5.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner5 Motivation – Wrap Up 2.5 Clip-Surfaces (CS):  Enables non-planar cut-surfaces  Create more sophisticated cut-away views Contributions:  Extended clipping-plane parameterization  Automatic cap-surface generation Implementation Goals:  Hardware-accelerated rendering  Interactive configuration  Material  Silhouettes  Lighting & Shading
  • 6.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner6 Outline Clipping using 2.5D Clip-Surfaces Creating & Rendering of Cap-Surfaces
  • 7.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner7 2.5D Clip-Surface Parameterization  O Plane Origin  U, V Direction Vectors  S = (sx,sy,sz) Scaling Vector  OM Offsetmap VectorScaling TexturemapOffset NormalPlane VectorsDirection, Origin ,,,,, 3 3 3 RS OM VUN RVU RO SOMVUOCS
  • 8.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner8 Clipping Equation y N x N N zsample s V VOP s U UOP T NNOPPP otherwisefalse sTOMfONNPtrue PCSclip , 0, ,
  • 9.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner9 GLSL Implementation bool clipReliefPlane(in mat4 config, // configuration matrix in vec4 point, // position in eye-space in sampler2D reliefSampler) // 2D relief texture { // compute plane in eye space... vec3 O = (gl_ModelViewMatrix * vec4(config[0].xyz, 1.0)).xyz; vec3 A = normalize( gl_NormalMatrix * normalize(config[1].xyz) ); vec3 B = normalize( gl_NormalMatrix * normalize(config[2].xyz) ); vec3 N = cross(A, B); // project current fragment coordinate on plane vec3 pV = point.xyz - dot(point.xyz - O, N) * N; // compute offset texture coordinates float s = dot(pV - O, A) / length(config[1].xyz); float t = dot(pV - O, B) / length(config[2].xyz); // fetch height... maybe zero float height = texture2D(reliefSampler, vec2(s,t) * config[3].st).x; // compute reference plane float plane = dot(point.xyz, N) - dot(N, O) + (height * config[3].z ); // perform clipping return (plane < 0.0 && bool(config[3].w)); }
  • 10.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner10 Multiple 2.5D Clip-Surfaces
  • 11.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner Capping Openings – Real-World Example
  • 12.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner12 Capping Approach Goals:  Convey material / inner structure of the input mesh  Enable assisted modeling of cap-surface appearance Approach:  Compute polygonal cap-surface from 2.5D clip-surface  Subsequent rendering after the clipping pass =+ Clipped Mesh Cap-Surface Final Result
  • 13.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner13 Generating the Cap-Surface A B CS Derived Surface Clipped Surface A: Generate Cap-Surface:  Use Dynamic Mesh Refinement or Tessellation Shader  Perform displacement, shading, texturing,… B: Clip Cap-Surface to Opening of the Clipped Mesh:  Clip “outside” parts of the cap-surface
  • 14.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner14 Clipping the Cap-Surface
  • 15.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner15 Capping – Challenges for 2.5D Surfaces Cap Capping Clipping Planes: Render planar mesh using back-face information and stencil test Capping 2.5D Clip-Surfaces: Back-face information does not determine non-planar surface completely Back Faces CapCap
  • 16.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner16 Decision Problem Is a point P on the cap-surface inside a solid mesh S ? Volumetric depth-test approach [Trapp08] : Additional data structure required:  Layered Depth Image (LDI) [Shade98]  Image-based representation of shape volume  Computed in pre-processing using depth-peeling [Everitt01] SPOutside SPInside SPVDT ,
  • 17.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner17 Example of a Layered Depth Image
  • 18.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner18 Volumetric Depth Test
  • 19.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner19 Volumetric Depth Test – Performance 2 FS 2 BS 2 LS 4 FS 4 BS 4 LS 8 FS 8 BS 8 LS 10 FS 10 BS 10 LS 14 FS 14 BS 14 LS 16 FS 16 BS 16 LS 400 500 600 700 800 900 1000 1100 640x480 800x600 1024x768 1600x1200
  • 20.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner20 Application Examples
  • 21.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner21 Application Examples
  • 22.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner22 Wrap-Up
  • 23.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner23 Conclusions Summary  Advanced clipping approach for non-planar surfaces  Multi-pass real-time rendering technique  Fully implemented on GPU Drawbacks  Requires additional data structure  Requires high-tessellated cap-surface Future Work  Direct manipulation techniques  Stencil-routed A-Buffer [Myers07] instead of LDI
  • 24.
    2.5D Clip-Surfaces forTechnical Visualization :: Matthias Trapp & Jürgen Döllner24 Thank You ! - Questions ? Contact: Matthias Trapp matthias.trapp@hpi.uni.potsdam.de Jürgen Döllner juergen.doellner@hpi.uni.potsdam.de Computer Graphics Systems Group http://www.hpi.uni-potsdam.de/doellner/