如何投影一个纹理(NEHE)学习笔记.docVIP

  1. 1、本文档共5页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  5. 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  6. 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  7. 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  8. 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
如何投影一个纹理 原文出处:SGI OpenGL 教程 翻译:心蓝 潘李亮。Xheartblue@ 译者前言: 影子有两种经典的实现方法:一是Shadow Volume 。二是Shadow Mapping。如何用Light Mapping来实现投影影子呢?这就要用到Project Texture.直接翻译的意思就是投影纹理----把一个纹理像放幻灯片一样投影到场景中去,假想有一个电影机在放电影,沿着镜头方向,电影将被投在墙上,而投影纹理就类似于这种情况,我们想要使用的纹理就是电影机里Film. 以下是我在SGI的教程中找到的文章。奉献给大家。 How to Project a Texture /software/opengl/advanced98/notes/node49.html 投影一个纹理图象到你自己合成的环境里在许多步骤上和投影渲染场景到显示器上的步骤是一样的。投影纹理的关键是纹理变换矩阵的内容。该变换矩阵由以下三个变换串联起来: 视图/模型变换 -- 朝着需要投影到场景的方向。 投影变换 (透视或者正交) 缩放和偏移(bias 是叫偏移吗?),它将近裁剪面到纹理坐标。 Projecting a texture image into your synthetic environment requires many of the same steps that are used to project the rendered scene onto the display. The key to projecting a texture is the contents of the texture transform matrix. The matrix contains the concatenation of three transformations: A modelview transform to orient the projection in the scene. A projective transform (perspective or orthogonal). A scale and bias to map the near clipping plane to texture coordinates. 纹理变换中模型/视图变换部分可以和普通的图形管道一样计算,可以使用一般的模型/视图变换工具,举个例子,你可以使用gluLookAt()来投射一个观察方向,也可以用glFrustum或者gluPerspective()来定义一个透视变换。 The modelview and projection parts of the texture transform can be computed in the same way, with the same tools that are used for the modelview and projection transform. For example, you can use gluLookat() to orient the projection, and glFrustum() or gluPerspective() to define a perspective transformation. 模型/视图变换的作用和它在OpenGL 观察管道里的作用是一样的,它将观察者沿-Z方向移动到原点和投影中心,在这种情况下,观察者就好比是是光源,近裁剪平面好比是需要投影的纹理图象的所处的位置,纹理图象可以被看作一个在投影的透明胶片。或者,你也可以想象一个观察者在观察位置,透过近平面上纹理去看那些需要被贴上纹理(投影纹理)的表面。 The modelview transform is used in the same way as it is in the OpenGL viewing pipeline, to move the viewer to the origin and the projection centered along the negative z axis. In this case, viewer can be thought of a light source, and the near clipping plane of the projection as the location of the texture image, which can be thought of as printed on a transparent film. Alternatively, you can conceptualize a viewe

文档评论(0)

taotao0c + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档