[RELEASED] Flux - The Cinematic Editor For Unity

testing out flux to see if it meets our needs, and i’ve run into an issue. animation previewing isn’t working for me as it seems to work in your “Flux - Animation Workflow” video. i’ve added the clips to the playanimation timeline and have toggled on the preview eye icon, but when i scrub or play in editmode the targeted model does not animate. no logs or errors, but the model just doesn’t animate. note: these animations work fine in game.

we’re on the 4.6 beta, so i’m wondering whether that might be the issue? have you tested on that release, or would i need your 2.0 version to use flux on 4.6 beta?

Hi,

Can you send me a test project to the support email? 4.6 worked fine with current Flux, however maybe some of the latest betas broke something.

As for Flux 2.0, it will be Unity 5 only, since there were a lot of changes, specially to the animation system.

Regards,
Nuno Afonso
http://www.fluxeditor.com

thank you for that nigh immediate response! turns out i was linking the wrong anim clips, and with the proper ones the preview functionality does work on 4.6 beta(20).

great work, and thanks again for the support.

1 Like

First officially known project that is making use of Flux, and it looks awesome!

They also have a dev blog in which they mention Flux, yupi! ;-]
http://www.pokugame.com/devlog/releasing-the-teaser-trailer/

Can’t wait to play it!

Regards,
Nuno Afonso
http://www.fluxeditor.com

Hi - we are currently evaluating the Flux trial to see if it meets our needs - I’ve hit a couple of issues and was wondernig if you can offer any advice:

  1. I am getting really frequent crashes when working with animations on the timeline in 4.6 beta 20 (dropping in a new animation and moving it on the timeline, scrubbing etc - cant see a consistent repro method but it is happening very often - has taken me most of the afternoon to put together a simple scene with a character and camera animating). This is currently the biggest problem which is a real shame as there are a lot of positives, but perhaps these issues can be easily resolved…

  2. There is an event to play a particle system and have this preview nicely when scrubbing the timeline, however when the event finishes the particles just freeze in their last position rather than continuing until they die (this is only an issue when scrubbing the timeline when the scene plays it works fine). It also seems that the play particles event stretches the time of the particles system - it would be nice if this was a toggle as currently to get the particles to play at the speed they were authored at involves a bit of trial and error.

  3. Our cutscenes need to involve a player character that has been customised and the same scene might play with one of several different monsters - my plan was make our cutscenes with a generic ‘stand in’ characters and then swap in the real characters at run time. I have got a proof of concept of this working by searching through the sequence for the correct time line and setting its owner. However I do get some errors in the console (because I dont instantiate the unecessary ‘stand in’ characters:

MissingReferenceException: The variable _owner of FTimeline doesn’t exist anymore.
You probably need to reassign the _owner variable of the ‘FTimeline’ script in the inspector.
UnityEngine.Component.GetComponent[Renderer] ()
FluxEditor.FRendererEventInspector.OnEnable ()
FluxEditor.FRendererColorEventInspector.OnEnable ()

I guess even though I set the owner immediately after instantiating the sequence that the error is happening before I do this.

Cheers!

Neil

Hi Neil,

First of all, thanks for giving it a try.

Can you confirm if this happens when you have a preview of the animation track (i.e. toggled the eye on), then changed the animation, and afterwards tried to scrub?

If so - and I hope not - it is something that Unity changed. In Unity 4.5 (and initial 4.6 betas) this worked fine, but in Unity 5 they changed something internally that when you change animation data after there is a preview saved in mecanim, it will crash internally in their code. I hope that they didn’t bring that change to 4.6, is that the behaviour you’re noticing?

The problem with that is that at runtime you can tell Unity to stop emitting the particles and it will just let the ones already alive die out, but when you’re previewing you can’t do that because when the event ends, it stops running any code on it, and since Unity runtime isn’t running you can’t have that behaviour. I understand that it would be nice to have support for that, but I’d need to figure out a nice way of doing it, which unfortunately will not be at this time, maybe for Flux 2.x (which will be Unity 5 only).

Regarding the play speed, there’s a fix, but maybe I didn’t rebuild the trial with it… hmmm… basically currently the Play Particle Event has a toggle called “normalizeToEventLength”, and only if it is true it will change the speed of the particle system to match the event length. However, this means that if it is off, and you have a particle that takes 1 second to play, and you have an event that is 3 seconds, the last 2 seconds of the event aren’t really doing anything so it may be misleading, but at least it will work as you’d want it.

I see the problem you’re having. When using the sequence editor, it is trying to create inspectors but at that time it doesn’t have the Transform, and in some cases I’m assuming that there is and try to do certain things (e.g. if it is an animation track and the object doesn’t have an Animator attached to it, I add it).

However, this does show a problem, I’m going to have to treat these differently in the editor. Although, at this point, I’m planning to add it to 2.0.

That being said, as a workaround, please try this:

  • Spawn your character, name him what it was named when you originally created the Sequence
  • Instantiate the Sequence (since Unity doesn’t have like “global references”, it will try to fetch stuff by name, so if the name matches, it will get it).

Let me know if that helped you at least continuing moving forward with that trial version.

Regards,
Nuno Afonso
http://www.fluxeditor.com

Heya Nuno - based on the info re. point 1 I think I have a good way to reproduce the crash:

a) Add an animation track (set up the controller and add an animation)
b) Turn on preview
c) Scrub - everything is ok
d) Drop a second animation onto the track
e) Scrub - crash

