TKE_Texture
Opcode
ASCII |
t |
Hexadecimal |
74 |
Decimal |
116 |
Operands
Byte name_length, (name_length)xByte name,
Byte image_length, (image_length)xByte image_name,
Short options, [Byte parameter_source], [Byte tiling],
[Byte interpolation], [Byte decimation],
[Byte red_mapping], [Byte green_mapping],
[Byte blue_mapping], [Byte alpha_mapping],
[Byte param_function], [Byte layout],
[(2)xByte value_scale], [Byte transform_length],
[(transform_length)xByte transform_segment]
name_length | length of texture name string |
name | name of texture |
image_length | length of image name string |
image_name | name of image on which the texture is based |
options | flags indicating optional fields |
parameter_source | initial values used for texture lookup, usually UV parametric values |
tiling | indicates how parameter values outside the 0-1 range are handled. |
interpolation | indicates texture sampling when a texture pixel spans multiple display pixels |
decimation | indicates texture sampling when a display pixel covers multiple texture pixels |
red_mapping | enumeration of source choices for red value |
green_mapping | enumeration of source choices for green value |
blue_mapping | enumeration of source choices for blue value |
alpha_mapping | enumeration of source choices for alpha value |
param_function | initial remapping function for parameter values |
layout | arrangement of useful picture data within the image |
value_scale | amount to scale and shift color values |
transform_length | length of transform segment name |
transform_segment | name of a segment containing an additional texture_matrix to apply |
Notes
Textures define a form of image which can be stretched and applied to a surface. The simplest form is indeed just an image; as each pixel on the surface is drawn, a color is selected from a corresponding spot on the image. The options
allow for changes to the correspondence between points, and/or changes to the color selected.
For the specific definitions on what the various texture option bits mean in HOOPS/3dGS please refer to the Define_Texture
specification in the 3dGS Reference Manual.
Option bits
0001 | Parameter Source |
0002 | Tiling |
0004 | Interpolation |
0008 | Decimation |
0010 | Red Channel Mapping |
0020 | Green Channel Mapping |
0040 | Blue Channel Mapping |
0080 | Alpha Channel Mapping |
0100 | Parameter Function |
0200 | Layout |
0400 | Transform Segment Name |
0800 | Value Scale |
1000 | Caching |
Parameter sources
0 | U |
1 | UV |
2 | UVW |
3 | Object Space XYZ |
4 | World Space XYZ |
5 | Surface Normal |
6 | Reflection Vector |
7 | Natural UV |
8 | Local Pixels |
9 | Outer Pixels |
10 | Local Window |
11 | Outer Window |
Parameter functions
0 | None |
1 | Sphere |
2 | Cylinder |
3 | Box |
Parameter layouts
0 | Rectilinear |
1 | Spherical |
2 | Hemispherical |
3 | Cubic Faces |
Parameter tilings
0 | None |
1 | Clamp |
2 | Repeat |
3 | Mirror |
Texture filters
0 | None |
1 | Bilinear |
2 | Trilinear |
3 | MipMap |
4 | Summed Areas |
5 | Gaussian |
6 | Stochastic |
Channel mappings
0 | Red |
1 | Green |
2 | Blue |
3 | Alpha |
4 | Zero |
5 | One |
6 | Luminance |
7 | None |