Title: Rendering Geometry with Relief Textures
1Rendering Geometry withRelief Textures
- L.Baboud X.Décoret
- ARTIS-GRAVIR/IMAG-INRIA
2Height-field representation
- What can we represent?
- How to render it?
- Fast ?
- Exact?
- Previous work
- Our contributions
3Height-field
- Function from 0,12 to 0,1
- Represents a surface
- Sampled in a texture
- Memory/GPU efficient
(a) Height texture
(b) Reconstructed surface
4Height-field
- Function from 0,12 to 0,1
- Represents a surface
- Sampled in a texture
- Memory/GPU efficient
(a) nearest
- Theory How do you reconstruct?
- Practice Which interpolation for texture
lookups?
(b) linear
Refer to the paper for details
5How to render?
- Polygonalize
- Simple natural
- Costly, not output sensitive
- Aliasing -gt LOD
Small coverage
- What if the object is not the main one?
- Bump
- Small objects
Large coverage
6How to render?
- Polygonalize
- Simple natural
- Costly, not output sensitive
- Aliasing -gt LOD
- Ray-tracing
- Slow? Feasible on GPU!
- Output sensitive
7Ray-tracing
- Existing solution VDM Wang 2003
- Sampling in all viewing directions
- Memory costly (4 Mb compressed for 128x128)
- Use GPU capabilities instead
8Principle (1/2)
Top view
2D slice
9Principle (2/2)
- Comparing heights
- Along ray
- In the heightfield
- Until we pass below
10Policarpo I3D 05
Binary search
How many iterations?
Is it correct?
11Policarpo I3D 05
12Policarpo I3D 05
Fixed size steps
Binary search
Better but still potentially false
13Policarpo I3D 05
Fixed size steps
Binary search
Missed intersection
Amounts to vertical slicing
Size of steps along the ray depends on ray tilt
14Policarpo I3D 05
15Tatarchuk I3D06
- Varying size steps (between two bounds)
- Depending on ray tilt
16Conclusion on existing methods
- Advantages speed
- Drawbacks missed intersections (at grazing
angles)
Policarpo05
Tatarchuk06
17Being exact, what for?
- Intellectually rewarding ?
- Usability large scale geometry
- Terrain, buildings, architectural details
- Objects (cars, etc.)
How many polygons ?
18Being exact, what for?
- Intellectually rewarding ?
- Usability large scale geometry
- Terrain, buildings, architectural details
- Objects (cars, etc.)
Only 6 quads !
19Being exact, is it hard?
- Problem with constant steps
- Can always miss intersections
20Being exact, is it hard?
- Problem with constant steps
- Can always miss intersections
- Travel slowly above empty space
21Being exact, is it hard?
- Problem with constant steps
- Can always miss intersections
- Travel slowly above empty space
- Our contributions
- Amanatides based approach
- Failsafe approach
- But requires preprocess
solves
22Adapted Amanatides traversal
- We run along the ray on texel edges
23Adapted Amanatides traversal
- We run along the ray on texel edges
- Advantages
- very simple iterations
- exact intersection
fragment shader main loop
24Adapted Amanatides traversal
- We run along the ray on texel edges
- Advantages
- very simple iterations
- exact intersection
- Drawbacks
- potentially many iterations
- texture resolution dependent
25Adapted Amanatides traversal
- Texture resolution dependent
- Double resolution ? half speed
- Ideally should depend on variations of
heightfield, not sampling frequency - Binary search doesnt have this drawback
- Constant number of texture lookups
26Analysis of binary search
- At the moment we pass below
- At least one intersection
- But potentially several
?
2D slice
27Analysis of binary search
- At the moment we pass below
- At least one intersection
- But potentially several
- Ideally at most one intersection
?
2D slice
How can we guarantee this?
Precompute safety radius
28What is safety radius ?
Which step ?
T
Precomputed radius
?
For any possible viewing ray passing above T
Top view
29What is safety radius ?
Viewing direction
30What is safety radius ?
- Local information
- In 3D for each texel
- Scan every direction
- Keep the minimum radius
31Failsafe binary search
32Failsafe binary search
33Failsafe binary search
34Failsafe binary search
35Failsafe binary search
36Failsafe binary search
37Failsafe binary search
38Failsafe binary search
39Failsafe binary search
40Failsafe binary search
41Various details
- Textures
- Can have different resolutions
- Normal, color, height
- Can be packed/compressed
- Needs recent fragment shaders supporting dynamic
loops
42Results
- Fast and exact
- Height-field regularity dependent
- Correct interaction with Z-buffer
- Output sensitive
43Height-field representation
- What can we represent?
- How to render it?
- Fast ?
- Exact?
- Previous work
- Our contributions
44More than bump
- Previous methods small scale bump
- Curved surfaces warping considerations
- VDM Wang 03
- Policarpo05
- We want to do large scale
- Problem limited expressiveness
- orthogonal height-fields
45Expressiveness of heightfields
- Lack of samples on vertical sides
46Projective height-fields
47Projective height-fields
- Similar to cubist images Hanson 98
- Projective transforms preserve lines
- Unmodified algorithm
48Projective height-fields
- Wasted fillrate
- Many eventually discarded fragments
- Easy to solve clip the bounding box
(a) not clipped
(b) clipped
49Multiple height-fields
50Conclusion
- Remember fast and exact is possible!
- Efficient representation
- Small memory footprint
- Automatic LOD
- Two useful methods (dynamic/static)
51Future
- Geometry representable with heightfields
- Because we are exact
- Model directly with heightfields
- Photoshop 3D Mok01
- Apply to judicious situations
52Future