spec_lwob.txt
来自「最新osg包」· 文本 代码 · 共 392 行 · 第 1/2 页
TXT
392 行
a character string (terminated by one or two nulls as usual) specifying the texture type as shown on the control panel. Once one of these sub-chunks is encountered within a SURF chunk, all subsequent texture-related sub-chunks (those described below) are considered to pertain to the current texture, until another CTEX, DTEX, STEX, RTEX, TTEX, or BTEX sub-chunk is read. Currently there may be zero or one of each of these sub-chunks (up to six textures) in each SURF chunk. TIMG Sub-Chunk This sub-chunk specifies the filename of the image (or the prefix of the image sequence) to be used for image texture mapping. See the description of the RIMG sub-chunk above for more details. TFLG Sub-Chunk This sub-chunk contains a short integer whose bits specify various options for the current texture. Currently only the seven least significant bits are used. The options that set bits indicate are (starting with the least significant bit): X Axis, Y Axis, Z Axis, World Coords, Negative Image, Pixel Blending, and Antialiasing. Note that only one of the three axis bits should be set. TSIZ, TCTR, TFAL, and TVEL Sub-Chunks These sub-chunks each consist of three IEEE four byte floating point numbers that specify the X, Y, and Z components of the current texture's size, center, falloff, or velocity. The TCTR, TFAL, and TVEL sub-chunks are only needed if the corresponding parameters are non-zero. TCLR Sub-Chunk This sub-chunk contains four bytes that specify the texture color for the current texture, which should be of the color-modifying variety (in other words, there should be a CTEX sub-chunk somewhere before this sub-chunk). The bytes are interpreted as described above in the COLR sub-chunk section. TVAL Sub-Chunk This sub-chunk contains a short integer that specifies the texture value of a diffuse, specular, reflection, or transparency texture, so it should appear somewhere after a DTEX, STEX, RTEX, or TTEX sub-chunk. A value of 256 in the file corresponds to a a setting of 100% on the control panel. TAMP Sub-Chunk This sub-chunk contains a four byte IEEE floating point number that specifies the amplitude of the current bump texture, so it should appear somewhere after a BTEX sub-chunk. A value of 1.0 is equivalent to a setting of 100% on the control panel. TFRQ Sub-Chunk This sub-chunk contains a short integer that specifies the number of noise frequencies or wave sources used by the current texture. TSP0, TSP1, and TSP2 Sub-Chunks These sub-chunks each contain a four byte IEEE floating point number that specifies one of the special texture type-specific parameters (such as Contrast, Turbulence, Wavelength, etc). Which sub-chunk is used to record a particular parameter depends on the order in which that parameter's button appears on the control panel. In the future there may be more than three of these per texture.Object File Example A simple object (with somewhat complex surfaces) is listed below to illustrate some of the features of a FORM LWOB. The object is an image-mapped bumpy square polygon in the XY plane with a shiny transparent yellow triangle as a detail polygon. Each line of the listing shows 16 bytes in hexadecimal form followed by their ASCII equivalents. The notes under each line should be read from left to right rather than top to bottom. 464F524D 0000019C 4C574F42 504E5453 FORM....LWOBPNTS 00000054 3F800000 3F800000 00000000 ...T?...?....... ^^^^^^^^ ^^^^^^^^ ^^^^^^^^ The X, Y, and Z coordinates of point number zero are 1.0, 1.0, and 0.0 (in IEEE format). ^^^^ There are 84 bytes in the PNTS chunk, so there are seven points in the object. BF800000 3F800000 00000000 3F800000 ....?.......?... BF800000 00000000 BF800000 BF800000 ................ 00000000 3F000000 BF000000 00000000 ....?........... 00000000 3F000000 00000000 BF000000 ....?........... BF000000 00000000 53524653 00000012 ........SRFS.... 53717561 72650000 54726961 6E676C65 Square..Triangle ^^^^ The surface name "Square" is terminated with two nulls to even out the number of bytes. 0000504F 4C530000 00180004 00010000 ..POLS.......... ^^^^ The first polygon has four vertices (which are points 1, 0, 2, and 3). 00020003 FFFF0001 00030005 00040006 ................ ^^^^ The detail polygon has three vertices (which are points 5, 4, and 6). ^^^^ One detail polygon follows. ^^^^ The first polygon's surface code is -1, so it uses surface number one ("Square") and has detail polygons. 00025355 52460000 00AE5371 75617265 ..SURF....Square ^^^^ ^^^^ This begins the description of the surface called "Square". ^^^^ The detail polygon uses surface number two ("Triangle"). 0000434F 4C520004 C8C8C800 464C4147 ..COLR......FLAG 00020000 44494646 00020100 43544558 ....DIFF....CTEX ^^^^^^^^ The next set of texture sub-chunks pertain to the surface's color texture. ^^^^ The "Square" surface's diffuse setting is 100% (256 out of 256). 0012506C 616E6172 20496D61 6765204D ..Planar Image M ^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^ The color texture is planar mapping of the image in the IFF file "RAM:Laura". 61700000 54494D47 000A5241 4D3A4C61 ap..TIMG..RAM:La 75726100 54464C47 00020004 5453495A ura.TFLG....TSIZ ^^^^ The flag bits indicate that the image is to be projected along the Z axis. 000C4000 00003FC0 00003F80 00005443 ..@...?...?...TC ^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^ The X, Y, and Z texture sizes are 2.0, 1.5, and 1.0. 4C520004 00000000 42544558 000E4672 LR......BTEX..Fr ^^^^^^^^ The next set of texture sub-chunks pertain to the "Square" surface's bump texture. 61637461 6C204275 6D707300 54464C47 actal Bumps.TFLG 0002000A 5453495A 000C3DCC CCCD3DCC ....TSIZ..=...=. ^^^^ The flag bits indicate that "Worlds Coords" is turned on. CCCD3DCC CCCD5441 4D500004 3FC00000 ..=...TAMP..?... ^^^^^^^^ The amplitude of the bumps is 150% (1.5 in IEEE format). 54465251 00020001 53555246 00000044 TFRQ....SURF...D ^^^^^^^^ This begins the description of the surface called "Triangle". ^^^^ The bump texture uses one frequency of noise. 54726961 6E676C65 0000434F 4C520004 Triangle..COLR.. F0B40000 464C4147 00020000 44494646 ....FLAG....DIFF ^^^^^^^^ The "Triangle" surface's color is yellow (240 red, 180 green, and 0 blue). 0002009A 53504543 000200CD 474C4F53 ....SPEC....GLOS ^^^^ The surface's specular setting is 80 % (205 out of 256). 00020100 5245464C 00020033 5452414E ....REFL...3TRAN ^^^^ The surface's reflection map setting is 20% (51 out of 256), but there is no RIMG sub- chunk, so the surface reflects the backdrop. ^^^^ The surface has a high glossiness (256). 00020066 ...f ^^^^ The surface is 40% transparent (102 out of 256). The "Triangle" surface has no textures, and there are no more surfaces to be defined, so the object file ends here.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?