Stellaris

Stellaris

评价数不足
【Stellaris 3.9.x】アニメーションポートレート作成備忘録
由 6thStrikeUnit 制作
TouhouSeitofu_ShanghaiAliceTreatyOrganizationで先日実装した黒アリス・イカロウスのポートレートの作成に関する備忘録です。
あくまでもポートレート1個の作り方の備忘録であるため、
種族ポートレート作成やファイル加工手順など、より広範な範囲の説明などは
【Stellaris3.8.2】ポートレート&種族の作り方メモ を参照してください。
   
奖励
收藏
已收藏
取消收藏
00 - サンプル
以下に、黒アリス・イカロウスの稼働状態サンプル動画を示します。
https://youtu.be/h0TpqoxzCm4
01-1 - プログラム構文構成(.asset)
以下に、プログラム構文一式の記述を示します。

gfx\models\portraits\Black_Alice\Black_Alice_portrait_entities.asset


##########################黒アリス・イカロウス######################################## #表情アニメーションパターン #全体フレーム数144f/288f(一部身体活動) #身体活動半周期36f #機械翼半周期72f #分岐パターン #非活性周期→非活性周期→機械翼起動周期→機械翼起動中周期→機械翼起動中周期→機械翼終了周期→(戻る) #表情パターン #ランダム #アニメーション定義の紐付け(nameのキーをBlack_Alice_portrait_meshes.gfxで使用) animation = { name = "Black_Alice_Ikaros_idle1_animation" file = "Black_Alice_Ikaros_idle1.anim" } animation = { name = "Black_Alice_Ikaros_idle2_animation" file = "Black_Alice_Ikaros_idle2.anim" } animation = { name = "Black_Alice_Ikaros_idle3_animation" file = "Black_Alice_Ikaros_idle3.anim" } animation = { name = "Black_Alice_Ikaros_idle4_animation" file = "Black_Alice_Ikaros_idle4.anim" } animation = { name = "Black_Alice_Ikaros_idle5_animation" file = "Black_Alice_Ikaros_idle5.anim" } animation = { name = "Black_Alice_Ikaros_idle6_animation" file = "Black_Alice_Ikaros_idle6.anim" } animation = { name = "Black_Alice_Ikaros_idle7_animation" file = "Black_Alice_Ikaros_idle7.anim" } animation = { name = "Black_Alice_Ikaros_idle8_animation" file = "Black_Alice_Ikaros_idle8.anim" } animation = { name = "Black_Alice_Ikaros_wing_idle_animation" file = "Black_Alice_Ikaros_wing_idle.anim" } animation = { name = "Black_Alice_Ikaros_wing_opening_animation" file = "Black_Alice_Ikaros_wing_opening.anim" } animation = { name = "Black_Alice_Ikaros_wing_opened_animation" file = "Black_Alice_Ikaros_wing_opened.anim" } animation = { name = "Black_Alice_Ikaros_wing_closing_animation" file = "Black_Alice_Ikaros_wing_closing.anim" } #飛行ユニット #ボーン過多により一部が動作しないため、黒アリス本体と分離 #黒アリス本体は飛行ユニットentityに取り付け entity = { name = "Black_Alice_Ikaros_wing_entity" pdxmesh = "Black_Alice_Ikaros_wing_mesh" get_state_from_parent = no default_state = "idle1" default_state = "idle1" state = { name = "idle1" animation = "idle" animation_blend_time = 0 looping = no next_state = idle2 } state = { name = "idle2" animation = "idle" animation_blend_time = 0 looping = no next_state = opening } state = { name = "opening" animation = "opening" animation_blend_time = 0 looping = no next_state = opened1 event = { time = 0 node = "Magiccircle_01" particle = "synthetic_dawn_arthropoid_spark_effect" keep_particle = yes } event = { time = 0 node = "Magiccircle_02" particle = "synthetic_dawn_arthropoid_spark_effect" keep_particle = yes } event = { time = 0 node = "Magiccircle_03" particle = "ai_crisis_room_energy_effect" keep_particle = yes } event = { time = 0 node = "Magiccircle_04" particle = "synthetic_dawn_arthropoid_spark_effect" keep_particle = yes } ~~省略~~ event = { time = 0.4 node = "light_15" particle = "robot_portrait_blink_particle" keep_particle = yes } event = { time = 0.8 node = "light_16" particle = "robot_portrait_blink_particle" keep_particle = yes } } state = { name = "opened1" animation = "opened" animation_blend_time = 0 looping = no next_state = opened2 event = { time = 0.4 node = "light_01" particle = "robot_portrait_blink_particle" keep_particle = yes } event = { time = 0.8 node = "light_02" particle = "robot_portrait_blink_particle" keep_particle = yes } ~~省略~~ event = { time = 3.5 node = "shinkieffect_05" particle = "ai_crisis_room_smoke_effect" keep_particle = yes } event = { time = 4.2 node = "shinkieffect_06" particle = "ai_crisis_room_smoke_effect" keep_particle = yes } } state = { name = "opened2" animation = "opened" animation_blend_time = 0 looping = no next_state = closing event = { time = 0.4 node = "light_01" particle = "robot_portrait_blink_particle" keep_particle = yes } event = { time = 0.8 node = "light_02" particle = "robot_portrait_blink_particle" keep_particle = yes } ~~省略~~ event = { time = 3.5 node = "shinkieffect_05" particle = "ai_crisis_room_smoke_effect" keep_particle = yes } event = { time = 4.2 node = "shinkieffect_06" particle = "ai_crisis_room_smoke_effect" keep_particle = yes } } state = { name = "closing" animation = "closing" animation_blend_time = 0 looping = no next_state = idle1 } locator = { name = "alice_root" position = { 0 0 0 } } attach = { alice_root = "Black_Alice_Ikaros_entity" } } #黒アリス本体 entity = { name = "Black_Alice_Ikaros_entity" pdxmesh = "Black_Alice_Ikaros_mesh" get_state_from_parent = no default_state = "idle" state = { name = "idle" animation_blend_time = 0 looping = no next_state = idle1 } #8種類の表情のうち、いずれかをランダムに表示 #確率は全て同じ state = { name = "idle1" animation = "idle1" animation_blend_time = 0 looping = no chance = 1 next_state = idle11 event = { time = 0.7 node = "light_01" particle = "ai_portrait_background_light_particle" keep_particle = yes } ~~省略~~ event = { time = 6.0 node = "light_09" particle = "ai_portrait_background_light_particle" keep_particle = yes } } state = { name = "idle1" animation = "idle2" animation_blend_time = 0 looping = no chance = 1 next_state = idle event = { time = 0.7 node = "light_01" particle = "ai_portrait_background_light_particle" keep_particle = yes } ~~省略~~ event = { time = 13.3 node = "light_09" particle = "ai_portrait_background_light_particle" keep_particle = yes } }#ループ無し state = { name = "idle1" animation = "idle3" animation_blend_time = 0 looping = no chance = 1 next_state = idle event = { time = 0.7 node = "light_01" particle = "ai_portrait_background_light_particle" keep_particle = yes } ~~省略~~ event = { time = 6.0 node = "light_09" particle = "ai_portrait_background_light_particle" keep_particle = yes } }#ループ無し state = { name = "idle1" animation = "idle4" animation_blend_time = 0 looping = no chance = 1 next_state = idle event = { time = 0.7 node = "light_01" particle = "ai_portrait_background_light_particle" keep_particle = yes } ~~省略~~ event = { time = 6.0 node = "light_09" particle = "ai_portrait_background_light_particle" keep_particle = yes } }#ループ無し state = { name = "idle1" animation = "idle5" animation_blend_time = 0 looping = no chance = 1 next_state = idle event = { time = 0.7 node = "light_01" particle = "ai_portrait_background_light_particle" keep_particle = yes } ~~省略~~ event = { time = 13.3 node = "light_09" particle = "ai_portrait_background_light_particle" keep_particle = yes } }#ループ無し state = { name = "idle1" animation = "idle6" animation_blend_time = 0 looping = no chance = 1 next_state = idle event = { time = 0.7 node = "light_01" particle = "ai_portrait_background_light_particle" keep_particle = yes } ~~省略~~ event = { time = 13.3 node = "light_09" particle = "ai_portrait_background_light_particle" keep_particle = yes } }#ループ無し state = { name = "idle1" animation = "idle7" animation_blend_time = 0 looping = no chance = 1 next_state = idle event = { time = 0.7 node = "light_01" particle = "ai_portrait_background_light_particle" keep_particle = yes } ~~省略~~ event = { time = 13.3 node = "light_09" particle = "ai_portrait_background_light_particle" keep_particle = yes } }#ループ無し state = { name = "idle1" animation = "idle8" animation_blend_time = 0 looping = no chance = 1 next_state = idle event = { time = 0.7 node = "light_01" particle = "ai_portrait_background_light_particle" keep_particle = yes } ~~省略~~ event = { time = 13.3 node = "light_09" particle = "ai_portrait_background_light_particle" keep_particle = yes } }#ループ無し state = { name = "idle11" animation = "idle1" animation_blend_time = 0 looping = no next_state = idle } } #縮小バージョン #ポートレート表示限界のため設定、ゲーム内イベントや布告を通して切り替え可能にしている entity = { name = "Black_Alice_Ikaros_wing_mini_entity" locator = { name = "mini_root" position = { 0 12 0 } } attach = { mini_root = "Black_Alice_Ikaros_wing_entity" } scale = 0.5 }

