材質腳本屬性
頂層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)
材質腳本屬性
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.