continuity editing for 3d animationcontinuity editing for 3d animation quentin galvane inria univ....

of 10/10
HAL Id: hal-01088561 https://hal.inria.fr/hal-01088561v2 Submitted on 3 Feb 2015 HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés. Continuity Editing for 3D Animation Quentin Galvane, Rémi Ronfard, Christophe Lino, Marc Christie To cite this version: Quentin Galvane, Rémi Ronfard, Christophe Lino, Marc Christie. Continuity Editing for 3D Anima- tion. AAAI Conference on Artificial Intelligence, Jan 2015, Austin, Texas, United States. pp.753-761. hal-01088561v2

Post on 31-Mar-2020

6 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • HAL Id: hal-01088561https://hal.inria.fr/hal-01088561v2

    Submitted on 3 Feb 2015

    HAL is a multi-disciplinary open accessarchive for the deposit and dissemination of sci-entific research documents, whether they are pub-lished or not. The documents may come fromteaching and research institutions in France orabroad, or from public or private research centers.

    L’archive ouverte pluridisciplinaire HAL, estdestinée au dépôt et à la diffusion de documentsscientifiques de niveau recherche, publiés ou non,émanant des établissements d’enseignement et derecherche français ou étrangers, des laboratoirespublics ou privés.

    Continuity Editing for 3D AnimationQuentin Galvane, Rémi Ronfard, Christophe Lino, Marc Christie

    To cite this version:Quentin Galvane, Rémi Ronfard, Christophe Lino, Marc Christie. Continuity Editing for 3D Anima-tion. AAAI Conference on Artificial Intelligence, Jan 2015, Austin, Texas, United States. pp.753-761.�hal-01088561v2�

    https://hal.inria.fr/hal-01088561v2https://hal.archives-ouvertes.fr

  • Continuity Editing for 3D Animation

    Quentin GalvaneINRIA

    Univ. Grenoble Alpes & LJK

    Rémi RonfardINRIA

    Univ. Grenoble Alpes & LJK

    Christophe LinoINRIA

    Univ. Grenoble Alpes & LJK

    Marc ChristieIRISA

    University of Rennes I

    Abstract

    We describe an optimization-based approach for auto-matically creating well-edited movies from a 3D an-imation. While previous work has mostly focused onthe problem of placing cameras to produce nice-lookingviews of the action, the problem of cutting and past-ing shots from all available cameras has never been ad-dressed extensively. In this paper, we review the maincauses of editing errors in literature and propose an edit-ing model relying on a minimization of such errors. Wemake a plausible semi-Markov assumption, resulting ina dynamic programming solution which is computation-ally efficient. We also show that our method can gen-erate movies with different editing rhythms and vali-date the results through a user study. Combined withstate-of-the-art cinematography, our approach thereforepromises to significantly extend the expressiveness andnaturalness of virtual movie-making.

    IntroductionThe wide availability of high-resolution 3D models and thefacility to create new geometrical and animated contents, us-ing low-cost input devices, opens to many the possibility ofbecoming digital 3D storytellers. A convincing illustrationis the rise of the machinima1 community, consisting in cre-ating movies by relying on contents and rendering enginesborrowed from computer games through ad-hoc techniquesor dedicated modeling tools2.

    To date there is however a clear lack of accessible toolsto easily create the cinematography (positioning the cam-eras to create shots) and perform the editing of such sto-ries (selecting appropriate cuts between the shots created bythe cameras). Creating a movie requires the knowledge ofa significant amount of empirical rules and established con-ventions. In particular continuity editing – the creation ofa sequence of shots ensuring visual continuity – is a com-plex endeavor. Most 3D animation packages lack continuityediting tools, calling the need for automatic approaches thatwould, at least partially, support users in their creative pro-cess (Davis et al. 2013).

    1contraction of machine and cinema2see iClone http://www.reallusion.com/iclone/

    or Moviestorm http://www.moviestorm.co.uk/ tools

    Previous contributions in automatic film editing have fo-cused on generative methods mixing artificial intelligenceand computer graphics techniques. However, evaluating thequality of film editing (whether generated by machines or byartists) is a notoriously difficult problem (Lino et al. 2014).Some contributions mention heuristics for choosing betweenmultiple editing solutions without further details (Christian-son et al. 1996) while other minimize a cost function whichis insufficiently described to be reproduced (Elson and Riedl2007). Furthermore, the precise timing of cuts has not beenaddressed, nor the problem of controling the rhythm of cut-ting (number of shots per minute) and its role in establish-ing film tempo (Adams, Dorai, and Venkatesh 2002). Mostapproaches yield a reactive style of editing known by pro-fessional editors as the dragnet style (Murch 1986), whichmechanically cuts to new speakers or actions.

    In this paper, we propose a continuity editing model for3D animations that provides a general solution to the au-tomated creation of cinematographic sequences. Our modelencodes the continuity editing process as a search for the op-timal path through an editing graph. In this editing graph, anode represents a time-step (a temporal fragment of a shot),and an arc represents a transition between two cameras, go-ing from a camera to either the same camera (no cut) or an-other camera (cut).

    Our optimization uses dynamic programming to mini-mize, under a semi-Markovian hypothesis, the errors madealong three criteria (see Figure 1): the quality of the shots(with respect to the unfolding actions), the respect of conti-nuity editing rules and the respect of a well-founded modelof rhythm (cutting pace). Semi-Markov models (Murphy2002; Yu 2010) have been used before in the context ofinformation extraction (Sarawagi and Cohen 2004), speechgeneration (Zen et al. 2007) and computer vision (Shi et al.2008). To the best of our knowledge, this is the first time theyare suggested as a computational model for film editing.

    Our contributions are: (i) a detailed formalization of con-tinuity editing for 3D animation, encompassing a thoroughnumber of visual properties and continuity rules (ii) an op-timal algorithm for automatic editing in which parameterssuch as pacing can be controlled, thereby significantly in-creasing the expressiveness of editing tools, and (iii) a vali-dation of our model through a user evaluation comparing theoriginal edit of an existing movie with our optimal edit and

  • Jump Cuts

    Continuity errors

    Non-motivated shots and cuts

    Our solution

    Jump Cut Jump Cut

    left-to-right gaze directionscreen

    Figure 1: Editing errors in a short sequence of a movie. From topto bottom: jump cut errors; breaking the continuity errors; non-motivated shots and cuts. The last edit is the output of our system.

    with degraded approaches.

    Related workThe problem of generating movies from 3-D animation canbe decomposed into the problems of (i) choosing shots andplacing cameras (the cinematography problem), and (ii) de-ciding when to assemble those shots into a movie (the filmediting problem). In this section, we review previous workon the film editing problem chronologically.

    (Christianson et al. 1996) introduce the declarative cam-era control language (DCCL) as a general framework forgenerating idiom-based solutions to cinematography andfilm editing problems. Film idioms (He, Cohen, and Salesin1996) are recipes for obtaining good cinematography andediting in any given situation, similar to cases in case-basedreasoning. As a result, DCCL uses a conversation idiom forfilming conversations, a fighting idiom for filming fights, etc.DCCL then builds a film tree, as a result of filming eachscene in all available idioms, and includes a heuristic evalu-ator for checking the visual quality of sequences, choosingthe one with the highest quality. The evaluation criteria areonly briefly mentioned, and in comparison, we offer a fulldescription of a scoring function that can be used to find op-timal editing solutions using all available cameras in a prin-cipled and reproducible fashion.

    (Tomlinson, Blumberg, and Nain 2000) propose a fullyautomatic method for generating expressive cinematogra-phy. Their system uses autonomous cameras with emotionalstates and goals, that choose between a number of visualtargets – such as a specific character, or two characters in-teracting with each other, or one character interacting withits environment. Though their system interestingly motivatesthe shots both emotionally and visually, the rules of montage(editing) are not enforced, and the pacing of the shots is re-

    solved by ad hoc rules. (Kennedy and Mercer 2002) directlyaddress the problem of planning a complete sequence ofshots for a given sequence of actions which must be knownin advance. Users can choose between fast or slow editingin two different styles. Authors use a depth-first forwardchained planner which can only evaluate a small number ofpossible plans and enforce a single continuity editing rule(”not crossing the line of action”).

    Unlike previous work, Darshak (Jhala and Young 2011)takes as input an explicit declarative representation of thestory goals, including all actions, causal links between ac-tions, and ordering constraints. Story goals are defined interms of a small number of dramatic situations, and a hier-archical partial-order causal link planner computes a cam-era plan, consisting of a sequence of shots that achievesthe desired story goals. Darshak goes a long way into mo-tivating the shots, but the actual cinematography and edit-ing are not evaluated. Cambot (Elson and Riedl 2007) is amovie-making system where the choice of shots is found asa solution to an optimization problem using dynamic pro-gramming. The scene is expressed as a sequence of non-overlapping dramatic beats and their approach evaluatesdifferent placement of characters (blockings) and camerachoices for each beat. Though we also make use of dynamicprogramming, our method is very different from (Elson andRiedl 2007). Firstly, we search a much larger set of possiblesolutions, by evaluating a higher number of shot transitionsat a finer level of granularity (every frame, rather than everybeat). As a result, our method makes it possible to choosethe precise cutting point between shots, and to maintain con-trol over the rate of shot changes (cutting pace). Secondly,we describe in detail a cost function which implements anextensive set of film editing rules. Our cost function has asemi-Markov property which allows to efficiently optimizeover this larger solution space. Thirdly, our method does notrequire the scene to be decomposed into a linear sequence ofbeats, and works equally well with overlapping actions anddialogues.

    (Assa, Wolf, and Cohen-Or 2010) propose a fully auto-mated editing process that performs cuts in real-time be-tween multiple cameras viewing human motions. The rank-ing between shots is computed by measuring for each cam-era the correlation between human motions in the 3D scene,and the on-screen 2D projection of these motions (the largerthe correlation, the better the shot). A measure of erosion ofthe current view is employed to motivate the cuts betweenthe viewpoints, while enforcing continuity rules (jump-cutand crossing the line of action). In a similar context of real-time cinematography, (Lino et al. 2010) propose a systemthat automatically computes for each frame a collection ofdistinct viewpoints through spatial partitions. The editingprocess is then performed by encoding continuity rules asfiltering operators that remove inconsistent viewpoints.

    (Markowitz et al. 2011) extend the film idiom approachby replacing finite state machines with behavior trees. Theyenforce the 180 degree rule and the 30 degree rule, assuminga single line of interest at any given time in the scene. Simi-lar to film idioms, their approach remains reactive, resultingin an editing style that immediately follows the action and

  • cannot easily control the pacing or style of the editing.

    System overviewIn this paper, we cast the problem of film editing as an opti-mization problem over a space of semi-Markov chains. Oursystem takes as input a 3D animation scene, comprising aflow of world events, and a set of rushes taken from dif-ferent cameras and covering the whole scene. We then rankpossible edits on three key aspects: (i) how much shots con-vey unfolding actions, (ii) how much continuity editing rulesare enforced and (iii) how much an input cutting rhythm isrespected.

    Given a 3D animated scene with arbitrarily complex ac-tions a and a choice of rushes (i.e. unedited footage) fromM cameras, a semi-Markov chain is a sequence of states(shots) sj with durations dj , chosen according to a proba-bility model over sj , dj and a. The probability of the nextshot sj+1 of duration dj+1 and starting at time tj+1 dependsonly on the previous shot sj and the actions a in the segment[tj+1, tj+1 + dj+1].

    We here introduce the notion of editing graph, the graphof all possible shots and transitions. In this graph, a noderepresents a time-step (one frame) of a rush and an arc rep-resents a transition from frame i of a rush (camera) to framei+ 1 of a rush (same or different). The output of our systemis then a full edit list of the scene, computed as the continu-ous path through our editing graph minimizing the errors onthese three key aspects.

    The first input of our system is an ordered list of dura-tive world events (that we refer to as actions), expressed inthe form (subject, verb, object). In the following, we con-sider that the subject and object of all actions are char-acters, and we refer to the set of all characters as C. Weuse four main categories of actions: speaking actions per-formed by the character’s mouth, reacting actions performedby the character’s eyes, manipulating actions performed bythe character’s hands, and moving actions performed by thecharacter’s feet. As a result, a character can be the subjectof at most four different actions at any given time and theobject of an unlimited number of actions.

    The second input of our system is a list of M rushes fromdifferent cameras filming the scene for a total duration ofN video frames. We are agnostic about how the rushes areobtained. Though in this paper a number of cameras wereplaced manually by a human expert, they could equally becomputed by an automatic camera planner such as (Druckerand Zeltzer 1995; He, Cohen, and Salesin 1996; Markowitzet al. 2011; Elson and Riedl 2007) or any other method.

    The output of our system is a movie, described as an editdecision list (EDL) defined as a sequence of shots sj inthe form of triplets (rj , tj , dj). Note that in this paper, weonly consider chronological EDLs where time is preserved(tj+1 = tj + dj). In this limited context, the EDL can bereconstituted using the rush selection function r(t) whichgives the rush index as a function of time.

    We here propose to cast the editing process into a mathe-matical model accounting for three criteria: (i) how muchshots convey unfolding actions, (ii) the continuity editing

    principles and (iii) the cutting rhythm of the movie. To do so,we use a log-linear model where the probability of choosinga particular sequence of shots sj is taken to be the expo-nential of a linear cost function C(s, a). The cost functionC(s, a) is further decomposed into three terms which sep-arately measure (i) errors in conveying unfolding actions ineach shot, (ii) violations of continuity editing rules in eachcut and (iii) errors in choosing shot durations.

    C(s, a) =∑j

    ∑tj≤t≤tj+dj

    CA(rj , t)

    +∑1≤j

    CT (rj−1, rj , tj) +∑j

    CR(dj)

    In this equation, the first term is a sum over all framesof all shots of a cost function CA related to actions inthe scene. The second term is a sum over all cuts ofa cost function CT related to transitions between shots.Those two term are further decomposed into weightedsums of features, i.e. CA(rj , t) =

    ∑k w

    Ak C

    Ak (rj , t) and

    CT (ri, rj , t) =∑k w

    Tk C

    Tk (ri, rj , t). The third term is a

    sum over all shots of a cost function CR related to editingrhythm. In the following sections, we explain each of thoseterms, and refer to the Appendix for mathematical details.

    Symbolic projectionDuring the shooting of a virtual scene, all cameras captureimages which are perspective projections of the world sceneinto their own frame of reference. In parallel to the com-putation performed by the graphics pipeline, we perform asymbolic projection of the actions which keeps a record ofhow much of the action is visible in each rush at every singleframe.

    This is performed as follows. First, each action is decom-posed into its constituents – verb, subject and object. Basedon the verb category (speaking, reacting, moving or manip-ulating), we then compute the bounding boxes of involvedbody parts (e.g. mouth, eyes, hands and feet) of the subjectand object characters. We then compute the screen size oftheir projection in each frame of a rush. 0 Second, to eval-uate how much of these actions are visible, we compute thevisible and occluded areas of characters. To do so, for eachface f of each body part b of a character, we compute its pro-jected size (or area) S(f, r, t) at time t in rush r. This pro-jected size is measured relatively to the screen size, and com-prises both the on-screen and off-screen projections of f . Wethen define the visible and occluded sizes of f as follows.Its occluded size O(f, r, t) corresponds to the cumulativesize of its areas that are either occluded or appear off-screen,while its visible size V (f, r, t) is the complementary valuecomputed such that S(f, r, t) = V (f, r, t) +O(f, r, t). Wefinally define the projected size and the visible size of eachcharacter c as the sum of corresponding values on each faceof its body parts: V (c, r, t) =

    ∑b∈c

    ∑f∈b

    V (f, r, t)

    This method is further easily extended to the case ofnon-character objects (we use their bounding boxes) andmultiple-characters.

  • MartyGeorgeGoldieLou

    100%0% 40% 60% 80%20%

    (a) Narrative importance per character per frameMartyGeorgeGoldieLou

    (b) On-screen character sizes in Zemeckis movieMartyGeorgeGoldieLou

    (c) On-screen character sizes in our solution

    Figure 2: The relative narrative importance of a character is com-puted from all actions where it plays a role. It correlates with thescreen size of the characters in both the Zemekis movie (linear cor-relation coefficient of 0.56) and our solution (0.73).

    Narrative importanceTo each action a holding at time t, a narrative importanceI(a) is attributed depending on whether a is a foregroundor a background action. We then firstly distribute the impor-tance according to the different roles in the action (subjectand object). Note that this defines the narrative importanceof each character I(c, t) at time t. We secondly distributethe importance given to each role proportionally into the in-dividual body parts of the character filling the role. For in-stance, in a speak action the subject’s and object’s visualtargets are their heads; in a manipulate action the subject’svisual target is its head and chest; in a move action, the sub-ject’s visual target is its full body. We finally non-uniformlydistribute the importance of a body part on its front, backand side faces to obtain the narrative importance of each faceI(f, t) of a character at time t.

    Shot selectionBased on the symbolic and geometric data related to unfold-ing actions of a given frame, we rank every frame of everyshot on three aspects: the action visibility, the action prox-imity and the action ordering (also known as the Hitchcockprinciple).

    The action visibility term evaluates how much of unfold-ing actions is visible. To fully satisfy this criteria, each im-portant body part of a character taking part in an unfoldingaction should be on-screen and fully visible. The cost associ-ated to action visibility is computed as the sum, on each facef of each body part b of each character c, of the occludedproportion of the face weighted by its narrative importance:

    CAV (r, t) =∑c∈C

    ∑b∈c

    ∑f∈b

    I(f, t) · O(f, r, t)S(f, r, t)

    The action proximity term evaluates how immersed thecamera is in the unfolding actions, i.e. how much the screen

    is filled by actions. The cost (or penalty) associated to pooraction proximity is then given by the proportion of the screenfilled by the characters:

    CAP (r, t) = 1−∑c

    V (c, r, t)

    The action ordering term evaluates how much the on-screen importance of a character matches its narrative im-portance. This is also known as the Hitchcock principle,which states that the size of a character should be propor-tional to its narrative importance in the story (Truffaut andScott 1967; Hawkins 2005; DeLoura 2009). Our implemen-tation considers all characters present in the scene, not justthe characters present in each shot, or the characters par-ticipating in the main action. This has the benefit to easilyrule out prominent shots of unimportant characters and fa-vor prominent shots of important characters, focusing on itsimportant body parts (mouth while speaking, eyes while re-acting, hands while manipulating, feet while moving). Thecost associated to the Hitchcock principle is computed as thesum of all deviations of the on-screen visibility of a charac-ter compared to its narrative importance:

    CAH(r, t) =∑c∈C

    ∣∣∣∣∣∣ I(c, t)∑c′I(c′, t)

    − V (c, r, t)∑c′V (c′, r, t)

    ∣∣∣∣∣∣Continuity editing

    We rank all possible transitions between rushes based ona computational model of continuity-editing. Continuity-editing is the most commonly used editing style in filmmak-ing. It relies on a set of well established rules: avoiding jumpcuts, enforcing the screen, motion and gaze continuity andmaintaining the left-to-right ordering of on-screen charac-ters (Dmytryk 1984; Thompson and Bowen 2009).

    Jump cuts When the same character appears in two con-secutive shots (i.e. before and after a cut), there must be suf-ficient change in either its apparent size or its profile anglein the two shots, so that the audience perceives the cut asa change in viewpoint, rather than a sudden change in thecharacter’s pose, also known as a jump cut. To prevent suchcuts, we penalize such errors through a cost function overall characters appearing in successive shots, whose formulais detailed in Section Jump cuts of the appendix.

    Screen, motion and gaze continuity The main goal ofcontinuity editing is to enforce continuity on screen posi-tions, motion directions and gaze directions of all charac-ters across the cut. To prevent discontinuities, we penalizethem through a non-linear combination of the differences inscreen position, gaze direction and motion direction of allcharacters appearing in successive shots. The formulas ofthese cost functions are detailed in Sections Screen continu-ity, Motion continuity and Gaze continuity of the appendix.

  • Left-to-right ordering The left-to-right ordering of char-acters is another important factor to enforce visual continu-ity. Characters whose relative screen positions are reversedafter a cut appear to be jumping around, which attracts at-tention to the cut (Smith 2005) – this criteria is also knownas the 180 degree rule. For every pair of character (c, c′)appearing on-screen before and after the cut, we then penal-ize the reversion (cost=1) iff their oriented difference of on-screen position ∆Px(c, c′) (taken on the x axis) is of oppo-site sign. The overall cost on left-to-right continuity is thencomputed as the sum of this penalty on all pairs of characterappearing on-screen before and after the cut. The formula ofthis cost function is detailed in Section Left-to-right order-ing of the appendix.

    Cutting rhythmCutting rhythm is an important element of film editing style(Bordwell 1998). Cutting between cameras produces vi-sual rhythm. Fast cutting as in an action scene can changecameras as often as every half second. The cutting rhythmhas been studied extensively by film scholars (Salt 2009;Cutting, DeLong, and Nothelfer 2010) who have shown thatit is well approximated with a time-varying log-normal dis-tribution of shot durations (Limpert, Stahel, and Abbt 2001).Parameters of the log-normal distribution are the mean µand standard deviation σ of the log-transformed durationslog dj , which result in a skewed distribution of durationswith average shot length ASL = exp

    (µ+ σ2

    )and vari-

    ance V ar = exp(2µ+ σ2

    )(expσ2−1) . Rather than mak-

    ing automatic decisions, our system is designed to let theuser/director choose the average shot length (ASL) whichdictates the rhythm of editing, and hence the editing style.To enforce those values, we compute a cost measuring, foreach shot sj of duration dj , the deviation of its duration fromthe log-normal distribution

    CR(dj) =(log dj − µ)2

    2σ2+ log dj

    Optimization-based film editingWe evaluate the cost of an arbitrary edit decision list ofshots sj with a weighted sum of simple feature functions.To do so, we use a dynamic programming approach tofind the minimum cost solution by storing partial solutions(Mitchell, Harper, and Jamieson 1995; Murphy 2002).

    We define B(r, t) to be the cost of the best sequence ofshots ending at time t with a shot using rush r. One impor-tant result that follows from our choice of cost functions isthe following recurrence relation

    B(r, t) = mint0 < t

    r0 6= r

    B(r0, t0) + C

    T (r0, r, t0 + 1)

    +t∑

    t′=t0+1

    CS(r, t′) + CR(t− t0)

    In plain words, the best sequence ending on rush r at time(frame) t can be computed by comparing all combinations

    Rush 1

    Rush 2

    Rush 3

    Rush 4

    Rush M

    ...

    tt3t2t1t0

    B(3,t)

    Figure 3: Illustration of our dynamic programming algorithm, us-ing semi-Markov decisions. The best edit in which a shot ends inRush 3 at time t is computed as the best combination (drawn inred) of an edit in which a shot ends in Rush r0 6= 3 at a prior timeti < t then a shot using Rush 3 between ti and t.

    of a shot ending on rush r0 at time t0 < t, followed by a cutfrom rush r0 to rush r between frames t0 and t0+1, followedby a shot of duration t− t0 using rush r (see Figure 3).

    Using the above recurrence, we build the table of B(r, t)in time M2N2 and space MN , where M is the numberof rushes and N is the number of video frames. We ad-ditionally store a back-pointer to retrieve the actual pathyielding the minimum-cost solution. Note that the methodcan also be used to retrieve sub-optimal solutions endingin other cameras. This can be useful in cases where thefinal shot is chosen by the director. To improve our sys-tem efficiency, we further restrain the search in our algo-rithm to a constant horizon H (longest allowable shot du-ration) of 30 seconds. This leads to compute a solutionin time M2NH (Mitchell, Harper, and Jamieson 1995;Murphy 2002), which is sufficient for our purpose. Forlonger sequences with more rushes, an algorithm by (Datta,Hu, and Ray 2008) can be used to compute an exact andunbounded solution in time MN(M +N).

    Experimental resultsTo validate our approach, we have recreated the animationof a well-known scene from Robert Zemeckis’ movie “Backto the future”. The average shot length (ASL) in the originalversion is 6.6 seconds. The distribution of shot lengths inthe original version is well approximated with a log-normallaw of mode m = 2.28 and standard deviation σ = 0.82.This short (80 seconds) scene is a moderately complex in-terior scene, with four main characters, all engaging in avariety of actions, including two-way and three-way dia-logues, physical contacts, and everyday activities such assweeping the floor and serving food. All animations weremanually annotated to provide (subject, verb, object) de-scriptions at the right time-codes. Twenty-five cameras weremanually placed for the whole duration of the sequence (six-teen of them closely approximating the actual cameras fromthe original movie, and nine providing alternative angles).

    The evaluation of editing is a general and challengingproblem (Lino et al. 2014) since no ground truth is available

  • Figure 4: The scores obtained by the five stimuli, each repre-sented with a whisker plot. The central point represents themedian score, the box represent the scores between the firstand third quartiles, and the bottom and top lines representthe minimum and maximum scores.

    for objective comparisons. As a consequence, the quality ofan edit can only be measured subjectively through indirectuser evaluations. Therefore, to demonstrate the soundnessof our model, we have experimentally compared our method(O) to the original edit of the scene (Z) reproduced from Ze-meckis’ movie (which serves as a reference for comparisonwith expert cinematographers) and to three degraded ver-sions: a degraded version (Ds) where the content of shotsis not considered (i.e. the shot cost is removed), a degradedversion (Dp) where the enforcement of the specified cuttingrhythm is not considered (i.e. the rhythm cost is removed), adegraded version (Dc) where visual discontinuities are en-forced (i.e. the cut cost is reversed).

    We performed a subjective evaluation of our method bydesigning a perceptual user-study. Twenty-one participantsvolunteered for this experiment. They were 27.5 (± 5.7)years old (range: 20 to 42). They were naive with respect tothe purpose of the experiment. All had normal or corrected-to-normal vision. They gave written and informed consentand the study conformed to the declaration of Helsinki. Weprepared 5 stimuli (a fully edited version of 80 seconds permethod). Participants were asked to observe the video stim-uli while seated in front of a desk. After each stimulus view-ing, participants were asked to rank the global film-makingquality3 on a discrete scale ranging from 0 (very bad) to 10(very good). In total, they repeated this task 20 times (5×4repetitions). Stimuli were presented in a randomized order.The total duration of the experiment was about 30 minutes.

    We tested three hypotheses. H1: editing has an impact onthe perceived quality of the observed video stimulus; H2:each of the three terms in our cost function (shot content,continuity rules and cutting rhythm) has a positive impact onperceived quality; H3: the perceived quality of the versiondone by an expert cinematographer is significantly higherthan our method. The dependent variable in this study wasthe participants’ score given to each version. Figure 4 illus-

    3We additionally proposed a number of criteria that participantscould consider to score each version: the enhancement of charac-ters performance, the synchronization of cuts with the scene con-tent, the aesthetic of shots.

    trates the scores obtained for each version.Hypothesis H1 was confirmed using a non-parametric

    Friedman test (p < 0.05). Post-hoc comparisons summa-rized in Figure 4 confirm hypothesis H2 that the consider-ation of each of the three key aspects has a positive impacton subjective quality, but discard hypothesis H3 that the ver-sion done by an expert cinematographer is significantly bet-ter scored than the one generated by our system (though Ze-meckis’ version globally obtained better scores).

    To further illustrate and validate our method, we havealso generated two new versions of the scene with ASLsof resp. 2 seconds (fast cutting style) and 10 seconds (slowcutting style). The choice of shots is very different in thosedifferent styles. In fast cutting style, there is a preference forclose-ups and medium shots. In slow cutting style, there isa preference for medium long shots and full shots. For eval-uation purposes, we are making our experimental data (in-cluding rushes and their annotations) and our experimentalresults publicly available 4.

    Limitations and future workOur model is currently limited to the case of linear edit-ing, where the chronology of events is maintained. In futurework, we would like to remove this limitation by allowingtemporal ellipses and re-ordering of events. Another limita-tion is that we are restricted to a limited choice of cameras.Future work is needed to optimize over camera positions andframings. In addition, the proposed model only enables tocontrol the pacing. Other style parameters such as shot com-position (flat vs. deep staging), camera movements (staticshots, dolly shots, crane shots), transitions (reverse shots)and lighting preferences would favor user creativity. Ourmodel of shot selection is based on bounding boxes of thecharacter’s body parts and a primitive classification of theiractions. Objects and places in the scene, as well as charac-ter’s moods and intentions, should also play a part. Finally,we should note that the semi-Markov assumption has lim-itations of its own. Important film editing patterns such asbook-ending, separation or parallel action (Sharff 1982) can-not be taken into account by such a memory-less model. Theinvestigation of higher-order Markov models or context-freegrammars will be pursued to overcome such limitations.

    ConclusionIn this paper, we have presented a continuity-editing ap-proach to the automated creation of cinematographic se-quences for 3D animations. We have introduced the notionof editing graph and showed how dynamic programming canbe used to compute an optimal edit under a semi-Markov hy-pothesis. We have provided a thorough description of meansto rank shots and edits, and to measure the distance to aspecified cutting rhythm. Our solution is supported by sub-jective evaluations obtained in a perceptual user study. Theproposed approach performs a clear shift from existing tech-niques such as idiom-based representations, with a level ofexpressiveness not addressed by previous contributions. Fi-nally, this work provides the foundations to address novel

    4https://team.inria.fr/imagine/continuity-editing/

  • challenges in automated cinematography, such as learningand reproducing cinematic styles from real-movies.

    AcknowledgmentsThe research presented in this paper benefited from the assis-tance of many people. Laura Paiardini and Estelle Charleroycreated the assets and the animation for the example se-quence. Adela Barbulescu helped create the facial anima-tion. Anne-Hélène Olivier and Michael Gleicher gave pre-cious help on experimental design and evaluation of the userstudy. We also thank the volunteers who participated in theuser study.

    A preliminary version of this work was developed by thesecond author as part of the patented Text-to-Movie applica-tion by Xtranormal Technologies 5.

    This work has been funded by the French Agency for Re-search (ANR) through projects CHROME and CINECITTAand the European Research Council (ERC) through theproject EXPRESSIVE.

    AppendixWe here provide the formulas of our cost functions related tocontinuity-editing rules. We first introduce v(c), a weightingfactor defined as the minimum visible area of character c intwo consecutive frames. In details, it is computed as follows

    v(c) = min(V (c, i, t− 1), V (c, j, t))This factor is used to weight costs on each single character.We then give no importance to off-screen characters, littleimportance to background characters, and more importanceto foreground characters (since they are the focus of atten-tion).

    Jump cutsAn illustration of the avoidance of jump cuts is given in Fig-ure 5. We penalize a jump cut by summing, on each singlecharacter, the degree of similarity between the two framesbefore and after the cut. Practically, this penalty is computedas follows

    CTJ (i, j, t) =∑c

    v(c) · φJ (∆S(c),∆θ(c))

    where ∆S(c) and ∆θ(c) are the differences in resp. apparentsize and view angle of character c between the two frames.φJ is a non-linear function taking these two parameters asinput. It considers a minimum acceptable change in appar-ent size ∆Smin, as well as a minimum acceptable changein view angle θmin (often set to 30 degree). φJ then returnsthe maximum penalty when no change occurs neither in ap-parent size nor view angle of character c, and the penaltydecreases as the change in either apparent size or view angleincreases.

    Screen continuityAn illustration of the screen continuity rule is given in Fig-ure 6. We penalize such a discontinuity by summing, on each

    5Rémi Ronfard, automated cinematographic editing tool, Xtra-normal Technologies, May 2009.

    (a) Change in apparent size

    (b) Change in view angle

    (c) Insufficient change in both size and view angle

    Figure 5: Examples of cuts with sufficient change in size(top), sufficient change in view angle (middle), and an ex-ample of jump cut (bottom).

    (a) Screen continuity

    (b) Screen discontinuity

    Figure 6: Examples of cuts respecting (top) or violating (bot-tom) the screen continuity.

    single character, its screen position change. Practically, thispenalty is computed as follows

    CTS (i, j, t) =∑c

    v(c) · φS (P (c, j)− P (c, i))

    where P (c, i) and P (c, j) represent the 2D screen positionof character c resp. before and after the cut. φS is a non-linear function which takes as input the distance betweenboth positions. It then returns the minimum penalty (0) fortwo identical positions, and the penalty increases with theirdistance.

  • Motion continuityAn illustration of the motion continuity rule is given in Fig-ure 7. We penalize such a discontinuity by summing, oneach single character, its change of apparent motion direc-tion. Practically, this penalty is computed as follows

    CTM (i, j, t) =∑c

    v(c) · φM (M(c, i),M(c, j))

    where M(c, i) and M(c, j) are 2D vectors representing theon-screen motion direction of character c resp. before andafter the cut. φM is a non-linear function which takes as in-put these two consecutive motion directions. It then returnsthe minimum penalty (0) when the two vectors are closeenough (e.g. a character moving in a given direction keepsmoving in a similar direction after the cut), and the penaltyincreases as these vectors differ from each other.

    Gaze continuityAn illustration of the gaze continuity rule is given in Fig-ure 8. In a similar way to the motion continuity, we penal-ize such a discontinuity by summing, on each single char-acter, its change of apparent gaze direction. Practically, thispenalty is computed as follows

    CTG(i, j, t) =∑c

    v(c) · φG (G(c, i), G(c, j))

    where G(c, i) and G(c, j) are 2D vectors representing theon-screen gaze direction of character c resp. before and af-ter the cut. φG is a non-linear function which takes as in-put these two consecutive gaze directions. It then returns theminimum penalty (0) when the two vectors are close enough(e.g. a character looking in a given direction keeps lookingin a similar direction after the cut), and the penalty increasesas these vectors differ from each other.

    Left-to-right orderingAn illustration of the left-to-right continuity rule is given inFigure 9. We penalize such a discontinuity by summing, oneach pair of characters (c, c′), their change in relative on-screen position (from left to right, this is also known as the180 degree rule). To do so, we define a new weighting factorv(c, c′) computed as the product v(c) · v(c′) of the weightsof both characters. We then give no importance to a pair ofcharacters where at least one is off-screen either before orafter the cut, little importance to a pair of background char-acters, and much importance to a pair of foreground charac-ters. Practically, this penalty is computed as follows

    CTL (i, j, t) =∑c,c′

    v(c, c′) · φL (L(c, c′, i), L(c, c′, j))

    where L(c, c′, i) and L(c, c′, j) are two real values repre-senting the relative position of characters c and c′ resp. be-fore and after the cut (practically, this relative position iscomputed as the signed difference of their on-screen hor-izontal coordinates). φL is a non-linear function taking asinput these two reals. It then returns the minimum penalty(0) when both values are of same sign (i.e. the relative po-sition of characters is enforced) and the maximum penalty(1) when the two values are of opposite sign (i.e. the relativeposition of characters is reversed).

    (a) Motion continuity

    (b) Motion discontinuity

    Figure 7: Examples of cuts respecting (top) or violating (bot-tom) the motion continuity.

    (a) Gaze continuity

    (b) Gaze discontinuity

    Figure 8: Examples of cuts respecting (top) or violating (bot-tom) the gaze continuity.

    (a) Left-to-right ordering continuity

    (b) Left-to-right ordering discontinuity

    Figure 9: Examples of cuts respecting (top) or violating (bot-tom) the left-to-right ordering continuity (also known as 180degree rule).

  • ReferencesAdams, B.; Dorai, C.; and Venkatesh, S. 2002. Toward au-tomatic extraction of expressive elements from motion pic-tures: tempo. IEEE Transactions on Multimedia 4(4):472–481.Assa, J.; Wolf, L.; and Cohen-Or, D. 2010. The virtual di-rector: a correlation-based online viewing of human motion.Computer Graphics Forum 29(2):595–604.Bordwell, D. 1998. On the History of Film Style. HarvardUniversity Press.Christianson, D. B.; Anderson, S. E.; He, L.-W.; Weld, D. S.;Cohen, M. F.; and Salesin, D. H. 1996. Declarative cameracontrol for automatic cinematography. In AAAI, 148–155.Cutting, J. E.; DeLong, J. E.; and Nothelfer, C. E. 2010. At-tention and the Evolution of Hollywood Film. PsychologicalScience 21(3):432–439.Datta, R.; Hu, J.; and Ray, B. 2008. On efficient viterbidecoding for hidden semi-markov models. In 19th Interna-tional Conference on Pattern Recognition., 1–4.Davis, N.; Zook, A.; O’Neill, B.; Headrick, B.; Riedl, M.;Grosz, A.; and Nitsche, M. 2013. Creativity support fornovice digital filmmaking. In SIGCHI Conference on Hu-man Factors in Computing Systems, 651–660. ACM.DeLoura, M. 2009. Real Time Cameras, A Guide for GameDesigners and Developers. Morgan Kaufman.Dmytryk, E. 1984. On Film Editing: An Introduction to theArt of Film Construction. Focal Press.Drucker, S. M., and Zeltzer, D. 1995. Camdroid: A systemfor implementing intelligent camera control. In Symposiumon Interactive 3D Graphics, I3D ’95, 139–144. ACM.Elson, D. K., and Riedl, M. O. 2007. A lightweight intelli-gent virtual cinematography system for machinima genera-tion. In Artificial Intelligence and Interactive Digital Enter-tainment (AIIDE ’07).Hawkins, B. 2005. Real-Time Cinematography for Games.Charles River Media.He, L.-w.; Cohen, M. F.; and Salesin, D. H. 1996. The virtualcinematographer: a paradigm for automatic real-time cam-era control and directing. In SIGGRAPH, 217–224. ACM.Jhala, A., and Young, R. M. 2011. Intelligent machinimageneration for visual storytelling. In Artificial Intelligencefor Computer Games. Springer New York. 151–170.Kennedy, K., and Mercer, R. E. 2002. Planning animationcinematography and shot structure to communicate themeand mood. In Smart Graphics, 1–8. ACM.Limpert, E.; Stahel, W. A.; and Abbt, M. 2001. Log-normaldistributions across the sciences: Keys and clues. BioScience51(5):341–352.Lino, C.; Christie, M.; Lamarche, F.; Schofield, G.; andOlivier, P. 2010. A real-time cinematography system forinteractive 3d environments. In Symposium on ComputerAnimation, 139–148. ACM.Lino, C.; Ronfard, R.; Galvane, Q.; and Gleicher, M. 2014.How Do We Evaluate the Quality of Computational Editing

    Systems? In AAAI Workshop on Intelligent CinematographyAnd Editing.Markowitz, D.; Jr., J. T. K.; Shoulson, A.; and Badler, N. I.2011. Intelligent camera control using behavior trees. InMotion in Games (MIG), 156–167.Mitchell, C.; Harper, M.; and Jamieson, L. 1995. On thecomplexity of explicit duration hmm’s. IEEE Transactionson Speech and Audio Processing 3(3):213–217.Murch, W. 1986. In the blink of an eye. Silman-James Press.Murphy, K. P. 2002. Hidden semi-markov models. Techni-cal report, MIT AI Lab.Salt, B. 2009. Film Style and Technology: History and Anal-ysis (3 ed.). Starword.Sarawagi, S., and Cohen, W. W. 2004. Semi-markov condi-tional random fields for information extraction. In Advancesin Neural Information Processing Systems.Sharff, S. 1982. The elements of cinema. Towards a theoryof cinesthetic impact. Columbia University Press.Shi, Q.; Wang, L.; Cheng, L.; and Smola, A. 2008. Dis-criminative human action segmentation and recognition us-ing. semi-markov model. In IEEE Conference on ComputerVision and Pattern Recognition (CVPR).Smith, T. J. 2005. An Attentional Theory of Continuity Edit-ing. Ph.D. Dissertation, University of Edinburgh.Thompson, R., and Bowen, C. 2009. Grammar of the Edit.Focal Press.Tomlinson, B.; Blumberg, B.; and Nain, D. 2000. Expressiveautonomous cinematography for interactive virtual environ-ments. In International Conference on Autonomous Agents,AGENTS ’00, 317–324. ACM.Truffaut, F., and Scott, H. G. 1967. Truffaut/Hitchcock. Si-mon & Schuster.Yu, S.-Z. 2010. Hidden semi-markov models. ArtificialIntelligence 174(2):215 – 243.Zen, H.; Tokuda, K.; Masuko, T.; Kobayasih, T.; and Kita-mura, T. 2007. A hidden semi-markov model-based speechsynthesis system. IEICE - Trans. Inf. Syst. E90-D(5):825–834.