Sie sind auf Seite 1von 29

Texture Mapping

Reference Material
The slides have used/adapted material from the following references:

1. Advanced Animation and Rendering Techniques by Watt and Watt


2. Course (CS5620) slides by Prof Kavita Bala, UNC
Texture Mapping
Texture Mapping

How do we model the surface details?

Explicit detailed geometry modeling


Expensive and may be unnecessary

Geometry and texture mapping

Shape Details
Texture Mapping

Mapping Function

Object : (x(u,v), y(u,v), z(u,v))


Texture : (s, t)

v
t
u

s
Texture Mapping

Mapping Function

Object : (x(u,v), y(u,v), z(u,v))


Texture : (s, t)

u = f(s, t) s = h(u, v)
!
v = g(s, t) t = i(u, v)

linear mapping
u = As + B
v = Ct + D
Texture Mapping

Mapping Function

Forward
Mapping
Texture Mapping

Mapping Function

Screen
Texture

Pixel

Inverse Mapping
Texture Mapping

Mapping Function
How does it work?

Cornell CS4620/5620 Fall 2012 !Lecture 20 2012 Kavita Bala 7


(with previous instructors James/Marschner, and some slides courtesy Leonard McMillan)
Texture Mapping

Examples

Simple patterns for skin, bricks, etc.


May need to repeat texture (tiling)
Texture Mapping

Examples

Requires establishing correspondence between


texture and surface points.
Texture Mapping
Mapping Function
Texture Mapping
Cylinder Mapping
Wrap texture along outside
Mapping Function bottom
This stops texture from bein

03/14/2002 15-462 G
Texture Mapping

Mapping Function
Texture Mapping

Mapping Function
Texture Mapping
Mapping Function
Texture Mapping
Images courtesy Tito Pagan
ll CS4620/5620 Fall 2012 !Lecture 20 2012 Kavita Bala 17
(with previous instructors James/Marschner, and some slides courtesy Leonard McMillan)

Box Mapping Function Cube Mapping


Box
Unwrap cube and map texture over the cube

ll CS4620/5620 Fall 2012 !Lecture 20 2012 Kavita Bala 18


(with previous instructors James/Marschner, and some slides courtesy Leonard McMillan)

03/14/2002 15-462 Graphics I


Texture Mapping
CylinderCylindrical
Mapping Function

Cornell CS4620/5620 Fall 2012 !Lecture 20 2012 Kavita Bala 19


(with previous instructors James/Marschner, and some slides courtesy Leonard McMillan)

Spherical
Cornell CS4620/5620 Fall 2012 !Lecture 20 2012 Kavita Bala 19
(with previous instructors James/Marschner, and some slides courtesy Leonard McMillan)

Texture Mapping
Spherical

Sphere Mapping Function

Cornell CS4620/5620 Fall 2012 !Lecture 20 2012 Kavita Bala 20


(with previous instructors James/Marschner, and some slides courtesy Leonard McMillan)
This step can be done in many ways
Texture Mapping
Normal from intermediate surface
Normal from object surface
Use center of object

03/14/2002 15-462 Graphics I 20


Texture Mapping
W rMapping
a p t h e Function
T e x ture onto th e Mod el
Texture Mapping
89:$:;$"<$%&"=
>9"'#:?#"@$',='A"&B'=,C@+"D'
Mapping Function
7--,89':";$%&"'<5==,89'$>'?++%@,85$,>8
Texture Mapping
:";$%&"'@5==,89'#58'A"'%B"-'$>'5+$"&'B>@"'>&'5++'>C'$D"'#>8B$58$B',8'$D"'
,++%@,85$,>8'"E%5$,>80'F"'#58'B,@=+G'%B"'$D"'$";$%&"'5B'$D"'C,85+'#>+>&'C>&'$D"'=,;"+H'
>&'I"'#58'J%B$'%B"',$'5B'-,CC%B"'#>+>&H'>&'I"'#58'%B"'$D"'$";$%&"'$>'5+$"&'$D"'8>&@5+H'
>&000'$D"'=>BB,A,+,$,"B'5&"'"8-+"BBK
Mapping Function

!"#$%&' ())*+,$-.,#$/0#12)

L>8B$58$'M,CC%B"'L>+>& M,CC%B"':";$%&"'L>+>& :";$%&"'%B"-'5B'!5A"+ :";$%&"'%B"-'5B'M,CC%B"'L>+>&

!"#$%&"'() *+,-"'.) /0123'45++'.66.


789,&:8;"8$'<5=>
789,&:8;"8$'<5=>
Environment Mapping
?@A',8>$"5-':@'%>,8B'$C"'&5D'@&:;'$C"'>%&@5#"'=:,8$'$:'$C"'=&:E"#$"-'
$"F$%&"G>'#"8$"&A'H"'%>"-'$C"' -,&"#$,:8 :@'$C"'&"@+"#$"-'&5D'$:',8-"F'5'
?@A',8>$"5-':@'%>,8B'$C"'&5D'@&:;'$C"'>%&@5#"'=:,8$'$:'$C"'=&:E"#$"-'
$"F$%&"';5=1'I"'#58'>,;%+5$"'&"@+"#$,:8>1'JC,>'5==&:5#C',>'8:$'#:;=+"$"+D'
$"F$%&"G>'#"8$"&A'H"'%>"-'$C"'-,&"#$,:8 :@'$C"'&"@+"#$"-'&5D'$:',8-"F'5'
5##%&5$"1'?$'5>>%;">'$C5$'5++'&"@+"#$"-'&5D>'K"B,8'@&:;'$C"'>5;" =:,8$1
$"F$%&"';5=1'I"'#58'>,;%+5$"'&"@+"#$,:8>1'JC,>'5==&:5#C',>'8:$'#:;=+"$"+D'
Mapping Function
5##%&5$"1'?$'5>>%;">'$C5$'5++'&"@+"#$"-'&5D>'K"B,8'@&:;'$C"'>5;" =:,8$1

