Billboarding is a technique that adjusts an object's orientation so that it "faces" some target, usually the camera. The word faces is in quotes since it can have several meanings, as the tutorial will show.

广告牌是这样一个技术,它通过调整物体的方向以使之正向面对某个目标物体,通常这个目标物体是照相机。这个单词"faces"之所以用引号是由于这个单词有好几个含义,正如接下来教程里面所展示的那样。

This technique is quite popular in games and applications that require a large number of polygons. Regardless of how fast graphic cards get (Thanks Nvidia!), it seems that it is never enough. Games take advantage of the hardware advances to push things further to the next level in complexity and detail (In turn hardware manufacturers try to keep up with games designers in a never ending cycle). 3D graphics programmers in general, and game programmers in particular, have a constant struggle with the amount of polygons that can be displayed with a decent frame rate.

这个技术在游戏里面以及使用大量多边形的应用软件里面很流行。不管显卡的速度能有多快(感谢英伟达公司),看起来 永远是不够的。游戏设计商可以利用硬件的优势进一步将物体推向更细腻更复杂的一个级别(作为回应,硬件制造商试图跟上游戏设计商的步伐,这似乎是永远没有尽头)。一般情况下3D图形编程者特别是游戏编程者,他们长期与用特定数目的帧率显示大量多边形的情形作斗争。

Billboarding can be used to cut back on the number of polygons required to model a scene by replacing geometry with an impostor texture. A classic example is a tree. Consider how many polygons would be required to get a decent representation of a tree (specially in the Spring!). Billboarding allows us to replace the geometry with a single texture applied on a quad (or two triangles). Billboarding guarantees that the texture is always facing the camera, therefore the user never realizes that the "tree" is in fact a flat texture quad, unless the user flies over it in which case the illusion is broken.

广告牌技术可以通过用冒名顶替的纹理替换几何物体的方式来减少组成物体的多边形的数量。一个经典的例子就是树木。试想一下如果要用一种优雅的方式显示一颗三维树木那得需要多少多边形啊(尤其是描绘春天的树木茂盛的样子)。广告牌技术可以保证纹理总是面向照相机,因此用户从来都不会发觉这个“树木”其实是一个平面的纹理四边形。除非用户从这个树木顶端飞过,在这种情况下假象将会被打破。

Beware that shading will not be correct if the same texture is used for all orientations. A 3D tree viewed from different locations will exhibit a different look assuming a fixed, or at least non-correlated light movement with the camera. For a 2D billboard, when using the same texture for all orientations, it will look as if the light is moving with the camera. It may be the case that the user won't notice this shading discrepancy, but be prepared for it. One possible solution is to have multiple textures taken from different views. However, unless a prohibitive number of textures is used, a popping effect will be noticeable when the texture changes. Blending may be a solution for this problem but this is outside the scope of this tutorial.

应该认识到渐变将不真实如果同一个纹理被应用于所有的方向。一颗3D树木从不同的方向观察时将呈现不同的面貌,假设照相机的一个固定的或者至少不相关的光源的移动

。对于一个2D广告牌,当所有方向使用同一个纹理的时候,看起来仿佛是光线在围绕着照相机移动。这种情况下用户可能不会意识到这种渐变的矛盾之处,但是我们要悠着点。一个可能的解决方案是在不同的视点使用不同的纹理。然而除非使用数目巨大的纹理,否则当纹理之间转换时会产生跳跃现象。ALPHA混合可能是一个解决跳跃现象的办法,但是这超出了这个教程的范畴。

Billboarding can be used to give the illusion of a 3D object without compromising the polygons budget. However billboarding is not limited to saving polygons. In general, the billboarding technique can be applied to make any object face a target, where the target may be the camera, another object, or simply a 3D location.

广告牌技术可以用来模拟3D的假象而不用为了多边形的数目而妥协。然而广告牌技术并不仅限于节约多边形的数目。通常广告牌技术可以用来使物体faces一个目标,而这个目标可能是一个照相机、其他物体或者一个简单的3D坐标。

In this latter scenario billboarding isn't used to save polygons but to achieve some goal related to the purpose of the application, for instance the enemy might always be facing you, or a football player is always facing the ball.

在接下来的方案中广告牌技术不是用来节约多边形的数量而是用来调整目标的方向,例如敌人总是面向你,或者一个足球运动员总是面对着足球。

Two types of billboarding are presented: cylindrical and spherical. In the spherical version there is no restriction to the orientation of the object, whereas in the cylindrical approach the rotation of the object is restricted to a vector, usually the positive direction of the Y axis.

两种广告牌技术将被展现:圆柱型和球体。在球体广告牌中对于物体的转向没有限制,而在圆柱体广告牌中物体的旋转轴被限制为一个向量,通常是Y轴正方向。

In this tutorial several techniques to implement billboarding will be covered. The first one is a very simple method but it doesn't provide a real billboard. It is a cheating approach that is very easy to implement. A faster approach for quad billboards that provides exactly the same results is provided afterwards. It is not as easy to implement but there can be a significant difference in speed when using a large number of quad billboards.

在这个教程里用来实现广告牌技术的几个技巧将被介绍。第一个技巧是一个非常简单的方法但是它并不是一个真正的广告牌。这是一个欺骗性质的方法非常容易实现。一个有同样效果并且实现广告牌技术更快的方法将会在后来介绍。这个后续版本不那么容易实现,但是当使用大量广告牌时他的速度的改观将会很明显。

