Image-Based Rendering Relief textures
Download
Report
Transcript Image-Based Rendering Relief textures
Синтез изображений по
изображениям.
Рельефные текстуры
Сегодня на лекции
• Введение в Синтез Изображений по
Изображениям (Image-Based Rendering)
• Простейшие методы IBR
• Рельефные текстуры (relief textures)
Traditional Rendering
User input
For photorealism
texture maps,
survey data
• Modeling is hard
Modeling
Geometry
Textures
Light sources
Rendering
Images
• Rendering is slow
Image-Based Rendering
Основные идеи:
• Использование изображений (фотографий) в
качестве исходных данных
• Использование методов обработки изображений
для визуализации.
Image-Based Rendering
Images
For photorealism
user input
range scanners
• Fast modeling
Modeling
Images &
depth maps
Rendering
Images
• Complexity independent
rendering
Traditional vs. Image-based
Image based computer graphics has three main
advantages
• Photorealism of produced images
• The speed
• Simple modeling
Simplest IBR methods. Texture
Texture - is the simplest
of IBR methods.
Simplest IBR methods. Sprites
Texture + simple planar
geometry = Sprite
Sprites are taken from
certain camera position
(sprite camera)
Simplest IBR methods. Sprites
No geometry
information and...
Sprites are looking good
from view-points close
to the sprite camera, but
awful from others
3D model rendering distortions
What are we missing?
The effect of 3-dimensionality on the screen is a
combination of two effects: perspective
distortion and parallax
Sprites are capable of producing perspective
distortions but they are unable to produce
correct parallax effect
Sprites with Depth
Combine depth and
color:
Color texel now is a 3D
sample.
Warping
Using the samples zvalues, image can be
transformed (or
warped), to enchance
the image descriptive
power (realism)
Planar pinhole camera
Orthographic camera
3D point position from a
pinhole camera
u
X Center tP v Center tx
1
One image is not
enough to
determine location
of a point in 3D.
From two cameras
If we have two cameras, Camera1 and
Camera2 with different parameters,
capturing the same scene from different
locations, a point can be expressed as
X Center1 t1 x1 Center2 t2 x2
Warping example
Schematic view
Warping
x’ = warp(x)
Depth
map
Final
view
Parallax,
perspective projection,
translation
Relief textures
Most of modern 3D accelerators can
ultimately fast render textured triangles
=> We can use this capability to speed up
and simplify Image-Based Rendering
Such an algorithm is called Relief Textures
Schematic view
Software
Pre-warping
Relief
textures
Hardware
Texture mapping
Warped
textures
Parallax
Final
view
Perspective projection,
translation
New warping function
x’ = warp(x) = g(h(x), Poly),
where
– g(y, Poly) is texture-mapping function and usually
done in hardware
– h(x) is pre-warpring function
New warping function (2)
Prewarping function h(x) after some
optimizations looks like following:
u2 = (u1+mu[d])*nu[d];
v2 = (v1+mv[d])*nv[d];
Extremely simple, isn’t it?
Two stage warping example
Two stage warping example (2)
Filling holes
This sprite with depth
was warped to the new
viewpoint
Look how many empty
spaces on the women
face and hair at the
picture
Let’s call them holes
Two classes of holes
All the holes fall into
two classes by its
nature
• Resampling problem
• Missing information
Resampling
Before warping
After warping
Resampling methods
Methods to fill the holes
• Inverse warping
• Meshing
• Splatting
• Interpolation
Splatting
Draw a little cloud (splat) instead of a pixel
in desired image. This cloud has to be
opaque in its center becoming more and
more transparent to its sides
Features
• Relatively small computation cost
• Not all the holes are filled
Interpolation
Use the fact that u and v are independent
from each other after pre-warping (two-pass
algorithm) and linearly interpolate depth and
color in the intermediate and final images
Interpolation (2)
Пример
Пример 1
Пример 2