JavaScript EditorFree JavaScript Editor     Ajax Editor 



Main Page
  Previous Section Next Section

Agent-Based Approaches

The mathematical approach followed in the previous section is not the only way to deal with camera placement issues. After all, a real-world camera operator is not a machine. He's a human being using his brain and aesthetics criteria to select the best camera placement and orientation. Thus, camera placement looks like a great field in which to apply AI techniques. Many of the ideas discussed in other chapters of the book, such as rule systems, expert systems, or constraint solvers, can all be used to model the decision process used by our virtual cinematographer in order to call the best possible shot.

The camera operator could easily be implemented by means of a rule-driven agent. Rules describe the guidelines of the behavior, and rule priorities are used to select which decision must be taken at each moment. The rule system could look something like this:

defrule
(npc-closer-than 25)
(closest-npc equals ENEMY)
=>
(select-camera-destination npc)
(select-camera-origin overhead-from me)


defrule
(true)
=>
(select-camera-destination ahead-from me)
(select-camera-origin overhead-from me)

If this rule system is executed just once every few cycles, and results are interpolated using quaternions, we can reach strikingly good results and ease of use as far as the content pipeline is concerned.

      Previous Section Next Section
    
    Memorial Day Poems


    JavaScript EditorAjax Editor     JavaScript Editor