Finally true billboards are presented. These methods allow you to set a billboard to face the camera. they can also be used to have an object face another object or point in space. In this sense they are more general than the cheating versions.

最终真正的广告牌将被呈现。这些方法允许你设置一个面向照相机的广告牌。他们也可用于是一个物体面向另一个物体或空间中的一个点。在这些场景中他们比欺骗性质的广告牌更通用。

广告牌技术教程:引言相关推荐

  1. 鼠标绘图 c语言,c语言高级编程技术教程 图形显示方式与鼠标输入.doc

    c语言高级编程技术教程 图形显示方式与鼠标输入 c语言高级编程技术教程 图形显示方式和鼠标输入 图形显示方式和鼠标输入 问题的提出编写程序,使用鼠标进行如下操作:按住鼠标器的任意键并移动,十字光 标将 ...

  2. java调用easyxml接口_【技术教程】如何通过Java程序调用RTSP拉流协议视频平台EasyNVR程序接口?...

    原标题:[技术教程]如何通过Java程序调用RTSP拉流协议视频平台EasyNVR程序接口? RTSP协议视频平台EasyNVR经过多年的积累,已经是一套成熟且完善的视频平台了,用户可以通过网页直接访 ...

  3. 计算机应用技术教程的答案,计算机应用技术教程第3章办公自动化答案

    计算机应用技术教程参考答案 答案: Word部分 一.单选题 1. 在Word中,如果在英文文章中出现红色波浪下划线,表示( ). A.单词拼写错 B.要全部小写 C.语法错 D.要全部大写 2. 在 ...

  4. Spring MVC Boot Cloud 技术教程汇总

    转载自 Spring MVC & Boot & Cloud 技术教程汇总 昨天我们发布了Java成神之路上的知识汇总,今天继续. Java成神之路技术整理(长期更新) 以下是Java技 ...

  5. 好程序员技术教程分享JavaScript运动框架

    好程序员技术教程分享JavaScript运动框架,有需要的朋友可以参考下. JavaScript的运动,即让某元素的某些属性由一个值变到另一个值的过程.如让div的width属性由200px变到400 ...

  6. springboot 系列技术教程目录

    前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家.点击跳转到教程. 一.教程目录地址: springboot系列技术教程目录 二.教程内容: springboot2.X ...

  7. html5如何新建定义站点,HTML5技术教程:创建新作品_HTML5教程_创建作品_添加元素_课课家...

    我们所熟知的HTM5软件是一款非常强大功能的软件,据我了解HTM5软件的特色也是非常有优势的.我们先来介绍一下它的优势: HTML5可以提供: ①:提高可用性和改进用户的友好体验; ②:有几个新的标签 ...

  8. 《无线网络技术教程第二版》阅读笔记(一)

    <无线网络技术教程>阅读笔记(一) 无线局域网的定义: WLAN是计算机网络与无线技术相结合的产物,通常指采用无线传输介质的计算机局域网, 其利用无线电和红外线等无线方式,提供对等或点对点 ...

  9. ip地址伪装php,技术教程:如何使用浏览器插件伪装IP地址

    步骤: 1.安装插件Modify Headers 进入 2.在浏览器右上角点小图标,选择打开"Open ModifyHeaders",如下图所示. 3.如图依次选择 Add → 输 ...

最新文章

  1. C语言中within函数,vfprintf() - C语言库函数
  2. JavaWeb系列之:Servlet
  3. %fplot('Untitled1',[-1,2])画图
  4. 【leetcode】1032. Stream of Characters
  5. java hasmoreelements_Java IOException.hasMoreElements方法代码示例
  6. 线程WAITING--BlockingQueueDemo
  7. Oracle执行计划稳固
  8. java工具类_非常实用的Java工具类,拿走不谢(一)
  9. services.xml应该放在项目的哪里_新轮胎应该放在前轮还是后轮?
  10. PHP 实现简单购物车功能(2)
  11. 腾讯云实验室linux基本操作
  12. dreamweaver html模版,dw网页设计模板
  13. dns检测工具命令总结
  14. 手把手教你高效快捷的创建Swift Framework
  15. Jenkins 部署项目出现 Failed to connect to repository : Command git ls-remote -h http://gitlab. 128
  16. 重磅!中国商业联合会专家委员会商贸物流与供应链智库成立在即
  17. 2016-HitCon-Pwn-house_of_orange学习(附赠FSOP基础知识)
  18. 计算机网络技术教程第3版课后答案,《计算机网络技术基础教程》课后习题答案刘四清版3.doc...
  19. 【舒适区如何影响着我的生活】
  20. 神州网信政府版Win10新建用户无法上网

热门文章

  1. 【QCY -T13 ANC】耳机使用(纯主观看法)
  2. Xilinx 7系列FPGA数据手册:概述--中文版
  3. iOS四种方法读取文件内容
  4. iPhone文件读写
  5. 独行快、众行远,一场架构师的专场汇
  6. linux安装火狐浏览器
  7. mysql 如何自定义排序_在MySQL中实现自定义排序顺序
  8. python用matplotlib画球_用Python的Matplotlib 画一个足球场
  9. Azure AD Conditional Access
  10. java获取url文件格式_本地文件/url获取文件类型