Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Aperture Cutscene Editor [RELEASED]

Discussion in 'Assets and Asset Store' started by CorruptScanline, Feb 14, 2012.

  1. TouchSoft

    TouchSoft

    Joined:
    Oct 18, 2008
    Posts:
    218
    That did the trick... thanks.
     
  2. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    Version 1.11 is now available on the asset store. Heres the changes:
    Compiled dll for core classes.
    Fixed build errors on mobile build target.
    Added ability to reorder curve clips.
    Added per curve clip animation override for PlayAnimation action.

    Unfortunately there seems to be a problem when installing this version which causes the component references to break in scenes made with previous versions. To fix these problems you have to reassign the correct component into the missing component fields that show up as warnings in the console. Im pretty sure this is because the the classes exist in a different assembly now and unity doesnt try to relink them outside of their original assembly.

    If you have a scene with a lot of complicated curves it could be quite annoying to fix all the references on the curve points. I made this script to automatically fix these references. Just drag the script onto the curve object and it should replace all the curve points and fix their references. Then just remove the component.

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections.Generic;
    4.  
    5. [ExecuteInEditMode()]
    6. public class CurvePointAssign:MonoBehaviour {
    7.     void Start() {
    8.         if (gameObject.GetComponent<Curve>() == null) {
    9.             Debug.LogWarning("This is not a curve. Be sure there is a curve valid component applied to this object.");
    10.             return;
    11.         }
    12.         int ti = 0;
    13.         List<Transform> points = new List<Transform>();
    14.         List<Transform> newPoints = new List<Transform>();
    15.         foreach (Transform t in transform) {
    16.             //Debug.Log(t.gameObject.name);
    17.             points.Add(t);
    18.             Transform newPoint = new GameObject("Point"+(ti+1)).transform;
    19.             newPoint.gameObject.AddComponent<CurvePoint>();
    20.             newPoint.position = t.position;
    21.             newPoints.Add(newPoint);
    22.             ti++;
    23.         }
    24.         for (int i = 0; i < points.Count; i++) {
    25.             DestroyImmediate(points[i].gameObject);
    26.         }
    27.         for (int i = 0; i < newPoints.Count; i++) {
    28.             newPoints[i].parent = transform;
    29.         }
    30.        
    31.     }
    32. }
    33.  
    34.  
     
    Last edited: Mar 1, 2012
  3. Bocaj

    Bocaj

    Joined:
    Nov 2, 2011
    Posts:
    3
    Any chance this will be ported to C#? Or has anyone been attempting this? That would be awesome.
     
  4. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    Bocaj I was thinking of porting the Action and Event classes to C# But really there isnt much reason to do that because JS is compiled before C# and you can always write your own custom Actions and Events in C#.
     
  5. buffonomics

    buffonomics

    Joined:
    Jun 10, 2009
    Posts:
    59
    I seriously need to see an example of "Cutscene character" in use.
    It's not straightforward.
     
  6. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    Yeah the Cutscene Character component wasnt really finished. I have included a screenshot that shows how it should be setup. It requires Capsule Collider, Rigidbody, and Animation components to work.

    Note that this is meant for really quick character walking and running animations, not for advanced animations. For advanced high quality animations the best thing to do is do the animation in a modeling/animation program like 3ds max, maya or blender and play the animation using the Play Animation action in aperture. Also note that the Cutscene Character only has an effect when the game is actually playing so you wont be able to see the characters movement while scrubbing or previewing the animation.

    "Start Destination Point" should point to a Transform of where you want the character to move to. The character will either walk or run there based on the "Run Distance Threshold" settings. The "Idle/Walk/Run Animation Name" fields are the names of the animations in the Animation component to play when idling, walking and running. The "Walk/Run Speed" fields are how fast to run and walk. The "Walk/Run Anim Speed" fields are how fast to play the animations (to sync up foot movement with actual run/walk speed). "Stop Speed" is how fast the character slows down. "Step Height" is how big of a step the character can walk up. "Start Destination Look At" is a transform for where the character should face, None means look in the direction of movement.

    To move the player around you should animate the "Start Destination Point" somehow. The best way is probably with a Follow Curve Action.

     
    Last edited: Mar 23, 2012
  7. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,802
    Cutscene character sounds very interesting, would this allow any object to follow the curve? let say a flying bird and not a camera?
     
  8. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    You can have any object follow a curve in the same way you can have a camera follow a curve. The Cutscene Character is just a simple way control your already animated game characters using their game animations instead of having to animate them fully in a 3d modeling program.
     
  9. buffonomics

    buffonomics

    Joined:
    Jun 10, 2009
    Posts:
    59
    Got any tips for "de-taching" an object from the cutscene when going back to gameplay?
     
  10. buffonomics

    buffonomics

    Joined:
    Jun 10, 2009
    Posts:
    59
    How do I create new event functions in C#?
     
  11. SupremeM

    SupremeM

    Joined:
    Apr 11, 2012
    Posts:
    1
    Hi KurtLoeffler, I saw a new update in the market. What is the changes from ver 1.11. to 1.13?
    Thank you for creating the editor :p
     
  12. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    What exactly do you mean by this? do you mean like detatching a camera from a Follow Curve action? to be used as a game camera? If you disable the Follow Curve component then it will only follow the curve while a cutscene is playing and the current time is over a curve clip that is setting the position on the curve. I dont suggest doing this though.

    I would suggest setting up a special cutscene camera and disabling the camera component on it, then in the cutscene create a curve clip that spans the entire cutscene and click "Ignore Target", or if it has a target set its Update Mode to "Disable". Then in the curve clips properties there is an "Active Camera" field where you can drag your cutscene camera. What this will do is make the cutscene camera the primary camera only while the cutscenes current time is over that curve clip (in this case the entire length of the cutscene) and switch back to your game camera when its done. Note that the "depth" variable on your game camera should be something between -10 and 10.

    Heres a conversion of the SpawnObject event into C#
    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. [AddComponentMenu("Cutscene/Events/Spawn Object CS")]
    4.  
    5. [CutsceneEventOverrideNameAttribute("Spawn Object CS")]
    6.  
    7. public class Event_SpawnObjectCS : MonoBehaviour {
    8.     public GameObject targetObject;
    9.     public bool spawnOnStart = false;
    10.    
    11.     [CutsceneEventExclude()]
    12.     public void Start() {
    13.         if (spawnOnStart) {
    14.             Spawn();
    15.         }
    16.     }
    17.  
    18.     public void Spawn() {
    19.         Instantiate(targetObject,transform.position,transform.rotation);
    20.     }
    21.     public void Spawn(GameObject overrideObject) {
    22.         Instantiate(overrideObject,transform.position,transform.rotation);
    23.     }
    24. }
    25.  
    The main differences are just bug fixes.
     
    Last edited: Apr 19, 2012
  13. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    447
    Hi,

    I'm trying to smoothen out the speed in which an animated animal is moving along a path.

    Currently, with the built in settings, on a 5 minute animation, the animal moves very very slowly (along the curve) for quite a while at the beginning, then picks up speed, and then ends up going much faster than i want.
    What I'm looking for is pretty much an even speed throughout the 5 minutes.

    I've got a curve clip selected in Events.
    I click on 'Edit Curve' to the right which pops up the curve (green with grey background).
    I see 4 grey boxes at the bottom with small versions of the curve.
    I can select any of those boxes, and the curve look changes dramatically.

    Frankly, I don't know what the values mean in these various curves or how i should approach this.

    Is their a FAQ or wiki for core info on how i should approach changing this curve to have more control, and to get the desired result i mentioned at the beginning?

    Thanks!
     
  14. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    The default curve has an ease in and ease out, which is why your animation is playing slow at the beginning, then faster in the middle. If you want a constant movement speed you will have to make the curve linear. To do that click on Edit Curve like you did, and then right click on both of the end points and click "Auto":


    After doing that on both curve points you should have a curve that looks like this:


    This will result in the object moving along the curve at a constant speed. Note that if you change the length of the curve clip or the value of the keys of the curve clip you may need to do this again.

    The way curve clips work is at each point in the timeline a curve clip is sampled and a resulting number is calculated. This number is what Actions (such as FollowCurve) use to do stuff. When looking at the curve, the X axis (horizontal) is mapped to time, and the Y axis (vertical) is mapped to the resulting value. So if the curve is a straight line slope the resulting value will get larger at a constant speed as the cutscene plays.
     
  15. sgtyqian

    sgtyqian

    Joined:
    Apr 19, 2012
    Posts:
    1
  16. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    447
    Thanks for the curve info, Kurt.
    I followed your instructions and things are looking much better now.

    Based on either easing in/out, or at a constant, I'm discovering that the distance between the points has an effect on speed. E.g. say i've got a 3 point curve. From point 1 to point 2 is 10 'feet'. From point 2 to point 3, is 100 feet. from what i'm seeing, the animation moves more slowly between point 1 and 2, and then goes faster from point 2, to point 3. This makes sense and has some smart uses.

    That said, say i'm making an animation path using Aperture in Unity, and i create a meandering and wandering path that has 50 points. In the process of making this path, say, i've not been paying close attention to the distance between the points and in fact, what i want is a constant speed throughout the 50 points. Is there a built in tool/function that will re position the points automatically, so the distance between them is equal, or close to it? Or is the only way to do this, by manually moving the points?

    thanks.
     
  17. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    sgtyqian, I can access it. Maybe it was a temporary problem?

    shwa, Yeah the way the curve interpolation works it will cause motion across large spans to go "faster" than smaller spans. You could try to compensate for that with adding more curve clip points, but the easiest thing to do is try to keep a consistent distance between curve points. Note that you can insert points by duplicating points within a curve, so if you have a curve with 3 points and you want to insert a point after the second point you can select the second point and press ctrl+D(in windows), and move the new point to where you want it.
     
  18. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    447
    Tx for the info, Kurt.
    Does that sense of "faster" (across larger spans) apply to x,y,z space evenly?
    Hmm, this is not a simple question to ask.
    Most of my animations are along x z space.
    When dealing with big movements up or down in y space, does the same sensibility apply?
     
  19. ofktoubro

    ofktoubro

    Joined:
    Apr 25, 2012
    Posts:
    1
    I am using aperture cutscene editor with 2dtoolkit to make cartoon-like animations.
    It is working smoothly but I have found that I can not modify alpha via the cutsceneeditor on the custom shaders that come with the 2dtoolkit :/

    I have asked for help on the 2dtoolkit forum and this is the gist of the answer i got:
    Can you advice on a good approach on how to do that?
     
  20. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    Yes it is basically based on the distance between points, so it is effected by x y and z.

    It sounds like the tk2dSprite component they have does something special when its color property is set. Heres an action that should do what you want I think but its untested. Also Im not sure of the exact class name of the tk2dSprite component he mentions so that class name probably needs to be changed in here:
    Code (csharp):
    1.  
    2. #pragma strict
    3.  
    4. @script AddComponentMenu("Cutscene/Actions/Set Color 2DTK")
    5.  
    6. @script ExecuteInEditMode()
    7.  
    8. @CutsceneEventOverrideNameAttribute("Set Color 2DTK")
    9.  
    10. class Action_SetColor2DTK extends CutsceneAction {
    11.     var sprite:TK2DSprite;
    12.    
    13.     @CutsceneActionAttribute("Set Channel R")
    14.     function SetChannelR(value:float) {
    15.         if (sprite == null) return;
    16.         var c:Color = sprite.color;
    17.         c.r = value;
    18.         sprite.color = c;
    19.     }
    20.    
    21.     @CutsceneActionAttribute("Set Channel G")
    22.     function SetChannelG(value:float) {
    23.         if (sprite == null) return;
    24.         var c:Color = sprite.color;
    25.         c.g = value;
    26.         sprite.color = c;
    27.     }
    28.    
    29.     @CutsceneActionAttribute("Set Channel B")
    30.     function SetChannelB(value:float) {
    31.         if (sprite == null) return;
    32.         var c:Color = sprite.color;
    33.         c.b = value;
    34.         sprite.color = c;
    35.     }
    36.    
    37.     @CutsceneActionAttribute("Set Channel A")
    38.     function SetChannelA(value:float) {
    39.         if (sprite == null) return;
    40.         var c:Color = sprite.color;
    41.         c.a = value;
    42.         sprite.color = c;
    43.     }
    44.    
    45. }
    46.  
    47.  
     
  21. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    447
    *Btw, if you are reading this thread and haven't bought Aperture, yet, i'd highly recommend it. The more i use it, the more i really like it.

    Cutscene Character:

    Not sure if Aperture is the best/easiest tool for doing the following:
    I'm a newbie at all this.

    I want to be able to sequence different animations on a character.
    Multiple animations are already built into the character, and i'm trying to figure out how to call them.
    I have the numeric value ranges for each animation.
    At this stage, i don't need to move the character between different points.

    e.g.
    The player walks up to a character, and triggers the following by getting close to that character:
    I want the character to:
    Yawn.
    Then, idle for x amount of time.
    Then, does a different animation, like take a drink.
    Then, idle.
    Then, yawns again.

    Should i do this in Aperture, or is there an easier way?

    (I don't use Maya/etc, so would like to do this in unity.)
    If there's a good faq or tutorial on this, please post the link.

    Thanks!
     
    Last edited: Apr 29, 2012
  22. liverolA

    liverolA

    Joined:
    Feb 10, 2009
    Posts:
    347
    I jiust paid for this, and found that there is only js Version,could you guys tell me why use JS? is there a c# version?
     
  23. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    liverol, there shouldnt be any reason to need a C# version. JS is compiled before C#, and the core classes are in a DLL so they should even be able to be accessed in C# from a precompile directory like Plugins.


    Shwa, From what I understand you have an NPC character which consists of just a rigged mesh with animations?

    Im not sure if you have done this part yet, but to split the animation into different animation clips you use unitys model importer dialog to specify the animation range and name:


    Once you have applied those settings you should see them under the asset in the project window:


    These are the assets you will use to play the different animations.

    There are two methods to play animations with Aperture, using Actions, or using Events.

    Action Method:
    1. Add a "Play Animation" Action found in Components>Cutscene>Actions>Play Animation. This should be applied to the object that has the Animation component on it. Uncheck "Play Automatically" on the Animation component:


    There seems to be a bug in the last version that requires you to put an animation clip in the "Animation To Play" property of this component, even though we will be using Override Animations in the next step, So just add any animation clip from the ones created in the previous step.

    2. Now in the cutscene editor create a new curve clip and set the target to the object with the Play Animation component applied, and set the length to the length of the desired animation clip. Then set Update Action to "Set Anim Time" and near the bottom under Action Properties there should be a "Override Animation" property. Set that to whatever animation you want to play. Now if you scrub through the cutscene the animation should play.

    Set the end value of the curve clip to the length of the animation clip (The same value you set the length of the curve clip to be). This means that at the beginning the value is at 0, and at the end the value is at the end of the animation:


    3. You should also make the curve clip linear by clicking on "Edit Curve" and selecting each curve point, rightclick and select "Auto". The resulting curve should look like this:


    This insures that the animation timing is exactly as it is meant to be.

    4. To play multiple clips back to back just repeat the last 2 steps for the rest of the animations:



    Event Method (Useful if you want automatic animation blending):
    1. On your object with the Animation component add your new animations into the "Animations" list and uncheck "Play Automatically".


    2. In the cutscene editor add a new event and set the events target to your object. Set the Component dropdown to "Animation", the Function dropdown to "Play" or "CrossFade" if you want a fade, and the Variation dropdown to "animation" or "animation,crossfade" if using CrossFade.

    3. Set the "animation" field to the name of one of your animations added in step 1, and "crossfade" to the desired blend time if applicable.

    4. Do this for the rest of the animations you want to play, positioning the events along the timeline as desired. Note that because these are events you wont be able to preview them. You have to press the play button to see them.
     
    Last edited: May 5, 2012
  24. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    447
    Hi Kurt,
    Thanks for this animation post.
    I'm using Aperture version that needed the hotfix01_1.1
    I'm following your instructions as per the action method.

    I've set Update Action to "Set Anim Time" but i don't see this:

    "near the bottom under Action Properties there should be a "Override Animation" property."

    As well, i don't see Action Properties.

    Any idea of what I may have done wrong?

    In the meantime, i'll try your 'Event Method'.

    thanks!
     
  25. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    The Override Animation was added later so its not in the version you are using. You should update to the latest version. I think upgrading from pre 1.11 versions will cause all of the aperture components to have broken references in scenes. This wont happen again when updating to newer versions after 1.11. To fix these you just need to drag the script or class name from the aperture dll in the project tab over the "Missing" field on the components in the inspector. I also created a script to quickly fix the curve points. You can see more info about this in this post:
    http://forum.unity3d.com/threads/123270-Aperture-Cutscene-Editor-RELEASED?p=846230&viewfull=1#post846230
     
  26. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    447
    I am guessing the Override Animation function is required to do this using the Action Method.
    Can't update right now, too many working pieces at play, and tight deadline.

    * I am getting things to work with the Event Method, though just roughing things out right now.
    It really is very useful and breaks open more creativity. !
     
  27. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    135
    Hi Kurt,

    Aperture is one of the asset i import in every project i do, love it. I use it very basically ( mainly for sequencing camera and some object animation).
    What about the "more complex gameplay oriented tutorial covering advanced animations and Events" you talk on the first thread?
     
  28. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    shwa, You can do this: create a new project, download and install the latest version in that project, grab these files from that project and move them into your current project in the same folders overwriting if needed:
    ApertureCutsceneEditor/Components/Actions/Action_PlayAnimation.js
    ApertureCutsceneEditor/Components/Actions/Editor/Action_PlayAnimation_Editor.js

    After doing this you should see the Override Animation field in the curve clip inspector.

    sipon, a tutorial for that would involve just going over using triggers to do stuff like opening doors or triggering scripted explosions and stuff. Also maybe also covering use with a visual scripting system like uscript or playmaker. Heres the basics of how to to start a cutscene from uscript, and how to start a uscript graph from a cutscene:

    Start cutscene from uscript:
    This is a bit hacky because I couldnt get uScripts event sender node to work so I had to use UnityEngine.Component.BoadcastMessage to sent the "Play" event to the Aperture cutscene. You can create this node in uscript under Reflected()>Actions>UnityEngine.Component>BroadcastMessage>Broadcastmessage([in]methodName).



    Run uScript graph from a cutscene event:
    Unfortunately this is also pretty hacky. First put your uScript graph on an empty gameobject and disable the gameobject with the checkbox a the top of the inspector. Add a "Set Object Active State" aperture action on this object. In your cutscene create an event, set its target to this disabled gameobject and the set the component to "Set Object Active State" and check the "state" checkbox at the bottom. This will enable the gameobject when the event is triggered.


    In your uscript graph add a "uScript Events" node and use the "On Graph Start" output to trigger the rest of your graph.
     
  29. Nick4T2

    Nick4T2

    Joined:
    Dec 9, 2011
    Posts:
    11
    Hi Kurt, recently purchased this on the Asset Store and really impressive stuff. Big thanks!
     
    Last edited: Jun 1, 2012
  30. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,802
    how do I duplicate a curve clip?
     
  31. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,802
    How do I select multiple curve clips and move them all at once?
     
  32. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,802
    How do I stop a cutscene from a script?
    Thanks
     
  33. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    Currently there is not built in way to duplicate a curve clip or event, or select multiple curve clips to manipulate them at the same time. To stop a cutscene through script there is the Cutscene.Stop() function. This should pause the cutscene if the cutscene does not have its "rewind when stopped" value enabled, otherwise it should return to the beginning of the cutscene and stop playing.
     
  34. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,802
    I think I managed to make a playmaker action for stop, It seems to work, perhaps someone could confirm I did not make any mistakes? Thanks

    StopApertureCutscene.cs

    Code (csharp):
    1. using UnityEngine;
    2.  
    3. namespace HutongGames.PlayMaker.Actions
    4. {
    5.     [ActionCategory(ActionCategory.Animation)]
    6.     [Tooltip("Stops an Aperture Cutscene on a Game Object.")]
    7.     public class StopApertureCutscene : FsmStateAction
    8.     {
    9.         [RequiredField]
    10.         [CheckForComponent(typeof(Cutscene))]
    11.         [Tooltip("Game Object which has a cutscene.")]
    12.         public FsmOwnerDefault gameObject;
    13.  
    14.         public override void Reset()
    15.         {
    16.             gameObject = null;
    17.         }
    18.  
    19.         public override void OnEnter()
    20.         {
    21.             var go = Fsm.GetOwnerDefaultTarget(gameObject);
    22.             if (go != null)
    23.             {
    24.                 Cutscene thecutscene = go.GetComponent<Cutscene>();
    25.                  if (thecutscene !=null)
    26.                 {
    27.                     thecutscene.Stop();
    28.                 }
    29.             }
    30.            
    31.             Finish();
    32.         }
    33.     }
    34. }
     
  35. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,802
    Now I just need a way to switch back form the cutscene camera to my main camera, and I try to set the tag but this seems not enough, I think I need a way to disable to aperture cutscene to switch to my other camera because at the moment it does not get activated.


    just to be more clear, I want to cutscene to stop on user input when clicking on the screen and switch to main cam, now I get and error that no main cam has been defined.
     
    Last edited: Jul 15, 2012
  36. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,802
    Do you think it's possible to add Copy Paste functionality to the curve clips? I could really use this in my cutscenes.
     
  37. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    447
    Not sure if this is helpful, but you can duplicate the curve clips.
     
  38. Mars91

    Mars91

    Joined:
    Mar 6, 2012
    Posts:
    425
    Does it works with Non Pro Unity?
     
  39. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    FootprintGames, yes it does.
     
  40. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    520
    hi kurt
    i just bought aperture cutscene, i m very happy so far, i find out that having a curve track + action componant for each axis is painfull when i just want to make an animation between point A to point B. is there a simplier way around this? i dont want to use curve for that. idially i would like to place my object and press a key to save my position or rotation.also is there a way to have control noise movement on the trackview?

    thank u
     
  41. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    520
    also i made a quick test with a character animation, i manage to play two animation one after each other, but they snap even tho i put the blending at 1.
    any solution around that?

    regards
     
  42. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    520
    nevermind i just find my answer just use event for blending and using curve are not so difficult, would be nice if we could get some noise movement into the camera or shaky cam in future update, and maybe more transition type.
    looking forward the next update
     
  43. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    520
    hello
    anybody could help me to play a specific sequence threw my script, i m still new and i can t find a way to call that fonction.
    i would very appreciate any help.
     
  44. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,370
    Hi Kurt,

    I'm doing performance work on my title at the moment and the Aperture 'Curve.Update' is showing up surprisingly highly in the list (eating ~0.14ms/frame). Looking at Curve.js, to be honest it looks like a bit of a trainwreck...

    What's it trying to do, exactly? Just set the names of the child transforms in sequential order?

    Can I safely set the curve's 'enabled' property to false in Awake(), so that it stops doing this during runtime?
     
  45. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    To play a cutscene from a script you need to have a reference to the cutscene accessible in the script, for instance a public class field. Then you just call the Play() function on that reference. something like this in c#:

    Code (csharp):
    1.  
    2. //inside class scope
    3. public Cutscene cutsceneToPlay;
    4.  
    5. void Update() {
    6.     if (conditionMet  cutsceneToPlay != null) {
    7.         cutsceneToPlay.Play();
    8.     }
    9. }
    10.  
    There is also a static function Cutscene.Find("NameOfCutscene"); which returns a reference to a cutscene if it exist.

    I thought I had this stuff not being called at runtime, but it seems it is. It is for handling new transform additions (like when you duplicate a point) and putting them in a sorted list. This stuff doesnt need to be done at runtime unless you want to add points so you should be able to disable the component on start like this:
    Code (csharp):
    1.  
    2. function Start() {
    3.     if (Application.isPlaying) {
    4.         this.enabled = false;
    5.     }
    6. }
    7.  
     
  46. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    95
    So all of the characters in my game are being dynamically added to the scene as prefabs at runtime.

    Trying to figure out how I would use Aperature with this kind of a setup.

    The typical game loop is like so:

    1) spawn objects (characters) into the scene (all assets are loaded into asset bundles, the 'level' itself is also an asset bundle that has been downloaded separately)
    2) play cutscene with the dynamically loaded objects via aperature
    3) cutscene complete, do main gameplay loop

    Not sure how we would do #2 in our game, both from the initial 'cutscene' design side of things (since the objects aren't actually present in the scene in the first place) and also from the runtime side - ie how do we tell aperature which objects to animate in the cutscene, and how do we tell each object that they are a part of the cutscene.

    Any tips / tricks that everyone has discovered are greatly appreciated.

    Thanx in advance,
    Mike W
     
  47. Questifer

    Questifer

    Joined:
    Nov 2, 2012
    Posts:
    1
    My top wish list item for Aperture - it would make my workflow so much easier if there was a way to group select curves and events and edit/drag them. I tend to use it for cinematics and it can be a pain if I want to change an early shot in the sequence as I have to manually adjust the curves and events of subsequent shots to match. I suppose I could get round this by having each individual shot as its own seperate cutscene, but I really prefer to have an overview of the cinematic as a whole... has anyone else encountered similar issues and have any tips or tricks to make editing long sequences easier?

    Anyway, looking forward to the next update, hope its soon! :)
     
  48. TwisterK

    TwisterK

    Joined:
    Oct 26, 2010
    Posts:
    110
    Is it possible to pause the cutscene and then resume the cutscene once the player press the unpause button?

    --TwisterK
     
  49. marsking

    marsking

    Joined:
    Jun 7, 2011
    Posts:
    13
    Does it works with Unity 4.0?? Has any update for 4.0?
     
  50. CorruptScanline

    CorruptScanline

    Joined:
    Mar 26, 2009
    Posts:
    217
    Im not very familiar with the asset bundle system, but you should be able to put the cutscene in a prefab (or into the character prefab) and then spawn the cutscene along with the character. I havent actually tried saving a cutscene into a prefab, but it should be possible as long as all of its referenced gameobjects are also within the prefab.

    If you want to create the cutscene outside of the character asset bundle, then you would have to create some code that relinks the character references(s) within the cutscenes curve and event classes before playing. I dont think doing this should be too much work.

    Thanks for the feedback. I think having multiple selections would be a good way of implementing this. Draggable groups would be cool too.

    Yes, if you make the cutscene not not reset on stop (in the options menu for the cutscene) and then call Cutscene.Stop() and then Cutscene.Play() it should start playing from where it stopped previously.

    Yes it should work. I tested in a beta version of unity 4 and it worked, although there are a couple warnings about deprecated api.
     
unityunity