8. Bitmaps and Textures位图和纹理贴图
New in World Machine is the ability to work with bitmaps and textures. Concepturally, a bitmap consists of 3 color channels (Red, Green, Blue). These color channels can be manipulated together, or split apart and processed on a per-channel basis as if they were heightfields.
World Machine 具有位图和贴图材质的能力.概念上来讲,一个位图有三种颜色通道组成(红,绿,蓝).些颜色通道可以操纵在一起,或分开和处理每一个基础通道就好像是高度域.
Most devices in World Machine only operate on heightfields. However, some will work on both heightfields and bitmaps, and a few are designed for bitmaps alone.
大多数节点仅仅只在高度域进行操作.然而,有的是在高度域和位图,仅有少数是专门为位图设计的.
You can see Bitmap-only devices by using the Filter by Type option on the Tools tab of the toolbar.
您可以通过工具栏面板的过滤类型选项只查看位图节点.
The RGB tab on the toolbar then displays all compatible devices:
RGB选项卡工具栏上显示所有公用的节点:
8.1 Creating Color创建颜色
The simplest way to produce color is using the Color Generator device:
产生颜色的最简单方法是使用颜色生成器节点:
It produces a single color of your choice. By combining several colors via a Chooser or Combiner device and Chooser masks, you can achieve many different blending possibilities for texturing.
它为你的选择产生一个单一的颜色.通过结合多种颜色选择器或合成器节点和遮罩选择器,可以实现很多不同的混合纹理的可能.
In the example network above, several Selector devices (purple) are being used to pick out various regions of the terrain (such as high slopes, low elevation, and so on), and then merge together various colors based upon that.
在上面的示例网中.多个选择器节点(紫色)被用来挑出各种地形的区域(如高边坡,低海拔,等等),在各种颜色基础之上合并在一起.
There are additional methods you can use to create colors. For example, you can import a tiled texture by using a File Input device and setting an appropriate scale and tiling behavior, as shown below:
还有其他的方法可以用来创建颜色.比如,您可以通过使用文件输入节点导入一个平铺纹理贴图并设置一个适当的比例和平铺表现,如下图所示:
Which overlayed atop the terrain would look like the below:
覆盖在地形上面看起来就像下图:
Of course, once the texture is imported into the world, it can be combined with other textures and colors as much as you want, to produce very rich and complex texture maps.
当然,一旦纹理贴图被导入到世界里,它可以与其他纹理贴图和颜色结合,来产生你想要的非常丰富和复杂纹理贴图.
8.2 Working with Color Channels使用颜色通道
You can combine several heightfields together with a channel combiner to create a single bitmap data packet.
您可以将一些高度域与一个通道合并在一起,以创建一个位图数据包.
If you want to use a heightfield operator that doesn't support bitmaps (such as the Expander device), you can break apart the bitmap into either RGB or HSL channels, operate on one or all of the channels, and then recombine them using a Channel Combiner.
如果你想使用一个不支持位图操作的高度域(如扩展节点),您可以分离位图到RGB或HSL通道,对一个或所有通道进行操作,然后再结合他们使用通道合并重组.
8.3 Overlaying Bitmaps atop a Terrain叠加位图于地形
If you want to view a bitmap or texture atop a terrain, you can use the Overlay View device to combine the two for display.
如果你想预览一个位图或纹理贴图,你可以使用 Overlay View 节点去组合这两个来显示.
By creating your texture from mask data derived from the terrain, you can create realistic (or completely stylized) texturing for further export.
通过地形数据来创建纹理遮罩,你可以创建实际的(或完全风格化)纹理来进一步的导出.
The example above uses some simple elevation and slope-based texturing, along with the flow map output from the Erosion device to create the "snail-trail" watercourse effect.
以上示例使用一些简单的高度和斜坡纹理.伴随流程图输出从 Erosion(侵蚀)节点来创建"snail-trail"河流效果.
8.4 Specialty Devices专业节点
There are two special purpose devices available that produce RGB output as well: A Lightmap Generator and a Normalmap Generator.
这里有两个可用的特殊用途的节点,生成RGB输出:光照贴图和法线贴图.
8.4.1 Lightmap Generator光照贴图
The Lightmap Generator creates a greyscale or colored lighting map from a source terrain.
光照贴图生成器从资源地形中创建一个灰度图和颜色光照图.
8.4.2 Normalmap Generator法线贴图生成器
The normalmap generator encodes the terrain normal into an RGB texture; each direction component of the normal is mapped to a color; (R=X, G=Y, B=Z) is the default encoding. This information can be then used over a low-resolution mesh, giving much of the feel of a high resolution terrain with a fraction of the geometry data.
该法线贴图生成器将正常的地形编码为一个RGB纹理;每个正常的方向元件被映射到一种颜色;(R=X, G=Y, B=Z) 是默认编码. 此信息可以在低分辨率网格上使用,给于高分辨率地形的感觉与几何体数据的一小部分.