01-2 - プログラム構文構成(.gfx、portraits.txt)
以下に、プログラム構文一式の記述を示します。

gfx\models\portraits\Black_Alice\Black_Alice_portrait_meshes.gfx

objectTypes = { pdxmesh = { name = "Black_Alice_Ikaros_mesh" file = "gfx/models/portraits/Black_Alice/Black_Alice_Ikaros.mesh" #Black_Alice_portrait_entities.assetで紐付けしたアニメーション定義 animation = { id = "idle1" type = "Black_Alice_Ikaros_idle1_animation" } animation = { id = "idle2" type = "Black_Alice_Ikaros_idle2_animation" } animation = { id = "idle3" type = "Black_Alice_Ikaros_idle3_animation" } animation = { id = "idle4" type = "Black_Alice_Ikaros_idle4_animation" } animation = { id = "idle5" type = "Black_Alice_Ikaros_idle5_animation" } animation = { id = "idle6" type = "Black_Alice_Ikaros_idle6_animation" } animation = { id = "idle7" type = "Black_Alice_Ikaros_idle7_animation" } animation = { id = "idle8" type = "Black_Alice_Ikaros_idle8_animation" } scale = 3.2 } pdxmesh = { name = "Black_Alice_Ikaros_wing_mesh" file = "gfx/models/portraits/Black_Alice/Black_Alice_Ikaros_wing.mesh" animation = { id = "idle" type = "Black_Alice_Ikaros_wing_idle_animation" } animation = { id = "opening" type = "Black_Alice_Ikaros_wing_opening_animation" } animation = { id = "opened" type = "Black_Alice_Ikaros_wing_opened_animation" } animation = { id = "closing" type = "Black_Alice_Ikaros_wing_closing_animation" } scale = 3.2 } }


gfx\portraits\portraits\SATO2_portraits.txt

portraits = { thstf_Black_alice_Ikaros = { #Black_Alice_portrait_entities.assetで定義したentity entity = "Black_Alice_Ikaros_wing_entity" clothes_selector = "no_texture" hair_selector = "no_texture" greeting_sound = "human_female_greetings_07" custom_close_up_position_offset = { x = 50 y = 0 } custom_mid_close_up_position_offset = { x = 50 y = 0 } } thstf_Black_alice_Ikaros_mini = { entity = "Black_Alice_Ikaros_wing_mini_entity" clothes_selector = "no_texture" hair_selector = "no_texture" greeting_sound = "human_female_greetings_07" custom_close_up_position_offset = { x = 50 y = 0 } custom_mid_close_up_position_offset = { x = 50 y = 0 } } thstf_Black_alice_Ikaros_armored = { entity = "Black_Alice_Ikaros_entity" clothes_selector = "no_texture" hair_selector = "no_texture" greeting_sound = "human_female_greetings_07" custom_close_up_position_offset = { x = 50 y = 0 } custom_mid_close_up_position_offset = { x = 50 y = 0 } } } #種族ポートレートの定義 #portraits = に上で定義したキーを入れることで、ゲーム開始時の指導者やランダムリーダー・POPの外見として使用可能になる #他に、ゲーム中にリーダースコープのイベント内でchange_leader_portraitを使用することでも、リーダーのポートレート変更が可能 portrait_groups = { sd_doll_machine = { #entity = "portrait_mammalian_synthetic_dawn_01_entity" clothes_selector = "no_texture" hair_selector = "no_texture" greeting_sound = "robot_mammalian_greetings"entity = "portrait_plantoid_synthetic_dawn_01_entity" clothes_selector = "no_texture" hair_selector = "no_texture" greeting_sound = "robot_plantoid_greetings" default = beru_doll_01 game_setup = { #will run with a limited country scope. species and government is set but the country does not actually exist add = { portraits = { thstf_Black_alice_Ikaros thstf_Black_alice_Ikaros_mini thstf_Black_alice_Ikaros_armored } } } } }












02 - 画像ファイル/メッシュ構成
まず、黒アリス・イカロウスに関連する全ファイルの一覧を示します。





Black_Alice_Ikaros_wing.mesh
次に、「Black_Alice_Ikaros_wing.mesh」のBlender上での状態を示します。
ボーンが多すぎる場合、後半に追加したボーンに関連するパーツが表示されなくなることが判明しているため、
飛行ユニットと黒アリス本体のMeshを分けています。







Black_Alice_Ikaros.mesh
次に、「Black_Alice_Ikaros.mesh」のBlender上での状態を示します。










Black_Alice_Ikaros_base.mesh
次に、「Black_Alice_Ikaros_base.mesh」のBlender上での状態を示します。
このメッシュは作業用であり、実際に使用するメッシュでは中身は分離されています。





Textures
次に、使用される各テクスチャの状態を示します。
Stellaris使用用に、各部位をレイヤー分けするよう依頼したコミッションイラストのPSDファイルを加工しています。
ファイル形式はDDS、BC3/DXT5圧縮、ミップマップありで出力されています。(GIMPのDDS出力プラグインによる)


03 - 備考
<アニメーション編集時備考>
アニメーション編集は、MMD等におけるフレーム登録に似たやり方で行いますが、
エクスポートした際に中割部分のキーフレームが全てファイル内に打ち込まれてしまうため、
一度保存したものを再編集することが困難になっています。

1つのアニメーションファイルの作成を開始した場合、
最後まで中断しないようにした方が良いでしょう。



<メッシュ加工編集時備考>
編集時は、デフォルトではBlender上でテクスチャの透過が行われないので
Shardingタブからアルファをノード接続すると確認がしやすい。

Stellaris上での描画には影響しないため、精密な配置作業などを
必要としない作業工程ではノード接続の必要は無い。