If I toggle off the preview before I add the second animation then toggle it back on then the crash does not occur so it does sound to me like what you describe. I can at least use this as a workaround for now but it would be great to get a proper fix - unfortunately we do not plan to switch to unity 5 for the initial release of this game as the timelines are too tight so it would be good to know if this is not going to make it until unity 5.0 / Flux 2.0.

The normalizeToEventLength toggle does not seem to be available in trial version currently - I wonder if having this would solve both my issues since if I have a particle effect that lasts 1 second and then takes 2 seconds to fully die I could have an event 3 seconds long which is set to normaliseToEventLength and this will keep the particle system updating. Would be great to try (this is a particular problem with impact/explosion type effects since there is a big ‘bang’ at the start but this needs to dissipate so that you can see what is happening in the rest of the scene)

I will try your suggestion for point 3 and let you know how I get on.

Thanks for the response - really appreciate it.

Neil

Damn… It is the Unity 5 change. Basically if you try to change a preview but the controller / animations have changed, it now crashes internally in Unity when you play it without rebuilding. Previously it would just show the cached preview, and then you’d have to manually rebuild it (toggle off and on).

I’m going to have to find a solution for the 4.x version, I’ll keep you posted. In the meantime, while you’re using the current version, please keep doing that workaround (i.e. toggle preview off before changing the events).

Maybe it didn’t make it to the trial or even the version, I know that I did do it because someone had the same problem, maybe it was just a tweak done for that guy.

Nevertheless, since I’m going to have to push a fix to Flux 1.x, I’ll add that new event. And yes, if the particle system doesn’t loop and you set the duration of it to half the event, the second half you’ll just see the particles move away (they will disappear if their life end before the end of the event).

Whenever I push the trial version (will always be faster than the actual release because UT needs to approve), I’ll let you know.

Regards,
Nuno Afonso
http://www.fluxeditor.com

Pushed Flux v1.2.4 to the Asset Store, hopefully it fixes the crash issues (at least Neil and I can’t reproduce them anymore).

It also has the new play particle event that people asked for. If you’re evaluating it with the trial version, you can already download trial 1.2.4 from here.

EDIT: I heard that in the latest 4.5 it was also an issue, but that this build will also fix it for that version.

Regards,
Nuno Afonso
http://www.fluxeditor.com

Nuno,

Im using the trial version of your editor. Nice product. Im going to go ahead and purchase it. I had one question though … do I have to redo all the animation work I did in the trial version ? Or after purchase I can just update a license and the watermark will go away ?

Hi,

Unfortunately, the way unity handles the references in a dll and in source code breaks the script references when you go from one to another.

There’s 2 manual approaches for this. If instead of source code, you compile the Flux source to be a dll, or if you manually set the scripts of all the game objects inside the sequence (which you can make them be visible with a toggle in the sequence inspector).

Some people did some scripts to try to get around this issue, this one looks very promising http://www.daikonforge.com/dfgui/missing-script/ but I haven’t tried it myself. If you do try it, please let me know how well it worked.

Regards,
Nuno Afonso
http://www.fluxeditor.com

hello ! how are you ?

by testing the demo i can say that this asset might worth every penny ! but i have something to ask, how is possible to access other scripts? for example, i can see FIELD OF VIEW in the camera slot, but how to add BLOOM and change its properties?

Many thanks

To create new kinds of events, you just need to add your own extensions. Here’s how the FFieldOfViewEvent.cs looks:

using UnityEngine;

// you don't have to put it inside the namespace, I just do that
// for all classes I create, instead just do #include Flux;
namespace Flux
{
    // in order to have tween events, just extend the class
    // from FTweenEvent, and then choose what you want to tween on
    // The FEvent attribute is to define how it will show up in the
    // add event menu
    [FEvent("Camera/Field Of View")]
    public class FFieldOfViewEvent : FTweenEvent<FTweenFloat> {

        // have variable to cache the camera so it is faster
        private Camera _camera = null;

        protected override void OnInit()
        {
            // cache the camera on init, so it does only once at
            // the start before the event is used
            _camera = Owner.GetComponent<Camera>();
        }

        protected override void ApplyProperty( float t )
        {
            // apply property gets a float from [0,1],
            // then we apply the tween to get the result
            _camera.fieldOfView = _tween.GetValue( t );
        }
    }
}

Eventually I’d like to add my own events for Bloom and such, but waiting for Unity 5 to stabilise before I focus on that.

Regards,
Nuno Afonso
http://www.fluxeditor.com

Hey,

I downloaded the free version from your website, but I can’t seem to get it running on the Unity 5 beta for OSX. (5.0.0b11)

I get all these errors in the console, and have no way of making the Flux window appears, obviously.

