OGRE manual-script

Source: Internet
Author: User

------------ From <OGRE Chinese help manual>

Texture unit ('texture _ unit ')

Texture
Set the name of the static texture image to be used for this layer.

Format: texture <texturename> [<type>] [unlimited | numMipMaps] [alpha] [<PixelFormat>]
Example: texture funkywall.jpg
This setting is mutually exclusive with the anim_texture attribute. Note that the texture file cannot contain spaces.
The default value of type is '2d '<1d, 2d, 3d, and cubic>.
'Nummimaps 'allows you to specify the number of mipmaps for this texture

Anim_texture
It refers to multiple images.
Format 1 (short format): anim_texture <base_name> <num_frames> <duration>
Example: anim_texture flame.jpg 5 2.5
Success,

Flame_2.jpg and so on. The length is 2.5 seconds (2 FPS ). If the latency (duration) is set to 0, automatic conversion is not performed.

.
Format 2 (long format): anim_texture <frame1> <frame2>... <duration>
Example: anim_texture flamestart.jpg flamemore.png flameagain.jpg moreflame.jpg lastflame. tga 2.5
The example in format 2 above also creates an animation with the same latency as the example in format 1, but this time it is composed of five individually named image files.

The first format is simpler. The second format is provided to solve the problem that images cannot be named in a uniform manner.

Cube Texture cubic_texture

Format 1 (short format): cubic_texture <base_name> <combinedUVW | separateUV>
Bytes

, Skybox_up.jpg, skybox_dn.jpg, skybox_lf.jpg, and skybox_rt.jpg.

Format 2 (long format): cubic_texture <front> <back> <left> <right> <up> <down> separateUV
Format 2: each side is explicitly specified, in case that the name cannot be consistent. You can use

Format 2, because combinedUVW requires a separate texture name assigned to the composite 3D texture (see below ).

In the two formats, the meaning of the last parameter is as follows:

CombinedUVW
The six textures are combined in a cube texture ing using 3D texture coordinates with U, V, and W elements. Reflection ing is necessary because you always

I don't know which side you will need. Note that not all graphics cards support cube environment ing.
SeparateUV
The six textures are separated and saved, but referenced by a texture layer. At any time, only one texture is active (in fact, they are

Saves 6 images), so 2D UV coordinates are used. This type applies to skyboxes because only one side is rendered at a time,

Hardware is also supported on older graphics cards.

Texture coordinate set tex_coord_set
Set the texture coordinate set to be used for this texture layer. A grid can define multiple texture coordinate sets. This attribute sets the position of the texture.

Set.
Format: tex_coord_set <set_num>
Example: tex_coord_set 2
Default Value: tex_coord_set 0

Texture addressing mode tex_address_mode
Defines what happens when the texture coordinates of this texture layer exceed 1.0. You can select a simple format to specify addressing for all three texture coordinates at a time.

Mode, or extended format. Use the 2/3 parameter to specify different modes for each texture coordinate.
Simple format: tex_address_mode <uvw_mode>
Extended format: tex_address_mode <u_mode> <v_mode> [<w_mode>]
Wrap
Any value that exceeds 1.0 is set to 0.0. The texture is repeated once.
Clamp
The value exceeding 1.0 is fixed to 1.0. The texture of more than 1.0 Other places follows the texture of the last pixel. Used for overlapping filtering, from 0.0

A texture that is precisely covered by 1.0 and does not have blurred boundaries.
Mirror
The texture is flipped at each boundary, that is, the texture at each 1.0 u or v is flipped by the image.
Border
Values beyond the range [0.0, 1.0] are set to boundary colors. You can also set the tex_border_colour attribute.
Default Value: tex_address_mode wrap.

Filter filtering
Sets the texture filter format used when the texture is enlarged or reduced. There are two formats for this attribute. A simple format is to specify a pre-defined filter.

The name of the option set. If the format is complex, you can set the options to zoom in, zoom in, and mip filter.
Simple format
Format: filtering <none | bilinear | trilinear | anisotropic>
Default: filtering bilinear
In this format, you only need to provide the following parameter:

None
Filter or mipmapping scaling is not used. This is equivalent to 'filtering point none' in a complex format '.
Bilinear
2x2 box filtering is used to zoom in or out a texture. A mipmap is selected from the list, but no filtering is used between all levels of mipmaps.

. This is equivalent to the 'filtering linear point' in a complex format '.
Trilinear
2x2 boxes are used for filtering when a texture is zoomed in or out, and the last 2 mipmaps are filtered together. This is equivalent to a complex format

'Filtering linear '.
Anisotropic
This attribute takes into account the triangle slope related to the lens rather than simply making a 2x2 pixel filter.

It is the same as 'trilinear. This makes the acute angle of a triangle look less distorted. It is equivalent to the complex format of 'filtering anisotropic

Anisotropic linear '. Note: If this attribute is different, you must set the max_anisotropy attribute.
Complex format
Format: filtering <minification> <magnification> <mip>
Default: filtering linear point
This format gives you full control over zoom-in, zoom-in, and mip filtering. The parameters are as follows:
None
None -- the only 'mip 'parameter available for filtering. This parameter completely disables mipmapping. Minimum settings for Zoom-in and zoom-in

Is 'point '.
Point
Select the pixels closest to the zoom-in and zoom-in modes. In mip mode, this option selects the most suitable for mipmap.
Linear
Filter out a 2x2 pixel block around the nearest pixel. In 'mip 'filtering, this can be connected between various levels of mipmap.
Anisotropic
Only available for Zoom-in and zoom-in modes, and compensation for triangular camera space slope filtering. Note that this attribute must be different.

Set the max_anisotropy attribute.

Colour_op
Mix the texture layer with the layer below it (or, if it is the first layer, how to mix it with the illumination effect ).
Format: colour_op <replace | add | modulate | alpha_blend>
Default Value: colour_op modulate

Colour_op_ex
Extended version of the colour_op attribute, which can be used for more complex hybrid operations, but limited by the number of texture units supported by hardware
Format: colour_op_ex <operation> <source1> <source2> [<manual_factor>] [<manual_colour1>]

[<Manual_colour2>]
For example, colour_op_ex add_signed src_manual src_current 0.5
Default Value: none (colour_op modulate)

Colour_op_multipass_fallback
If the colour_op_ex attribute is used and there is not enough support for multi-texture hardware, set the multi-path backend operation for this texture layer.
Format: colour_op_multipass_fallback <src_factor> <dest_factor>
Example: colour_op_mulitpass_fallback one one_minus_dest_alpha

Scroll
Set a fixed offset for the texture.
Format: scroll <x> <y>

Scroll_anim
Set a dynamic scroll for the texture layer
Format: scroll_anim <xspeed> <yspeed>

Rotate
Rotate a texture to a fixed angle
Format: rotate <angle>

Rotate_anim
Create a dynamic rotation effect for this layer (fixed speed)
Format: rotate_anim <revs_per_second>

Scale
Format: scale <x_scale> <y_scale>

Wave_xform
Create a form of dynamic change based on the wave function. For more advanced texture layer changes. You can add multiple

Attribute instance
Format: wave_xform <xform_type> <wave_type> <base> <frequency> <phase> <amplency>
Example: wave_xform scale_x sine 1.0 0.2 0.0

Transform
This attribute allows you to specify a 4x4 transformation matrix for a texture unit, replacing the preceding rolling, rotating, and proportional attributes.
Format: transform m00 m01 m02 m03 m10 m11 m12 m13 m20 m21 m22 m23 m30 m31 m32 m33
In the above 4x4 matrix, the numerical number is m <row> <col>, the first is the row number, and the last is the column number.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.