[Open Beta] Procedural On-the-Fly Animation in UE4: iTween!

Glad to! I’ll have to look into new ways to incorporate slate tweens for Mac’s sake. Odd that it works on iOS but not Mac. :confused:

Hey Fitz, orientation = path will always have the object’s forward vector look down the path. In UE4, the forward vector is X. Most 3D packages use Y or Z for forward. As such, you have to make for fish’s face look down the forward X Vector. You can do this in a number of different ways.

-Rotate your fish in Maya so that its entire system faces down X+
-Rotate your fish’s skeletal mesh component in its blueprint to have it face down X+
-On Tween Update, set actor rotation on the fish to be itself + a yaw offset. This will be called after the tween’s logic every frame so it should look just fine.
-Have a second object that follows the spline a little earlier than the fish and orient to target rather than path (this idea is stupid don’t do it)
-Wait for the next major version of iTween which will have options for position and rotation offsets

1 or 2 should do it, but 3 is a good backup plan. I don’t even know why I typed 4. I guess for completeness. 5 will work great if I do say so myself, but it could be a while. Bugfixes take priority with iTween, and there’s a lot going on in my personal life and professional life right now :confused:

Thanks a lot for this answer,

The two first points are messing up the influence points and thus the animation, that would need us to rig again the fish which would definitely work but would take more time.

I’ll try the 3rd solution then ! Keep us updated regarding the last one :wink:

Ok so I gave it a try, but I must have mist something while using the OnTWeenUpdate, as it doesn’t rotate my actor when using the MoveToSplinePoint iTween, 's my BP :

The fish keeps on moving along the spline but still with its flanks first. None of other the SetActorRotation variation seems to work, and the SetActorRelativeRotation doesn’t work neither.

Bloody fishes !

Ah, see what you’re doing is calling OnTweenUpdate but what you want to do is implement the event.

Level blueprints can’t implement interfaces, so you’ll need to set an instance of a blueprint (like the fish) as the OnUpdateTarget. Then in the fish blueprint go to class settings and add iTInterface to your implemented interfaces. Compile and look for “Event On Tween Update” in your context menu. This will impleemnt the Update event for this blueprint so every time the tween send the message to update to the target, it will see that this blueprint does indeed implement the event and will fire every frame that the tween is going.

From the event then you can add your set rotation logic.

Hi ,

I’m getting embarassed to come back again for help, I know you’re pretty busy !

Although I must say I’m confused and can’t make your solution work : I’m quite not an expert in EU and I get stuck when you talk about instances and interfaces… Do you have a quick example of how to make this work ? I really don’t want to bother you, but I’m stuck at the moment :confused:

Thanks a lot (as always) !

Ok, so your fish should be a part of a blueprint (rather than just a skeletal mesh actor). Instead of using the Level blueprint (which I would never recommend, as it can get messy and doesn’t allow for interfaces) you should do the fish’s logic in its own blueprint (this is a blueprint instance; if you had 5 fish in your scene you would have 5 fish instances).

Your fish blueprint will have the iTween logic in it. Click on Class Settings to add the iTInterface.


Capture.

Then compile and in your graph you should be able to find “Event On Tween Update” (and also “Event On Tween Complete” while you will need for the destroy phase) in your context menu.
Capture.

Now set up your tween in the fish blueprint (get rid of the one in your level blueprint) and make sure “self” is plugged into the targets for OnTweenUpdate and OnTweenComplete. You should have both of these events implemented now, so you can add your custom logic to run every frame and when the tween is over.

The switch on Name is optional, especially when you only have tweens only sending one message to any given blueprint. I just included it because it’s a good habit to get into.

First, the new features for 8.6b are awesome :smiley: great job with that.
Second, would using the install version of iTween allow it to be used inside blueprints? (installing it for c++ and blueprints via the plugin installer doesn’t seem to have any blueprint usage).
I’ve searched again and found no means of getting it installed via the plugin and working for built projects, so I’ve had to go without it up until now, however to try and get around a current limitation with movement components in Unreal Engine iTween would be incredibly helpful for me to use but I just can’t work on a project that I can’t build, so I was hoping the install version you mentioned would be something I could feasibly work with, though if there’s no access to tweens via blueprint I still won’t be able to use it regardless.

Thanks Swift! I’m glad to see you’re not completely downtrodden by the packaging issues :slight_smile:

Yes, the install version of iTween has full blueprint support. I tried to make this apparent by having the installer say “I’m a C++ user or both” but I should be more clear :stuck_out_tongue:

If you install the C++/both version then you’ll have to recompile your game module (just by opening your game’s .sln file in Visual studio and choosing “build” after installing iTween) before you can use iTween nodes in blueprint, but that’s all the C+±based stuff you’ll have to do.

The newest installed version of iTween is packaging without issue on all platforms except Mac which requires you to delete the Slate stuff. All other platforms seem to have no problem with the Slate code. I’ve been looking into different solutions still to fix the packaging for the plugin version because it’s not an easy thing to decipher C++ building and I’d like to make things as simple as possible, but nothing I’ve found works for iTween. The build errors it produces don’t seem to point to iTween, they point to the project’s static linker so basically I have no idea where to look. I’ve been talking with Epic about it and it looks like this is one of the reasons code plugins aren’t allowed on the Marketplace - code plugins are pretty volatile still. My guess is, unless there’s something else I have to do that I’m missing, then the packaging issues will be fixed when code plugins make it to the Marketplace.

