一.配置材质资源
OpenBrf寻找对应材质资源.
tableau配置材质资源
("round_shield_1", 0, "sample_shield_round_1", 512, 256, 0, 0, 0, 0,[
(store_script_param, ":banner_mesh", 1),
(set_fixed_point_multiplier, 100),
(init_position, pos1),
(position_set_x, pos1, -50),
(position_set_y, pos1, 125),
(cur_tableau_add_mesh, ":banner_mesh", pos1, 120, 0),
(init_position, pos1),
(position_set_z, pos1, 10),
(cur_tableau_add_mesh, "mesh_tableau_mesh_shield_round_1", pos1, 0, 0),
(cur_tableau_set_camera_parameters, 0, 200, 100, 0, 100000),
]),
二.使用材质资源
骑砍引擎支持少量的动态切换材质的场景,例如不同势力的盔甲颜色,军旗.不同势力衣服的纹章.
cur_item_set_tableau_material = 1981 # (cur_item_set_tableu_material, , ),
# Can only be used inside ti_on_init_item trigger in module_items.py. Assigns tableau to the item instance. Value of will be passed to tableau code. Commonly used for heraldic armors and shields.
cur_scene_prop_set_tableau_material = 1982 # (cur_scene_prop_set_tableau_material, , ),
# Can only be used inside ti_on_init_scene_prop trigger in module_scene_props.py. Assigns tableau to the scene prop instance. Value of will be passed to tableau code. Commonly used for static banners.
cur_map_icon_set_tableau_material = 1983 # (cur_map_icon_set_tableau_material, , ),
# Can only be used inside ti_on_init_map_icon trigger in module_map_icons.py. Assigns tableau to the icon prop instance. Value of will be passed to tableau code. Commonly used for player/lord party banners.
cur_agent_set_banner_tableau_material = 1986 # (cur_agent_set_banner_tableau_material, ),
# Can only be used inside ti_on_agent_spawn trigger in module_mission_templates. Assigns heraldry.
三.动态更新着色器算法
可通过提供函数调整高光alpha,环境等相关着色器参数.
# Operations used in module_tableau_materials.py module
cur_tableau_add_tableau_mesh = 1980 # (cur_tableau_add_tableau_mesh,, , ),
cur_tableau_render_as_alpha_mask = 1984 # (cur_tableau_render_as_alpha_mask)
cur_tableau_set_background_color = 1985 # (cur_tableau_set_background_color, ),
cur_tableau_set_ambient_light = 1987 # (cur_tableau_set_ambient_light, , , ),
cur_tableau_set_camera_position = 1988 # (cur_tableau_set_camera_position, ),
cur_tableau_set_camera_parameters = 1989 # (cur_tableau_set_camera_parameters, , , , , ),
cur_tableau_add_point_light = 1990 # (cur_tableau_add_point_light, , , , ),
cur_tableau_add_sun_light = 1991 # (cur_tableau_add_sun_light, , , , ),
cur_tableau_add_mesh = 1992 # (cur_tableau_add_mesh, , , , ),
cur_tableau_add_mesh_with_vertex_color = 1993 # (cur_tableau_add_mesh_with_vertex_color, , , , , ),
cur_tableau_add_mesh_with_scale_and_vertex_color = 2000 # (cur_tableau_add_mesh_with_scale_and_vertex_color, , , , , ),
cur_tableau_add_map_icon = 1994 # (cur_tableau_add_map_icon, , , ),
cur_tableau_add_troop = 1995 # (cur_tableau_add_troop, , , , ),
cur_tableau_add_horse = 1996 # (cur_tableau_add_horse, , , ),
cur_tableau_set_override_flags = 1997 # (cur_tableau_set_override_flags, ),
cur_tableau_clear_override_items = 1998 # (cur_tableau_clear_override_items),
cur_tableau_add_override_item = 1999 # (cur_tableau_add_override_item, ),
四.系统内置材质
#游戏窗口
tab_game_profile_window
#军旗
tab_game_troop_label_banner
#部队详情页
tab_game_party_window
#个人仓库页
tab_game_inventory_window
#角色详情页
tab_game_character_sheet