Any idea?

Thanks,

Hi Mattia,

Unfortunately that version isn’t compatible with Unity 5. In Unity 5 there were a lot of changes, including a drastic change to the Mecanim APIs, so I’m working on a version tailored for that release.

Still don’t know when I’ll have at least a trial ready, but if you want I can send you a PM whenever it is done.

Regards,
Nuno Afonso
http://www.fluxeditor.com

Hi Nuno,

I tried almost every cutscene tool in assetstore, your workflow is quite different and IMO clearer. Any update on next version?

Hi Inas,

I’m actively working on it, but I still don’t have anything to show. I already have some ppl “flagged” to be notified when I have a version ready to show, if you drop me an email I’ll add you to that list.

Regards,
Nuno Afonso
http://www.fluxeditor.com

Hi Nuno,

Been trying to play with Flux. Can we make a sequence into a prefab and edit it later? In my case, i want to have different attack sequence for enemies. However, some enemies have same sequence. What’s the best way to make it on Flux?

Also can we add animation event who trigger method? Like Animation Window’s animation event?

Yes, you can do that. However, there’s a few things that you have to take into account. Either you put everything inside the Sequence GO, and then when you’re spawning the prefab everything is ready to go, or you need to make sure that before you play (or init) the sequence, you have either the GameObjects you used or you assign new ones to those timelines.

Flux stores the reference to the GO that owns the timeline, but since the GO may not be in the scene already - and since there’s no other way to get that information - , Flux looks for the GOs by path name. So lets say that you have a character called Enemy8 in your hierarchy, Flux will store “/Enemy8” as the path of the owner of the timeline.

So you have 2 ways to do it when the GOs are outside the sequence:
a) You spawn those GO with the same name, and then Flux will get them
b) You spawn GO to replace those, and you have to assign them in their Timelines

(a) is the easiest, however some times it isn’t practical (e.g. the player can be using FemalePlayer or MalePlayer GOs, but you want them to play the same thing). BTW this is also a limitation when you have to assign like this multiple GOs with the same name, Flux will just grab the first with that name.

(b) is the solution for when you need to replace things, but it implies that you need to search que sequence timelines and set a new Owner (e.g. When you created the sequences you used MalePlayer, so if the user is using FemalePlayer, you search for all the timelines whose owner was MalePlayer and then replace him with FemalePlayer).

Did you understand the options? I know it is a bit complicated, some times when you work with prefabs these things get a little muddy.

Ok this is where things start to get murky. Flux was created for creating cinematic kind of content, so basically cut scenes, scripted events, intros, etc. When you start mixing gameplay with Flux, you start going into rogue territory, because Flux is meant to create something that plays the same way.

So I’d say that the best gameplay scenarios for Flux are things like quick time events, which play out like movies, but then there’s an event that makes it jump to another sequence or another part of that same sequence. Other good examples that I see is assume that there’s a “scripted city collapsing” behind our character, and then it either plays out without killing him, or if it catches the player it kills him, or a turn based game where you have these scripted attacks.

It’s not that you can’t do gameplay with Flux, is that it will start to get “ugly” and in some instances hacky. So I caution ppl on how they use it because in some situations it may not be the best option.

For this I have 1 doubt, if they can play the sequence at the same time:

  1. Enemies can play at the same time - spawn N enemies, then spawn N sequences. For each enemy, assign him the timelines of his sequence.
  2. Enemies cannot play at the same time - spawn N enemies, then spawn 1 sequence. Before each enemy can play it, you need to call Stop(true) (true is to force it to init before playing again), then assign the timelines to that enemy, and only after that play the sequence.

If I understand this correctly, you’d want to have an event that sets the owner of the timeline? That will be worse, because you’ll now have to find specific events and set variables on them. Also, it wouldn’t work because the owners have to be assigned to the timelines before the timeline starts playing. This is to be more optimised, because we have an init phase in which you can cache stuff so that you can be ready for playing without any overhead (i.e. frames dropped).

That being said, I’m adding 2 functions right now, a FSequence.ReplaceOwner( Transform oldOwner, Transform newOwner ) and a FSequence.ReplaceOwner( string timelineName, Transform newOwner ), where timelineName is the name of the GO. I may also add one that uses the Transform path, I’ll think about it (only helpful when you have more than 1 GO with the same name and inside other GOs).

These will be on Flux 2.0. After spawning a sequence, you’d just have to do something like:
sequence.ReplaceOwner( “MalePlayer”, femalePlayerGO ).

Hope I answered your questions, if not let me know ;-]

Regards,
Nuno Afonso
http://www.fluxeditor.com

Hi Nuno, thanks for very detailed answer

“You spawn those GO with the same name, and then Flux will get them”

I tried to make a simple sequence on my Cube which i named “Kube”. The cube is outside of sequence object. Then i make the sequence as a prefab. Delete the sequence and put it back from prefab to scene. After that, i delete the Cube, make a new Sphere named “Kube”. Sadly when i test play it, there will be
“UnassignedReferenceException: The variable _owner of FTimeline has not been assigned.” error

What’s wrong?