Content uploaded by Matthias Trapp
Author content
All content in this area was uploaded by Matthias Trapp on Jan 02, 2019
Content may be subject to copyright.
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
1
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
2
Matthias Trapp, Jürgen Döllner
Hasso-Plattner-Institute, University of Potsdam, Germany
Relief Clipping Planes
For Real-Time Rendering
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
3
Results
Solid Mesh
Relief Clipping Plane
Input
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
4
Motivation
Relief Clipping Planes (RCP):
•Create more sophisticated cut-away views
•Enables non-regular cut-surfaces
Contributions:
•New clip plane parameterization
•Automatic cap-surface generation
Implementation Goals:
•Interactive configuration
•Use hardware acceleration
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
5
Relief Clip-Plane Parameterization
•O Plane Origin
•U, V Direction Vectors
•S = (sx,sy,sz) Scaling Vector
•OM Offsetmap
( )
Vector Scaling
TexturemapOffset
Normal Plane
VectorsDirection ,
Origin
,,,,,
3
3
3
RS
OM
VUN
RVU
RO
SOMVUORCP
=
=
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
6
Clipping Equation
( ) ( )
( )( )
( ) ( )
•−
•−
=
•−−=
+•−•
=
y
N
x
N
N
zsample
s
V
VOP
s
U
UOP
T
NNOPPP
otherwisefalse
sTOMfONNPtrue
PRCPclip
,
0,
,
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
7
GLSL Fragment-Shader Source
bool clipReliefPlane(in mat4 config, // configuration matrix
in vec4 point, // position in eye-space
in sampler2D reliefSampler) // 2D relief texture
{ // calculate 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;
// calculate clip 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;
// calculate reference plane
float plane = dot(point.xyz, N) - dot(N, O) + (height * config[3].z );
return (plane < 0.0 && bool(config[3].w)); // perform clipping }
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
8
Multiple Clipping Planes
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
9
Capping Openings – The Goal…
http://www.bmbikes.co.uk/photos/museumphotos/Broken 20R60-6 Crank.jpg
Assumption: Input Mesh is SOLID.
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
10
Capping –The Process
Goals:
•Convey material / inner structure of the input solid
•Enable assisted modeling of cap-surface appearance
Solution: Polygonal Cap-Surface
•Directly derived from relief-clipping plane
•Rendering after the clipping pass
=
+
Clipped Mesh Cap-Surface Final Result
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
11
Generating the Cap-Surface
AB
RCP Derived Surface Clipped Surface
Phase A:
•Dynamic Mesh Refinement on GPU [Boubekeur05]
•Perform displacement, shading, texturing,…
Phase B:
•Clip away “outside” parts of the cap-surface
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
12
Decision Problem
Which point Pof the cap-surface is inside a solid S?
Solution: Volumetric depth test
Needed: Additional data structure
•Layered Depth Image (LDI) [Shade98]
•Image-based representation of shape
•Computed in pre-processing [Everitt01]
( )
=SPOutside
SPInside
SPVDT ,
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
13
Example of Layered Depth Image
Depth Layers LDI = (LDI0,…,LDI7)
3D LDI Texture Space [0,1]3
Non-Convex Polygonal Mesh S with d = 8
3D World Space IR3
s
t
x
y
Depth-
Peeling
z
O O
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
14
Volumetric Depth Test
r
t
Tr
(s,1,0)
(s,0,1)
Ray R
Inside
Outside
d0d1d2d3
(s,0,0)
(Ts ,Tt ,0) (Ts ,Tt ,1)
pT =0 pT =1 pT =0 pT =1
S
(s,1,1)
[Trapp08]
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
15
Conclusions
Summary
•Advanced clipping approach
•Real-time rendering technique
•Fully implemented on GPU
Drawbacks
•Needs additional data structure
•Needs high-tessellated cap-surface
Future Work
•Generalized approach for clipping
:: ::
:: Relief Clipping Planes For Real-Time Rendering :: Matthias Trapp
:: ::
16
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/