Pages

2007/03/16

[教學][筆記]AI implant action selection決定樹

這篇是我讀AI implant v2.0官方pdf教學 最後一篇的Character animation的筆記. AI implant最難的應該是Action slection/decision tree 動作決定/決定樹 這部分吧! 就該篇教學做說明, 做個人隨著移動速度轉換走或是跑的動畫.



上圖是該AI character的Action slection左側的第一個值: RunspeedDatum. 可以藉由Create New Datum產生. Datum就是資料的意思 這裡這個值是作為一個運算變數.


第二個值是RunSpeed Sensor.可以經由Create Speed Sensor產生. 然後再由Is value in Range Datum選擇步驟一產生的變數"RunspeedDatum"使兩者連結在一起. 意思就是說 當速度在6-12之間 數值RunspeedDatum就為真.


最後一個就是decision tree決定樹.可以經由Create Decision Tree產生. 其中Condition Comparator要選擇Boolean, 如此Add child時就會產生兩個分支: then, else 則 否則. 而If如果則要選擇變數RunspeedDatum. 而then當中 activate jog可以經由ActivateAnimationCommand產生. 整體的意思就是 當RunspeedDatum為真(速度在6-12)時 執行then分支當中的指令(撥放jog動畫 以及 執行accelerateAt行為); 當RunspeedDatum為假時(速度非6-12間)則執行else當中命令.

這只是一個簡單的決定樹. 角色有兩個固定動畫 一為走一為跑 行為只有加速行為. 利用RunSpeed Sensor偵測器 偵測速度快或是慢. 慢的話就經由決定樹決定撥放走的動畫 快的話就撥放跑的動畫. 但不管速度如何 都執行AccelerateAt加速的行為. 可見這裡RunSpeed Sensor偵測器占了關鍵性的地位. 如果你是要偵測角色是生是死 偵測器就要改成PropertySensor.

1 comment:

  1. Hey Dream Writer,
    I'm currently a student studying 3d animation at The Academy of Interactive Entertainment in Victoria, Australia. I'm currently undertaking a project on Procedural Animation, focusing in the fields of ragdoll and of another yet to be decided (one to tie in). I am however finding it extremely difficult to find any information or books that teach me thses area's......untill i found your page. I'd like to ask you some questions regarding this or if you could please refer any good resources that would be much appreciated. You can contact me at shawn.marinakis@students.aie.edu.au
    I look forward to speaking to you soon.

    Regards,
    Shawn Marinakis

    ReplyDelete