广告牌(Billboards)
The Billboards object consists of a number of billboard elements. A billboard is a rectangular flat object that always faces the camera. The Billboards is used instead of fully functional objects that are barely seen from far off and slightly change their position when the camera moves around them (e.g. clouds, stars, far away forests). Using Billboards helps to simplify and speed up rendering.Billboards对象由许多广告牌元素组成。一个广告牌是一个矩形的平面对象,总是面向摄像机。使用Billboards来代替从远处几乎看不到的功能完整的物体,当相机移动它们时,它们的位置会略有变化(例如云、星星、遥远的森林)。使用Billboards有助于简化和加快渲染。
For example, when you are adding a tree that is hardly seen from a distance, instead of creating a complex tree mesh, just put an appropriate texture onto the alpha-tested Billboards and it will make no visual difference at such a range.例如,当你添加一个从远处看不太清楚的树,而不是创建一个复杂的树网格,只是将一个适当的纹理放到alpha测试的Billboards上,它在这样的范围内不会产生视觉上的差异。
In the Create menu you will see three options each creating a Billboards object used for a specific purpose and having a specific material assigned:在Create菜单中,您将看到三个选项,每个选项创建一个用于特定目的的Billboards对象,并分配特定的材质:
- Base - used for groups of billboards (billboards_base material)Base -用于成群的广告牌(billboards_base材质)
- Impostor - used as an optimization for impostors to be rendered, for example, instead of a Cluster object at large distances (Billboards are simpler and less performance-consuming). In this case the billboards_impostor_base material is assigned, it is a base material for impostors, that supports sampling different regions of textures based on viewing angle.Impostor—用作视点冒名顶替者的优化,例如,在大距离时代替Cluster对象(Billboards更简单,也更少消耗性能)。在这种情况下,billboards_impostor_base材质被分配,它是视点替用特效的基础材质,支持基于视角采样不同区域的纹理。
- Cloud - intended to simulate simple shaded clouds (billboards_cloud_base material)Cloud -用于模拟简单的阴影云(billboards_cloud_base材质)
These materials have different parameters and are rendered differently based on their applications, you can find more details in the articles listed below, and check out the Billboards sample from the Art Samples suite included in the SDK.这些材质具有不同的参数,并根据它们的应用程序以不同的方式呈现,您可以在下面列出的文章中找到更多细节,并查看SDK中包含的Art Samples套件中的Billboards示例。
See Also另请参阅#
- The article on the billboards_base material.关于billboards_base材质的文章。
- The article on the material_billboards_impostor_base material.关于material_billboards_impostor_base材质的文章。
- The article on the billboards_cloud_base material.关于billboards_cloud_base材质的文章。
Creating Billboards创建的广告牌#
To create Billboards, perform the following steps:创建“Billboards”的步骤如下:
On the Menu bar, click Create -> Billboards -> Base.在“菜单”栏单击“Create -> Billboards -> Base”。
- Place the Billboards object somewhere in the world.将Billboards对象放置在世界的某个地方。
- Specify the Billboards parameters.指定 Billboards参数。
Billboards Parameters广告牌参数#
Depth Sort | Indicates that billboards should be sorted in back-to-front order according to their position. This option should be enabled, if alpha blending is used for the billboard material (except for the additive blending).指示广告牌应按位置从后到前的顺序排列。如果Alpha Blend 用于广告牌材质(添加混合除外),则应该启用此选项。 |
---|
Billboards Options广告牌选项#
In the Billboards section of the Node tab, you can create new billboards and tweak their settings.在Node选项卡的Billboards部分,您可以创建新的广告牌并调整它们的设置。
Add from Children | Adds all billboards from identical children objects to the list in the parent billboard and removes the added children from the World Nodes hierarchy. 将所有从相同的孩子广告牌对象添加到列表在父广告牌和删除添加的孩子从World Nodes层次结构。 |
---|---|
Add |
Adds a new billboard. After a new billboard is created, it can be selected in the list of billboards in the Node tab and repositioned using a standard manipulator.增加一个新的广告牌。创建一个新的广告牌后,可以在Node选项卡的广告牌列表中选择它,并使用标准操纵器重新定位它。
|
Remove | Removes a billboard selected in the list.删除列表中选中一个广告牌。 |
Clear | Removes all billboards from the list.从列表中删除所有的广告牌。 |
Position | Moves the billboard along X, Y and Z axes, respectively.在X移动广告牌,分别Y和Z轴。 |
---|---|
Normal | Sets the X, Y and Z coordinates of the billboard's normal vector. Is used to orient the billboard. Works only with the billboards_impostor_base material.设置广告牌的法向量的X、Y和Z坐标。是用来定位广告牌的。仅适用于billboards_impostor_base材质。 |
ScaleX
ScaleY |
Scale values scale the texture on the selected billboard along X and Y axes, for example:量表的价值观量表选择广告牌上的纹理在X和Y轴,例如:
|
TranslateX
TranslateY |
Translate values offset the texture on the selected billboard along X and Y. With these parameters, an arbitrary point of the texture can be set as the top left corner of the billboard, for example:翻译值抵消纹理沿着X和Y选中的广告牌。与这些参数,可以设置任意点的纹理的左上角广告牌,例如:
|
Width | Width of the rectangle for the selected billboard.矩形的宽度为选定的广告牌。 |
Height | Height of the rectangle for the selected billboard.选定广告牌矩形的高度。 |
Angle | Angle to orientate the selected billboard.角度定位选择的广告牌。
|
Axis | Sets the basis for the Billboards object's Z axis:设置Billboards对象的Z轴基础:
|
---|---|
Drop All to the Ground | Positions all billboards to the surface below them.职位所有广告牌下面的表面。 |
Generator发电机#
Generator allows you to automatically create a specified number of billboards and randomly scatter them within an arbitrary mesh volume. After that, they will appear in the list in the Billboards section of the Node tab and can be repositioned, if necessary. If a texture atlas is used, each of the created billboards will be randomly assigned one of texture slots.发电机允许您自动创建一个指定数量的广告牌和随机分散在一个任意网格体积。之后,他们将出现在列表中Billboards部分Node选项卡,可以重新定位,如果必要的。如果使用一个纹理地图集,创建的每个广告牌将随机分配一个纹理槽。
Count | The number of billboards to create and scatter.要创建和散布的广告牌数量。 |
---|---|
Width | If a texture atlas is used, Width specifies the number of slots horizontally. If a simple texture is used, this value should be 1.如果使用一个纹理地图集,Width指定水平槽的数量。如果使用一个简单的纹理,这个值应该是1。 |
Height | If a texture atlas is used, Height specifies the number of slots vertically. If a simple texture is used, this value should be 1.如果使用纹理图集,Height指定垂直位置的槽数。如果使用一个简单的纹理,这个值应该是1。 |
Radius
Spread |
The size of the square billboards to be created.要创建的大小广场广告牌。 Spread value defines the range for possible variation of the Radius:Spread值定义了半径可能变化的范围: |
Aspect
Spread |
The ratio of width to height. This option is used to create rectangular billboards.宽与高的比率。此选项用于创建矩形广告牌。
Spread value defines the range for possible variation of the Aspect:Spread值定义了可能的变化范围Aspect: |
Angle
Spread |
Angle of orientation.角方向。 Spread value defines the range for possible variation of the Angle:Spread值定义了Angle可能变化的范围: |
Bound | A mesh that determines the volume within which billboards will be generated. The mesh itself is not rendered.一个网格,用来决定广告牌将生成的内卷。网格本身并不呈现。 |
Generate | Create new billboards and scatter them within the mesh volume. If a texture atlas is used, each of the created billboards will be randomly assigned one of the texture slots.创建新的广告牌,并将它们分散在网格体中。如果使用纹理图集,每个创建的广告牌将被随机分配一个纹理槽。 |