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

Pegasus - no fuss cutscene and flythrough generator

Discussion in 'Assets and Asset Store' started by AdamGoodrich, Aug 30, 2016.

  1. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    479
    Adam,

    I am missing the pegasus animator script as shown in your video.

    Can you let me know where to download it?

    Thanks!
    David
     
  2. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,682
    Grab the latest version.
     
  3. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    479
    Thanks Adam!

    I just got the email this morning that an update was here. Sorry for jumping the gun.

    Keep up the great work, I really love the new version and looking forward to trying out the character control.

    David
     
    AdamGoodrich likes this.
  4. docsavage

    docsavage

    Joined:
    Jun 20, 2014
    Posts:
    998
    Hi everyone,

    If anyone is interested I added a feature to pegasus I needed and thought was useful. Where the new global speed button changes the speed of all points of interest to the value input this mod just multiplys the speed of each point of interest. So if you have a path with changes in speed but you want to change the overall path time you can slow it/speed it while still respecting the change in speed along the path.

    It basically reuses Adams own code in pegasus with a few changes.

    NOTE - USE AT YOUR OWN RISK! It's been totally stable for me but if it breaks anything of yours I won't be held responsible. Thanks

    It takes about 5 minutes to implement If you know what you doing :)
     

    Attached Files:

  5. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    479
    I am trying to get the animator to work, and followed the steps in the tutorial video.

    However, when I try to add the animator controller, it will not allow a drag and drop and when I click to select, it shows nothing to choose.
    Any help is appreciated.

    Is anyone else having this issue?
     
  6. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    479
    Found the problem. It was pointed out to me that I had added the wrong component. I had ‘animation’ instead of ‘animator.’
    Corrected it and it all works.
    Unity can be humbling.
     
  7. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,682
    FREEBIES!!!



    We have made the custom Blacksmith environment, and the GeNa spawners demonstrated in this video available in our freebies channel on discord.

    One of the things we did with the Blacksmith environment was to re-configure it to use the Unity Standard shader, and that means that it will now be usable with the Unity 2018 LW & HD SRP pipelines!

    Jump into Discord, say g'day on your way through, and grab a copy of it from our freebies channel! https://discord.gg/rtKn8rw
     
  8. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,682
    Also, check this video out, it contains a demonstration of the current version of Pegasus. The first thing we do is create a flythough, but then I demonstrate the new formation capabilities we added to the latest version!

     
    BackwoodsGaming, docsavage and S4G4N like this.
  9. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,682
    SALE SALE SALE!!!

    All Procedural Worlds Assets Are on Sale - Including our recent SECTR acquisition!!

    Plus - to sweeten the deal - we also have a stellar bunch of updates!!

    Gaia v1.8.0 update is live:
    • Added Mac 16 bit raw import
    • Added 8 bit raw file import
    • U2018 related fixes due to changed API's related to spawning prefabs
    • Turned off automatic lightmap baking when creating news scenes
    • Improvement to bounds based collision checking
    • Added Terrain Utilities to Main menu to highlight it
    • Reorganised More menus to make them more understandable
    • Minor usability tweaks
    GeNa 2.0 Upgrade is live ($20 for purchases > 90 days ago, free otherwise):
    • Paintbrush painting mode
    • New layer based spawning system & improvements
    • Vastly improved bounds based collision checking
    • Vastly improved rotation algorithm when doing fences
    • New Min and Max spawn height capability & visualizations
    • Height offset modification for collisions
    • Seamless support for SECTR
    • Preliminary Vegetation Studio support
    • Improved help system
    • Fully 2018.x compatible
    • Better defaults.
    CTS 1.8 update is live:
    • New material & shader caching system
    • Use of material enable materials shared between terrains
    • New cached shader id system to speed up updates
    • Better registration / deregistration system for multitile
    • Component menu workarounds : CTS moved to GameObject menu
    • Terrain now world space instead of vertex space (prelude to mesh blending)
    • Improved terrain normals generation
    • Moves shaders from Resources to Shaders directory to stop excessive compile times . Reorganised texture and profile directories
    • Latest shader updates / amplify bug fixes
    SECTR will be updated in next few days (currently in test)
    • Seamless support for Gaia terrains
    • Seamless support for CTS
    • New suite of Video Tutorials
    With all this new coolness, a bunch of new video tutorials will also come out later this week...

    HUMBLE BUNDLE SALE

    If you haven't already heard about it then do yourself a favor and check out the amazing Humble Bundle Sale! $15 gets you a bunch of cool games, a set of game dev courses valued at $600, and a whole bunch of premium unity assets.
     
    Last edited: Sep 6, 2018
  10. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,375
    whats Sectr?
     
  11. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,375
    Do you plan a path or road addon for gaia?
     
  12. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,682
    A suite of tools to help you scale your games - audio streaming - culling - and terrain streaming - can make a massive difference to performance.

    In a couple of days we will be releasing a new product called Path Painter!
     
    BackwoodsGaming likes this.
  13. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,682
    Hey everyone - we are super pleased to release Path Painter!!!

    It's a system that makes it super easy to paint Paths, Roads, Ramps & River Beds into Unity Terrains. Tutorials will come in the next few days.

     
    dsilverthorn and BackwoodsGaming like this.
  14. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,682
    Hey everyone, in more very cool news we are super excited to announce that @Shawn67 has just joined the Procedural Worlds team as our Community Manager!

    Shawn as been with us since the early days of the first Gaia beta, and makes a terrific addition to our team. In addition to helping everyone get the best out of our suite of tools, he is also bringing his Gaia stamp packs over and you will soon see his existing packs and his new packs joining the Procedural Worlds asset collection.

    Please come on over to our Discord server and make him feel welcome! With over 1000 people already there it's hugely active, and is a positive environment where you can learn from your peers, get help, share your work, or just make friends and have a chat!
     
  15. dustout

    dustout

    Joined:
    Oct 9, 2012
    Posts:
    6
    Am loving pegasus so far, but have run into a problem and can't seem to find a solution.

    For some reason my characters are running around the formation

    Running.gif

    Changing the Deviation rate and Max deviation y seems to fix it, but then my character looks like they are walking while laying down

    Deviation Fix.png
     
  16. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,682
    Hehe... yeah .. this is an interesting thing... just increase the turn and movement change.... whats happening is that they rate of change is greater that the rate of change of the character... so its always trying to catch up.
     
    S4G4N and BackwoodsGaming like this.
  17. dustout

    dustout

    Joined:
    Oct 9, 2012
    Posts:
    6
    I set the turn and movement changes to the max value 3 and the character just runs around the target faster

    Circles.gif


    I have also included screenshots of the manager, formation, and character non running settings in case they would be useful
     

    Attached Files:

  18. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,205
    Do you also have a character controller component on the character prefab? I haven't had a chance to play around with the GeNa squad movement type stuff but from the looks of those screenshots, it looks like Pegasus is expecting to do all of that. So I'm guessing if you have the components to animate and run a character without Pegasus also on the character that the values here on the Pegasus walk/run speeds may be getting added to those of the character controller on the character gameobject.
     
  19. dustout

    dustout

    Joined:
    Oct 9, 2012
    Posts:
    6
    Sorry, that part got cut off when I was taking my screenshot. Yes I am using the PegasusAnimatorController on the character prefab.

    There are only Pegasus scripts attached to this object, so nothing else should be telling it to move.
     

    Attached Files:

  20. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    573
    Ahhh that Path Painter flythrough looks pretty nice, much less jitter/more smoother follow compared to the earlier videos.
     
    Last edited: Dec 3, 2018
    PWPeter likes this.
  21. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    512
    Hello dustout,

    just wanted to check if this issue still exists for you. Shawn has been sick for longer than expected which is why he was not able to answer you in time. I just joined the Procedural Worlds Team as Support Manager, if you still experience this problem, I would try to replicate your setup to get that resolved for you ASAP.
     
  22. CF-Games

    CF-Games

    Joined:
    Jun 2, 2013
    Posts:
    131
    Hello,

    Is it possible to create multiple Pegasuses and then have hotkeys assigned to play each one? I want to create multiple flythroughs of my scene and then export a build to give to the person who will be doing the video editing to capture video and we need the ability to be able to play each Pegasus manually at runtime. I wasn't able to find instructions on how to do this.
     
  23. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    512
    It should work in general, but you would need to create a small script for this that reads in the keys and switches cameras / pegasus instances accordingly. I could create such a script for you, I just would need a couple of days until I can manage to squeeze it in somewhere inbetween.
    If you already have a certain sequence in mind that needs to be recorded and you are the person that sets up the pegasus flight path already, you could also think about making one controlled sequence using the unity timeline for the build. In other words: Instead of creating a build where the other person has to record single parts of the flythroughs manually by switching through the pegasus paths and cut them together you could create one timeline sequence where the switching takes part on the unity timeline, so the recording person would only need to record the playback of the build.
     
  24. CF-Games

    CF-Games

    Joined:
    Jun 2, 2013
    Posts:
    131
    I was actually thinking of maybe chaining pegasus instead of using the timeline as it seems a lot simpler, but is there a way to add a delay before the next one starts so that I can add transition effects?
     
  25. C_p_H

    C_p_H

    Joined:
    Nov 24, 2014
    Posts:
    150
    Sounds like Curvy Splines capabilities.
     
  26. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    32
    Hi,
    Is there a way to get the length of a waypoint path (all over the terrain slopes & curves) ?

    Thanks in advance,
     
  27. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    512
    You can see the total length and travel duration in the Pegasus Manager in the inspector. However notice that these are not 100% precise due to the spline curve calculations, if you set up a straight line of exact 400 meters it comes out at 399,98 for example.
     
    PrimusThe3rd likes this.
  28. xkinginthecastlecastlex

    xkinginthecastlecastlex

    Joined:
    Nov 7, 2018
    Posts:
    91
    Hi,
    is it possible to create points of interests during runtime only with a specific camera and than create multiple pegasuses also during runtime with the ability to play the flythrough with another cam (also during runtime)?

    As mentioned in the post above, it would be great if the pegasuses could than have hotkeys assigned (for example alpha numeric 1 to 9). In order to create new pegasues it would be nice if the hotkeys could be reset.

    So for example:
    The user is drawing 3 Points of interests in runtime, than he is pressing a specific button (in runtime) to assign the pegasus flythrough path to alpha numeric key 1. Than the user is drawing 5 additional Points of interest and uses e.g. another buton to assign the pegasus to alpha numeric key "2". When he presses alpha numeric key 1 the camera switches and plays automatically the flythrough (pressing for example Escape would switch back to the edit camera)
    If he wants to create/replace a new pegasus during runtime he presses a button to reset the specific alpha numeric key

    the above mentioned is just an idea to showcase what I would like to achieve.
    Maybe you have another solution for that.

    It would be great if you could let me know if this could be achieved with Pegasus

    Many thanks in advance!
     
  29. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    512
    This is not something that comes out of the box with Pegasus, as it is more designed towards creating paths during design time, but I think it should be achievable if you have a bit of coding experience to set the points and do the assignment to the numeric keys as well.
     
  30. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    32
    Hi, I have another "how to" question. :)

    Please guide me how to make one 360 screenshot picture with Pegasus... I have a Helios Asset as well. I have read all forum, many have asked for such tutorial before... There is a screenshot attached of my configuration...

    Best regards,
    Primus
     

    Attached Files:

  31. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    512
    I personally do not have helios available, but from what I can read from the Helios documentation you would need to use the Pegasus Helios Rig / Prefab (which I can see in your screenshot already). When that is moving correctly with the Pegasus path. If that is working, the "Pegasus work" is done. You should then be able to capture 360° screenshots if you set up your projection mode to 360° Video in Helios and start recording.
    If you are still having trouble, it would be nice if you could describe a bit more where you are stuck, if it has to do with Pegasus movement I'm your man, if it has to do with Helios not recording or recording the wrong things etc. it would probably be best to post in the Helios forum thread as well.
     
    PrimusThe3rd likes this.
  32. Da-Luk

    Da-Luk

    Joined:
    Apr 25, 2017
    Posts:
    35
    Hello, i want to controll my pegasus flyaround with a UI slider. I got it working like your scrubber slider in the editor, but i want the animation to continue from a custom slider position. Everytime i release the slider the pegasus animation lerps back to the start. Could you please tell me which line i have to add to my c# script?

    public void change_pos()
    {
    MoveTargetTo(GameObject.Find("Percent_Slider_UI").GetComponent<UILabel>().Progress_Camera);
    }
     
  33. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    512
    Hi, the "MoveTargetTo" function expects you to enter a float value from 0 to 1, where 0 means "the beginning of the flythrough" and 1 means "the end of the flythrough".
    The good news is that a default UI slider also expresses its value the same way, 0 usually means "all the way to the left" and 1 means "all the way to the right" (when speaking about a horizontal slider)

    The following script, attached directly on the GameObject that has the slider component was working for me:


    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.UI;
    5.  
    6. public class UISliderScript : MonoBehaviour
    7. {
    8.     //public Pegasus manager reference - enter the pegasus manager from the unity editor
    9.     public Pegasus.PegasusManager manager;
    10.  
    11.     //private variable to store the Slider
    12.     Slider mySlider;
    13.  
    14.     // Start is called before the first frame update
    15.     void Start()
    16.     {
    17.         //getting a reference to the slider at startup
    18.         mySlider = GetComponent<Slider>();
    19.     }
    20.  
    21.     // Update is called once per frame
    22.     void Update()
    23.     {
    24.         //pass the slider value into the manager
    25.         manager.MoveTargetTo(mySlider.value);
    26.     }
    27. }
    28.  
     
  34. Da-Luk

    Da-Luk

    Joined:
    Apr 25, 2017
    Posts:
    35
    Hi, my slider code already worked before on the same way you mentioned in your code, but for example when i move the slider to the middle and release the mouse button, the path animation lerps back to the beginning of the path. The same happens with your editor view scrubber slider. Do you know whats going on and how to fix that? I want the animation to continue from the slider point.

    I have another question, is there a way to include a gameobject to the lookat target feature instead of a fixed one?

    Thank you in advance
     
  35. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    512
    Sorry, I misunderstood you in that bit, I thought you wanted the animation / flythrough not to play by itself, but instead control it with the slider only. Depending on how the flythrough is controlled you would need to stop the current playback of the timeline / animation, and then update it according to the slider position as well, otherwise the animation will just continue where it was left and overwrite the changes of the slider immediately.

    That is currently not that easy unfortunately, the look at rotations for each poi are pre-calculated at design time for a smooth handover between the different targets of the different POIs. You can change the look at target with the function "MovePoiLookat" in the pegasus manager, but if you do it in every frame it will kill your framerate due to the re-calculation of the entire path.
    We would need to add this as a feature in a future version of Pegasus, a made an entry for this in our backlog.
     
  36. Da-Luk

    Da-Luk

    Joined:
    Apr 25, 2017
    Posts:
    35
    Thank you for the information of the MovePoiLookat function but how can i update the slider position to the animation playback?

    Which part of the pegasus manager controlls the overall progress of the animation to match it with the slider input from 0 to 1? I took a look several times but maybe i missed something. Thank you in advance
     
  37. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    512
    Please excuse the delayed response, I had a deeper look into it as I wanted to extend the slider example I posted above into a "complete solution" to control the pegasus playback via a gui slider. I found that you can feed back the progress of the manager into the slider via the m_totalDistanceTravelledPct variable, so if you use
    Code (CSharp):
    1. mySlider.value = manager.m_totalDistanceTravelledPct;
    in Update() it will update the slider with the current progress while the flythrough is still playing.

    However I also noticed that the overall goal of having a GUI slider control the pegasus flythrough is not as easy as I made it seem in my past posts: The route and look at information of Pegasus is all pre-calculated to bear as little overhead as possible during runtime, and changing it in the manager directly does not work well during runtime while the flythrough is playing back.

    I would suggest to control the pegasus manager via the unity timeline instead. The setup for this is described in the pegasus manual from page 13 onwards. After this is set up, you can control the timeline via the slider. The following script worked very well for me with running flythrough playback & user control via the slider:


    Code (CSharp):
    1. using System;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5. using UnityEngine.Playables;
    6. using UnityEngine.UI;
    7.  
    8. public class UISliderScript : MonoBehaviour
    9. {
    10.     //public Pegasus manager reference - enter the pegasus manager from the unity editor
    11.     public PlayableDirector director;
    12.  
    13.     //private variable to store the Slider
    14.     Slider mySlider;
    15.  
    16.     // Start is called before the first frame update
    17.     void Start()
    18.     {
    19.         //getting a reference to the slider at startup
    20.         mySlider = GetComponent<Slider>();
    21.         //listen to the value change event of the slider
    22.         mySlider.onValueChanged.AddListener(delegate { OnSliderValueChanged(); });
    23.     }
    24.  
    25.     private void OnSliderValueChanged()
    26.     {
    27.         //Only process things in here as long as the mouse button is pressed
    28.         if (Input.GetKey(KeyCode.Mouse0))
    29.         {
    30.             //pause the director in case it is still running,
    31.             //else slider and director will battle for flythrough control
    32.             if (director.state != PlayState.Paused)
    33.             {
    34.                 director.Pause();
    35.             }
    36.             //update the director with the slider value
    37.             director.time = director.duration * mySlider.value;
    38.             //update director so it displays the correct position while still dragging the mouse cursor
    39.             director.Evaluate();
    40.         }
    41.     }
    42.  
    43.     private void OnDestroy()
    44.     {
    45.         //Remove the event listener in case this object gets destroyed
    46.         mySlider.onValueChanged.RemoveListener(delegate { OnSliderValueChanged(); });
    47.     }
    48.  
    49.     // Update is called once per frame
    50.     void Update()
    51.     {
    52.         //only update the slider value while the mouse button is not pressed
    53.         if (!Input.GetKey(KeyCode.Mouse0))
    54.         {
    55.             //Resume playback in case we paused it before
    56.             if (director.state == PlayState.Paused)
    57.             {
    58.                 director.Resume();
    59.             }
    60.             //update slider value with the current progress in the director
    61.             mySlider.value = (float)(director.time / director.duration);
    62.            
    63.         }
    64.     }
    65. }
    66.  
     
  38. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    32
    I'm doing a really large waypoint system (+20km cycling path). So far I'm on 260 POI (11km) and creating a new POI marker take really long time to appear on the road (<30s) which slows down my production. Is this normal behaviour?

    Best regards,
    Primus
     
    S4G4N likes this.
  39. S4G4N

    S4G4N

    Joined:
    Mar 13, 2013
    Posts:
    2,831
    They have a Discord channel that you would very likely get way faster responses on
    https://discordapp.com/channels/423247963457060866/423289142214918155
     
    PrimusThe3rd likes this.
  40. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,682
    That's a lot of POI and i never anticipated such large paths. In edit mode it does a lot of updates and this is not optimized for speed. At runtime however it is very fast.

    You could break it up into multiple Pegasus, and have each one connect to the next.
     
    PrimusThe3rd and dsilverthorn like this.
  41. PrimusThe3rd

    PrimusThe3rd

    Joined:
    Jul 3, 2017
    Posts:
    32
    Yeah..we will get back to "one connect to the next" soluton soon in the future :) as this could be the right approach. Thanks. I will still ask if there will be some "LITE" waypoint mode option with less calculating involved...we just need to drive a rider along the (long) path (speed and camera is calculated seperately)...
    Best regards,
    Primus
     
    Last edited: Sep 30, 2019
  42. Gphysono

    Gphysono

    Joined:
    Jul 24, 2015
    Posts:
    20
    I had a (Hopefully) easy question about Pegasus. I am wanting to place the camera at specific positions along the path.
    For example - The camera starts at a distance of 0 on the path, then later game logic determines it's time to move the camera to 0.5 meter distance, then later game logic says to move it another 0.25 meters, etc...
    Does Pegasus support that kind of setup? If so how?
    Thanks!
     
    Last edited: Apr 8, 2020
  43. dsilverthorn

    dsilverthorn

    Joined:
    May 14, 2017
    Posts:
    479
    It will follow a path that you set up. Including telling it which direction for the camera to look. You can switch to other views from other locations.
    In my experience, you always want the camera moving, even if so slow you can't tell.
    Not sure if it does exactly what you want but depending on the reasons, you could possible make it work for you.
    I is good for having cameras roam your scene for trailers, movies, or cut scenes.
    Can also work during runtime for camera or AI.
    For what it does, it works very well.

    If you want to talk to the devs, you might get them over on Discord easier than here, unfortunately. https://discord.gg/rtKn8rw
     
  44. Ceciaman

    Ceciaman

    Joined:
    Jul 30, 2013
    Posts:
    26
    Hi Adam,
    i use Pegasus for simply movement in 3d stereoscopic scene for 3d glasses.
    But when i rendering the scene the movement are uncostant and not linear.
    I've asked to the author of 3d panorama and he said that he ask you a modify to the timescale of the script.
    Can you help me?
     
  45. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,682
    Pegasus uses real world time to calculate the delta steps required to progress smoothly along a path.

    Changing the time scale in your game would not have any impact on this as unity time system does not necessarily correlate to real world time.

    I did not know this when i wrote Pegasus as i would have chosen unity time instead to be able to handle all possible scenarios.

    To me it sounds like 3d panorama is probable messing with unity time. In that scenario, if you match the Pegasus framerate to the 3d panorama framerate, then you will get the smooth transitions you are looking for.

    We do not get notified of messages through the forums. If you would like to ask more questions please lodge a ticket at at https://proceduralworlds.freshdesk.com/support/home
     
unityunity