ogre材质脚本属性

 

顶层Material属性

属性名                   值的格式                  描述

lod_distances               <d1> [<d2> ... <dn>]        LOD的距离列表

receive_shadows             <on>|<off>                  阴影是否会投在这个物体上(默认为on)

transparency_casts_shadows <on>|<off>                  透明物体是否投射阴影

set_texture_alias           <alias_name> <texture_name> 重命名纹理

Technique 属性
   
属性名                    值的格式         描述

scheme                       <name>            这个technique所属的scheme

lod_index                    <number>          这个technique所使用的LOD层(默认为0)

Pass 属性

属性名                 值的格式                     描述

ambient                  <r> <g> <b> [<a>] |             这个pass的环境光颜色
                         <vertex color>                  (默认为 1.0 1.0 1.0 1.0)

diffuse                  <r> <g> <b> [<a>] |             这个pass的漫反射颜色
                         <vertex color>                  (默认为 1.0 1.0 1.0 1.0)

specular                 <r> <g> <b> [<a>] |             这个pass的镜面颜色
                         <vertex color>                  (默认为 0.0 0.0 0.0 0.0)

emissive                 <r> <g> <b> [<a>] |             这个pass的散射光颜色
                         <vertex color>                  (默认为 0.0 0.0 0.0 0.0)

scene_blend              <add> | <modulate>              pass对场景的混合处理
                         <alpha_blend> | <colour_blend> 默认为不透明,不混合

scene_blend              <src_factor> <dest_factor>      场景混合功能的高级控制,参数值有
                                                         one, zero,dest_colour, src_colour,
                                                         one_minus_dest_colour,
                                                         one_minus_src_colour,
                                                         dest_alpha, src_alpha,
                                                         one_minus_dest_alpha,
                                                         one_minus_src_alpha(默认为zero)
   
depth_check              <on> | <off>                    这个pass是否允许深度缓冲检测
                                                         (默认为on)

depth_write              <on> | <off>                    这个pass是否允许深度缓冲写入
                                                         (默认为on)

depth_func               <func>                          pass使用的深度缓冲检测类型,值有
                                                         always_fail, always_pass,
                                                         less, less_equal, equal,
                                                         not_equal, greater_equal,  
                                                         greater (默认为 less_equal).

depth_bias               <offset>                        深度偏移值(默认为0)

alpha_rejection          <func>                          是否允许alpha-reject,值与上面
                                                         depth_func类似(默认为always_pass)

cull_hardware            <clockwise> | <anticlockwise> | 设置硬件顶点背面剔除的类型
                         <none>                          (默认为 clockwise)                                                            

cull_software            <back> | <front> | <none>       设置基于法线剔除的类型

lighting                 <on> | <off>                    是否允许动态光(默认为 on)

shading                  <flat> | <phong> | <gouraud>    设置动态光模式(默认为 gouraud)

polygon_mode             <solid> | <wireframe> |         设置渲染状态(默认为 solid)
                         <points>
   