!"#$%&"'() *+,-"'./ 01/23'45++'.66.


Bump Mapping
Bump Mapping *
7%89'8499,:;
*
,*
7%89'8499,:; ,*
BA'F%'4:-'FD'4&"'=&$G=;=:4+'4:-'C',?':=&84+,H"-I
* (*
BA'F%'4:-'FD'4&"'=&$G=;=:4+'4:-'C',?':=&84+,H"-I
!# $ $# # "!"! B:,$,4+'9=,:$
'* % &$# # "!# % $# # "7%89'8499,:; (
& * (*c
* ,
&' * ( c*
!
' %
* * * *& $# # " !# % $# # " !# $ $ # # " !" B:,$,4+'9=,:$
BA'F%'4:-'FD'4&"'=&$G=;=:4+'4:-'C',?':=&84+,H"-I
('
(* '*# u '*" C=&84+ ' % &$# # "!# % $# # "!# $ $# # "!" !
B:,$,4+'9=,:$
& '&' ( c '*
* '*# u '" C=&84+
( * *
'*c '*  ) $## ("* ! (
* *
' u '*,8%+4$"-'"+"D4$"-'9=,:$'4A$"&'>%89
C=&84+ '&' '& ,* ,* "
*
**
# "
*
' ' , '*#
'c '  ) $##'"c ! ( '  )*,8%+4$"-'"+"D4$"-'9=,:$'4A$"&'>%89
$ ## " ! ( *,8%+4$"-'"+"D4$"-'9=,:$'4A$"&'>%89 *
'
'#
#

E4&,4$,=:'=A':=&84+',:'%'-,&"#$,=:
E4&,4$,=:'=A':=&84+',:'%'-,&"#$,=:
* * * * ) $ +  '# * !  ) $ +  '# * !
* * * ( c | (  )# '#  )" '"
* )#
) $ +  '# * !  ) $ +  '# * !
&'
E4&,4$,=:'=A':=&84+',:'%'-,&"#$,=:

)
(*c | (*  )# '*#  )" '*" *
,
#
)"
) $ + # *  ' !  ) $ +# *  ' !
) $ +  '# * !& ' ) $ +  '# * !
c
)# &'
( | (  )# '# , )" '"
*
)"
) $ +# *  '! &')$ +# *  '!
E4&,4$,=:'=A':=&84+',:'D'-,&"#$,=:


*
<=89%$"'>%89'849'94&$,4+?'
!&' ) $ +# *  ' !
) $ +# *  '>@':%8"&,#4+'-,AA"&":$,4$,=:
, )" E4&,4$,=:'=A':=&84+',:'D'-,&"#$,=:
!"#$%&"'() *+,-"'./
'
&01/.2'34++'5665
E4&,4$,=:'=A':=&84+',:'D'-,&"#$,=:
<=89%$"'>%89'849'94&$,
>@':%8"&,#4+'-,AA"&":$,4$,=
<=89%$"'>%89'849'94&$
Bump Mapping
8%9:'96::,;<'-"&,=6$,>; |%
* * *
* * "#$ " %! ! ** "$ ! "! $
#c # * #$c
#$  *  *
! ! !
|%
* *
1&&2'-+"+0&+,-./+&'())*** * * "% ! "! %
* * * #%c #%  *  *
! c #$c u #%c ! !
* * * * * *
* * * "$ # ! u #% ! "% # #$ u ! ! "$ "% # ! u ! !
! c | #$ u #%  *  *  * $
! ! !
* * * * * * * * *
728+#$ u #% ! "+#$ u 6  ! u #$ +(45+ ! u ! %+&3
* * * *
* * "$ # ! u #% ! "% # ! u #$ !
!c | !  *  *
! !
!"#$%&"'() *+,-"'./ 01234'56++'7//7
Bump Mapping
89&"':%;<'85<'=>5;<+"?

:%;<'85<

@A+,B-"&'CDE,FF%?"'G">$%&"'85< @A+,B-"&'CDG">$%&"'85<'H':%;<'85<
8,9:+5#";"<$'=5::,<>
Displacement Mapping
?"'%9"'$@"'$"A$%&"';5:'$B'5#$%5++C';BD"'$@"'9%&E5#"':B,<$1'F@,9',9'#5++"-'
-,9:+5#";"<$';5::,<>1'GBH',9'$@,9'E%<-5;"<$5++C'-,EE"&"<$'$@5<'I%;:'
;5::,<>J

F@"'>"B;"$&C';%9$'I"'-,9:+5#"-'I"EB&"'D,9,I,+,$C',9'-"$"&;,<"-1'K9'$@,9'
"59,+C'-B<"',<'$@"'>&5:@,#9':,:"+,<"J'K<'5'&5CL$&5#"&J

Das könnte Ihnen auch gefallen