Be careful when installing the code version of iTween to a project with the plugin version installed. It’s best to make a backup first, remove the plugin (either by deleting it from the plugins folder or using the installer to uninstall), then install the C++/both version. If you’re lucky, Unreal Build Tool will convert the old plugin namespace to the new install version namespace, but honestly I wouldn’t hold my breath for that. It sometimes works, sometimes doesn’t. If you want to increase your chances, don’t open the project between the uninstall and new install. You’ll most likely have to go through your project replacing all of the iTween nodes with new ones, I’m sorry to say. I’d advise you to search “itween” and turn off “find in current blueprint only” then go down the line replacing each of the results.

No worries :).

I seem to have the absolute worst luck attempting to build projects. I’ve spent the last 3 hours rebuilding/building/configuring/searching to no avail regarding a fatal error I get when trying to build after installing the c++ itween (In a fresh c++ 3rd person character template).
“LINK : fatal error LNK1181: cannot open input file ‘C:\Program Files\Unreal Engine\4.7\Engine\Binaries\Win32\UE4Game-Redist-EditorStyle-Win32-Shipping.lib’”
Is that the link error you mention? I’m still getting it . I have no idea what “UE4Game-Redist-EditorStyle-Win32-Shipping.lib” is and I can’t seem to find it mentioned anywhere via searching unreal engine or google.

I do get that very error when attempting to package with the plugin version but have no issues with the C++ install version. Can you package a development version? I can package a dev version with the plugin, just not shipping.

Oh, yeah I’m trying to package shipping. If that’s still something that doesn’t work regrettably I’ll have to continue waiting again before being able to use plugins as I don’t want to spend time working on a project I have no means of knowing when I can distribute it (still have unhappy memories dealing with the broken math nodes for multiple engine versions before being able to build my project again so I want to avoid anything that won’t allow that). Still in love with your plugin and wish I could use it now and hope to in the future but while I’m unable to complete a project with the plugin and share it with others via the shipping build I’ll have to refrain until then.
EDIT: I of course know none of that is your own fault, it’s just a disappointing limitation that still exists within the engine that I hope they are able to resolve soon.

Ok Swift, I have some good news and some bad news.

The good news: You can package in shipping configuration!
The bad news: You have to build the engine from source.

The reason I was able to package without issue (and presumably others) was because I was using the master branch to do so. The launcher version of the engine is missing some libraries that iTween depends on. I tried the latest launcher version and I experienced build errors even with the install version of iTween! It lacks them in an effort to keep the file size down. Because of this, you can also only build a 32-bit shipping package from the launcher version: Built a 64 bit shipping - Platform & Builds - Epic Developer Community Forums

I’d definitely recommend getting on board with the master branch (or the promoted branch, which is tested and posted periodically) because you get all kinds of new features and the FULL package instead of the stripped version. It is heavier in file size and takes some getting used to, but it really is my preferred workflow for a reason.

Does this mean that the fixes could be in 4.8?

Awesome to hear it’ll be able to work for people :).
Regrettably though that won’t work in my own situation, as I’ve attempted multiple times in the past to setup the engine from the source via their tutorial and following some help similar to the issues I had over multiple days, but I was never even able to get a basic scene building correctly as it kept erroring out for missing files regardless of how many source variations I attempted to build the engine as. Will just have to hope they eventually provide the launcher version with libraries necessary for for plugins.

That is a distinct possibility. In the answerhub post I linked, Gribbin said that Epic was looking to include all of the binaries for the launcher version soon, but didn’t give a date. 4.8 sounds likely, though that doesn’t guarantee it will come with the things itween depends on.

We’ll have to see what 4.8 brings! If you’d like, I can put together a short video of myself building from source from scratch, but it could be possible that you just have a very specific issue preventing you from building correctly. I’ve never seen it before but computers gonna compute.

I’ll also see about maybe including the necessary dependencies with the itween installer, though I think that would break the ToS.

Yeah hopefully it’s resolved for 4.8 :). No worries, I really appreciate that offer :slight_smile: however if your setup is similar to how they’ve instructed on the github it’s likely some random issue somewhere that might still not be solved by such instructions, so wouldn’t want your effort to possibly go to waste like that.

Yeah based on the TOS at least prior to the engine becoming free that would be against it, not sure if it’s changed now but not worth the risk either way.

I’m just starting out looking at iTween for a few small parts of a game, but the video tutorial’s seem to be for older versions of the plugin. Trying to use these does not work, as just trying to create the variable fails. Are you planning on doing anymore videos? I really hope so, but if not, where should I look for the starting sequence?
What I see when trying to add I Tween_C:
2015-03-27_21h46_30.

Thanks for joining the bandwagon, Tkfore21! I will be doing more videos in time. The issue is that preparing videos takes a bit (so that I’m sure to cover everything I need to and don’t sound like a blubbering idiot on the tubes, though I know I do anyway :p) and there are a lot of other things I need to take care of, personally and professionally.

  1. Family and health
  2. Production work with my team
  3. Paid contracts
  4. In-house tool development
  5. iTween written support
  6. iTween bug fixes
  7. iTween features
  8. iTween tutorials
  9. iTween wiki

I keep trying to prioritize videos and the like but then something from higher in the list pulls me away. iTween, while I love working on it and providing it, unfortunately doesn’t pay so it has to take a backseat often. :frowning: Of course I always have my phone with me and there are constantly short pauses in my day in which I can help on the forums, so feel free to ask! I’ll always find time to help.

As of 0.8b, we went fully static. This means that iTween events can be called from anywhere - you no longer need to create an I Tween_C object. Just type “itween” into your context menu to see all of the events and functions.

I can fully understand. A regular life is important, and should be the priority, thus why I asked where else to look.

Great news. Thanks for the info.

Hi; nice folk
Before being involved with this tool… I have a question
For Archviz (normal city traffic simulation)
Does this tool useful to create animation of moving car, with rolling wheels and rotating when the car is taking a turn…!!?
Best Regards