fog_override             <true> | <false> [<type>        可以修改雾的设置.类型有none
                         <colour> <density>              linear,exp, exp2; colour
                         <start> <end>                   为RGB颜色值(值在0.0到1.0)
                                                         exp, exp2的density为浮点值
                                                         start和end为linear距离值
                                                         (默认为fog_override false).

colour_write             <on> | <off>                    是否允许颜色写入

max_lights               <number>                        动态光的数量

iteration                <once> | <once_per_light>       哪重光起作用once_per_light
                                                         point,directional,spot
                                                         默认为(once)

iteration                <number> [<per_light>           指示每种光的重复数量
                                                         (默认为1)

point_size               <size>                          点列表里点的尺寸(默认为 1)

point_size_attenuation   <on> | <off>                    点的尺寸石灰根据视觉空间   
                         [constant linear quadratic]     进行衰减(默认为off)

point_size_min           <size>                          衰减后的点的最小值
                                                         (默认为0)

point_size_max           <size>                          衰减后的点的最大值
                                                         (默认为0)

point_sprites            <on> | <off>                    是否允许硬件point-sprite渲染


Texture-Unit 属性

属性名                 值的格式                     描述

texture_alias            <alias>                          纹理的别名(默认为texture_unit名)

texture                  <name> [<type>] [unlimited |     texture_unit的静态纹理名.类型为1d
                         numMipMaps] [alpha]              2d(默认),3d,cubic; numMipMaps 为
                                                          自动生成时的数量(默认为unlimited)
                                                          alpha为装载单个alpha纹理通道

anim_texture             <base_name> <num_frames>         设置动画纹理使用的图象
                         <duration>                       根据 base_name 和 zero-based 索引
                                                          建立 num_frames 个图象.duration为
                                                          动画的长度.决定了纹理动画的FPS
                                                          (默认为不使用纹理动画)

anim_texture             <frame1> <frame2> ...            设置动画纹理的图象.
                         <duration>

cubic_texture            <base_name> <combinedUVW|        设置立方图的图象, base_name为使用
                         separateUV>                      的图象名。combinedUVW使用3D地址的
                                                          硬件立方图.separateUV 使用分离的纹理
                                                          文件的后缀为_fr, _bk, _up, _dn, _lf, _rt
                       
cubic_texture            front> <back> <up> <down>        设置立方图的纹理, separateUV 为上面说的
                         <left> <right>                  

tex_coord_set            <index>                          设置纹理使用的纹理坐标组.(默认为0)

tex_address_mode         <wrap> | <clamp> | <mirror> |    设置纹理寻址方式,默认为wrap
                         <border>

tex_border_colour        <r> <g> <b> [<a>]                定义须寻址模式border的颜色
                                                          (默认为0.0 0.0 0.0 1.0)

filtering                <none> <bilinear> <trilinear>    纹理过滤类型(默认为 anisotropic)

filtering                <minification> <magnification>   高级单位纹理过滤类型.minification
                         <mip>                            或magnification可以设置为point,
                                                          linear, anisotropic. mip 的参数
                                                          为 none, point, linear

max_anisotropy           <degree>                         anisotropy的最大度数(默认为1)
               
colour_op                <replace> | <add> |              纹理的混合类型(默认为 modulate)
                         <modulate> | <alpha_blend>

colour_op_ex             <operation> <source1>            高级纹理混合类型
                         <source2> [<manual_factor>]      operation 的参数为source1, source2,
                         [<manual_colour1>]               modulate,modulate_x2, modulate_x4, add,
                         [<manual_colour2>]               add_signed, add_smooth, subtract,
                                                          blend_diffuse_alpha,blend_texture_alpha,
                                                          blend_current_alpha,blend_manual,
                                                          dotproduct,blend_diffuse_color;
                                                          source1 和 source2 的参数为 src_current
                                                          src_texture, src_diffuse,
                                                          src_specular, src_manual;
                                                          manual_factor 和 manual_colour1 基于
                                                          operation, source1 和 source2的值

colour_op_               <src_factor> <dest_factor>       当multitexturing不能使用的时候
multipass_fallback                                        纹理混合使用的回调方法
                                                          src_factor 和 dest_factor的值
                                                          scene_blend 的类似

alpha_op_ex              (参考 colour_op_ex.)             于colour_op_ex类似但决定的是alpha值
                                                          如何混合.

env_map                  <off> | <spherical> |            允许这个纹理层作为环境贴图.(默认为off)
                         <planar> | cubic_reflection |   
                         cubic_normal
               
scroll                   <x> <y>                          让纹理scroll固定的偏移量

scroll_anim              <x_speed> <y_speed>              设置纹理固定速度的动画scroll

rotate                   <angle>                          设置纹理固定的旋转(逆时针多少度)

wave_xform               <xform_type> <wave_type>         设置纹理的变形.xform_type的参数有
                         <base> <freq> <phase>            scroll_x,croll_y, rotate, scale_x,
                         <amplitude>                      scale_y; wave_type的参数有sine, triangle,square, sawtooth, inverse_sawtooth
transform                <m00> <m01> . . . <m32> <m33>    给纹理应用一个4X4的变化矩阵      
lod_index                <number>                         这个technique使用的Detail level
                                                          (默认为0)

原文地址:http://hi.baidu.com/wjf1616/blog/item/e653028fc7be26e2513d92df.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值