计算机图形学computer graphics课件18.ppt
《计算机图形学computer graphics课件18.ppt》由会员分享,可在线阅读,更多相关《计算机图形学computer graphics课件18.ppt(59页珍藏版)》请在三一文库上搜索。
1、Texture Mapping Software College, Shandong University Instructor: Zhou Yuanfeng E-mail: 纬 毫 曙 蓉 剩 技 扣 油 列 须 敲 妖 舞 淆 鹿 崭 啥 宦 临 舅 位 玫 奄 蚕 笼 想 瑶 桥 炯 酋 臂 辞 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 2 敞 莎 佳 邦 睹 本 榆 弹 碳 莆 卯 擂 肾 隘 疤 喇 定 甸 瞩 拂 助
2、 商 只 腻 渡 风 槽 赠 漱 娜 尿 锈 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 3 Objectives Introduce Mapping Methods Texture Mapping Environment Mapping Bump Mapping Consider basic strategies Forward vs backward mapping Point sampling vs area averagin
3、g 拄 奠 妹 疙 窜 乓 柠 寺 炕 自 哼 吃 冻 贷 胯 扩 碟 猫 典 闺 鼓 缮 雌 菱 及 岸 叶 澜 胸 山 悍 谅 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 4 The Limits of Geometric Modeling Although graphics cards can render over 10 million polygons per second, that number is insuffic
4、ient for many phenomena Clouds Grass Terrain Skin, hair Water and fire 股 吭 沦 膏 泊 紧 鞭 凌 稳 蚀 桶 各 懦 涸 缠 毗 蘸 粪 棒 广 至 愤 佑 函 遏 棚 堑 颧 柑 昂 竭 痊 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 5 Modeling an Orange Consider the problem of modeling an oran
5、ge (the fruit) Start with an orangecolored sphere Too simple Replace sphere with a more complex shape Does not capture surface characteristics (small dimples) Takes too many polygons to model all the dimples 事 甄 麻 腕 氟 号 滓 炳 垣 坎 库 冷 尸 略 饮 考 挺 耙 茄 四 颠 绍 侄 侈 溃 酱 喝 望 斩 忱 汲 岸 计 算 机 图 形 学 c o m p u t e r
6、g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 6 Modeling an Orange (2) Take a picture of a real orange, scan it, and “paste” onto simple geometric model This process is known as texture mapping Still might not be sufficient because resulting surface will be smooth Need
7、to change local shape Bump mapping + 汽 渗 叛 榔 愧 卞 碴 紊 膘 碉 劝 笨 激 敲 撩 铲 扇 并 钱 傣 鳃 细 劲 园 逻 恍 膊 绕 湛 妊 榨 芝 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 7 Three Types of Mapping Texture Mapping Uses images to fill inside of polygons Environment (re
8、flection mapping) Uses a picture of the environment for texture maps Allows simulation of highly specular surfaces Bump mapping Emulates altering normal vectors during the rendering process 摘 槽 替 姻 说 高 娟 纸 慈 予 痴 犹 羞 掣 呢 肿 足 脊 占 洛 心 叙 助 悲 究 垦 洞 峙 官 啸 寿 开 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课
9、件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 8 Texture Mapping geometric modeltexture mapped 很 僳 箩 绢 职 帚 韦 民 渗 映 匪 篱 削 崩 缕 泊 走 抢 浩 酸 种 讫 焊 沙 贷 厘 滩 造 个 颜 盛 局 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 9 Environment Mapping 寸 胎
10、涟 嵌 撼 观 由 囊 火 剐 拙 渺 嘘 绰 片 冰 羹 有 抛 矽 勘 靡 只 躁 烤 红 像 崎 忽 罐 倍 虱 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 10 Bump Mapping += original surfacebump mapmodified surface 都 丽 脾 走 郴 错 饮 已 恿 指 叶 堵 阔 观 姜 辕 牧 具 摇 古 颊 萄 丸 越 插 镶 荷 葫 郸 檬 文 峻 计 算 机 图 形 学
11、c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 11 Where does mapping take place? Mapping techniques are implemented at the end of the rendering pipeline Very efficient because few polygons make it past the clipper 奎 佳 瘸 黍 粗 战 妮 赊 根 期 汲 莹 睬 捻 碾 腮 蜂 佃 疗 笋 馋
12、 氢 命 料 里 癸 戌 时 扯 脸 曙 究 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 12 Is it simple? Although the idea is simplemap an image to a surfacethere are 3 or 4 coordinate systems involved 2D image 3D surface 筑 措 尿 胳 广 徘 炔 仟 祝 酷 脐 瞪 柄 说 中 贩 乒 托 逸 滓
13、 壬 仟 腹 启 闪 篙 吝 伪 亦 驮 服 焰 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 13 Coordinate Systems Parametric coordinates May be used to model curves and surfaces Texture coordinates Used to identify points in the image to be mapped Object or World
14、 Coordinates Conceptually, where the mapping takes place Window Coordinates Where the final image is really produced 慕 伊 篓 估 憋 铂 罚 戈 筷 期 辉 萧 谜 杀 铀 拒 丘 趋 赖 林 打 融 绒 钻 蔓 镀 婪 蔓 狞 阴 力 磷 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 14 Texture Mapp
15、ing parametric coordinates texture coordinates world coordinates window coordinates 律 帕 两 勘 尽 娜 詹 火 祈 跳 畸 嘎 扣 郎 疽 搐 沥 当 窜 堪 泣 踩 亭 笨 刷 杰 窖 恍 副 诸 愈 蓄 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 15 Mapping Functions Basic problem is how to fin
16、d the maps Consider mapping from texture coordinates to a point a surface Appear to need three functions x = x(s,t) y = y(s,t) z = z(s,t) But we really want to go the other way s t (x,y,z) 犹 尊 鲍 跳 涝 究 躁 陕 签 土 肺 索 洼 柱 收 慧 刀 殴 杯 蛔 黄 鸽 蝶 巧 瀑 闺 肝 扰 唯 镀 蛾 厚 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件
17、 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 16 Backward Mapping We really want to go backwards Given a pixel, we want to know to which point on an object it corresponds Given a point on an object, we want to know to which point in the texture it corresponds Need a map of the form s = s(
18、x,y,z) t = t(x,y,z) Such functions are difficult to find in general 烘 夺 姑 妓 斜 搽 乎 侮 惨 咖 轿 肋 券 名 罪 姥 德 那 霄 凡 浑 祝 溜 打 济 桔 坎 烹 夹 波 伊 馒 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 Parameterization 17 斡 慎 柯 篆 酱 嫌 呐 龟 臂 售 烹 代 绣 郴 勋 践 渐 霍 烦 铭 敬 徊
19、俐 基 杭 备 损 历 棱 侈 轰 嫉 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 18 Two-part mapping One solution to the mapping problem is to first map the texture to a simple intermediate surface Example: map to cylinder 语 杆 戳 丘 碘 嚎 鸣 蓬 廉 坝 拨 何 煽 挛 筹 宿 莹
20、恢 巷 痒 檀 待 迁 挛 祷 脯 涕 额 卿 嘘 荧 图 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 19 Cylindrical Mapping parametric cylinder x = r cos (2pi u) y = r sin (2pi u) z = v/h maps rectangle in u,v space to cylinder of radius r and height h in world coord
21、inates s = u t = v maps from texture space 摆 寥 牲 辟 吉 羊 蘸 灾 隐 巾 烧 宅 酝 拽 饱 必 骂 贮 嗓 驯 冠 匈 占 泳 卸 贼 硒 侍 式 帽 做 乒 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 Cylindrical Mapping 20 Mapping: z z (a) texture(b)cylindrical x y r h (c)mapping x y (d)b
22、 a(c) 1 1 卜 垃 击 疹 侗 脾 土 奋 轻 鬼 弹 岩 缎 祭 胚 坊 痹 赔 予 磅 花 拓 据 叹 凋 羌 嚏 歹 荔 蛛 蓉 晃 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 Cylindrical Mapping 21 Map u and v to points a,b,c,d: (1) : (2) : (3) : (4) : Solving: From texture to cylindrical paramet
23、ers: From cylindrical parameters to texture: 缀 撞 衔 皖 寺 磨 婪 堆 稀 羔 初 萍 赁 弧 械 汇 细 颧 室 妮 磋 嚷 恭 卤 躺 百 抠 卡 提 萎 锋 疤 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 22 Spherical Mapping We can use a parametric sphere x = r cos 2piu y = r sin 2pu cos 2p
24、iv z = r sin 2pu sin 2piv in a similar manner to the cylinder but have to decide where to put the distortion Spheres are used in environmental maps 察 罕 色 液 弥 瓶 淮 甭 帆 荒 羔 匠 矣 烬 文 履 童 皇 薪 刨 擎 错 抱 闲 汕 吱 凛 姑 娄 缉 悟 莫 计 算 机 图 形 学 c o m p u t e r g r a p h i c s 课 件 1 8 计 算 机 图 形 学 c o m p u t e r g r a p
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 计算机图形学computer graphics课件18 计算机 图形学 computer graphics 课件 18
链接地址:https://www.31doc.com/p-5879316.html