纹理映射学习笔记

概述

在这里插入图片描述

在这里插入图片描述

本文的纹理映射将三维曲面与二维的纹理建立对应关系。

曲面参数表达:
x = x ( s , t ) , y = y ( s , t ) , z = z ( s , t ) x = x(s,t), y = y(s,t), z=z(s,t) x=x(s,t),y=y(s,t),z=z(s,t)
在这里插入图片描述
即给定纹理坐标(s,t),我们能可以计算出曲面坐标(x,y,z)

映射

考虑由参数方程定义的曲面
p ( u , v ) = ( x ( u , v ) , y ( u , v ) , z ( u , v ) ) p(u,v)=(x(u,v),y(u,v),z(u,v)) p(u,v)=(x(u,v),y(u,v),z(u,v))
此时通常采用如下形式从纹理元素对应到曲面上的点
u = a s + b t + c , v = d s + e t + f u = as + bt + c, v = ds + et + f u=as+bt+c,v=ds+et+f
只要 a e ≠ b d ae \neq bd ae=bd, 上述映射是可逆

在这里插入图片描述

圆柱映射

 假设纹理坐标在单位正方形[0,1]2内变化,圆柱高h, 半径r
 那么圆柱的参数方程为
x = r cos ⁡ ( 2 π s ) , y = r sin ⁡ ( 2 π s ) , z = h t x = r \cos(2\pi s), y=r \sin (2\pi s), z = ht x=rcos(2πs),y=rsin(2πs),z=ht
 从纹理坐标到圆柱面上没有变形
 适合于构造与无底的圆柱面拓朴同构的曲面上的纹理

##球映射
 球的参数方程
x = r cos ⁡ ( 2 π s ) , y = r sin ⁡ ( 2 π s ) cos ⁡ ( 2 π t ) , z = r sin ⁡ ( 2 π s ) sin ⁡ ( 2 π t ) x = r \cos (2\pi s), y = r \sin(2\pi s) \cos(2\pi t), z = r \sin(2\pi s) \sin (2\pi t) x=rcos(2πs),y=rsin(2πs)cos(2πt),z=rsin(2πs)sin(2πt)
 类似于地图绘制中的映射
 肯定有变形
 用在环境映射中

参数化

拓展

https://github.com/garyptchoi/spherical-conformal-map

代码 用 matlab 写的,我只有mathematica

https://ww2.mathworks.cn/matlabcentral/fileexchange/65551-spherical-conformal-map

这个球面保角映射 居然可以用 在线 matlab运行。

http://staff.ustc.edu.cn/~renjiec/GAMES301/games301_lec01.pdf

Games301

https://community.wolfram.com/groups/-/m/t/1879730

https://zhuanlan.zhihu.com/p/622024463?utm_campaign=shareopn&utm_medium=social&utm_psn=1800898547698233345&utm_source=wechat_session&utm_id=0

https://zhuanlan.zhihu.com/p/711495835?utm_campaign=shareopn&utm_medium=social&utm_psn=1801613471344885762&utm_source=wechat_session&utm_id=0

https://squircular.blogspot.com/2015/09/elliptical-arc-mapping.html

https://www.shadertoy.com/view/3dsSWs

这里是 公式的 glsl 代码展示。

https://www.shadertoy.com/view/wdBXRt

这是综合展示。哈哈哈。

https://jcgt.org/published/0005/02/01/paper.pdf

参考文献

  1. http://staff.ustc.edu.cn/~lgliu/Courses/ComputerGraphics_2020_spring-summer/default.htm#%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99
  2. games 301
  3. http://staff.ustc.edu.cn/~lgliu/Courses/GAMES102_2020/PPT/GAMES102-10_SplineSurfaces.pdf
  4. https://blog.csdn.net/seamanj/article/details/53576173
  5. https://www.inf.usi.ch/hormann/papers/Floater.2005.SPA.pdf
  6. https://www.cnblogs.com/mazhen/archive/2011/12/24/2300732.html
  7. https://wenku.baidu.com/view/3164e185bb1aa8114431b90d6c85ec3a86c28b6a.html?wkts=1722237778298
  • 20
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值