Game Development Community

dev|Pro Game Development Curriculum

Ecstasy Motion: Onward, and Upward!

by Chris Calef · 09/18/2012 (5:52 pm) · 19 comments

www.brokeassgames.com/blogs/chris/09_17_12/magic_mountain_skyline.1024.jpg

Re: the CMU BVH Library (2500 free DSQs!), the Loop Detector, a new Behavior Tree GUI, Exploding Doors, and more...


Well, once again, it's been a loooong time (six months?? really???) since my last blog... I wish I could say I've been busy having all kinds of summer fun, but the reality is, outside of the one trip to Magic Mountain, and a wacky week at the Oregon Country Fair, it's pretty much been six months of nonstop, nose-grinding work - fixing, improving and expanding all aspects of Ecstasy Motion.

Among other things, we now have:
  • better BVH and FBX import/export (though FBX still has a ways to go)
  • a fancy new Loop Detector tool (see tutorial video below)
  • a whole new visual interface for behavior trees
  • destructible objects like doors and windows
  • enhanced project management
This last round of changes has definitely moved us past the realm of just "making it work" and well into the territory of "making it ROCK!"

And speaking of Making it ROCK, how about big enthusiastic round of applause for Eric and Dave and everyone else involved with making T3D OPEN SOURCE!?! That was about the best news I've heard in years! More about how this relates to Ecstasy Motion later...

But first, a current screenshot:

www.brokeassgames.com/blogs/chris/09_17_12/FullGuiBP2Soldier.600.jpg
Mixamo soldier FBX, downloaded from Unity Assset Store, converted to DTS in EM, and dropped into BAG Building Pack Two demo map.

Now, as anyone who's been following my blogs knows, I've been saying we're "almost done" for... well, for longer than I care to think about, and this blog is no exception. However, somewhere in the last month or two, Ecstasy Motion crossed an invisible line in the sand. I'm calling this line: "Usability".

The program is still far from perfect, some seriously rough edges remain, but it has passed my primary litmus test: I am now 100% sure that I can use this tool to animate my own projects.

That's a big relief, because "my own projects" include not only multiple game and short animation ideas, but also a full length action movie that is already a year into shooting! There is still a long road ahead before Ecstasy Motion is 100% bug free, full featured, well documented, and user friendly, but at least I can say at this point that the majority of the core functions are working. And enough of those functions are unique (at least at our price point) that I'm starting to feel downright bad for holding it back. I'll talk a little more about our future plans at the end of the blog, but first, to the shiny!

(BTW, you can grab Ecstasy Motion here if you already know you want it.)

------------------------------------------------------------------------------------------------------------------------------------------------

1. CMU BVH Library - 2500 Free DSQs!



The CMU BVH library is a huge dataset of 2500 motion files released by Carnegie Mellon University several years ago. I had never taken the time to bring them into Ecstasy Motion... until now! The set I used was further refined by Brian Hahne (cgspeed.com) into a more "Daz-Friendly" version than the original data. The files were still awkward to import, however, and the sheer size was imposing: the Daz-Friendly library weighs in at 5.1 gigs of data, unzipped, which ends up as a pretty big download even zipped. In analyzing the files for import, however, I noticed that there were a number of places where they could be optimized, and at the same time made potentially more friendly for import into other BVH-consuming applications on the market (Second Life, Daz, Poser, etc).

First, they were all stored at 120 fps, which seemed excessive. Converting to 30 fps immediately dropped the size of the library by 75%. Then, I found that there was a large number of extraneous nodes being tracked - finger data for both hands, plus eyes, ears, and some miscellaneous other nodes - none of which ever contained any data. Removing all of these reduced the size by about 66% again, and at the same time also probably eased the import process in some applications that do not need or want finger nodes. Then, finally, because my OCD side was fully raging by this time, I had to notice that all of the rotations throughout the entire BVH library are stored as degrees, i.e. in the range of (0-360), but they were storing eight decimal places worth of accuracy. Two seemed be more than adequate, and this step reduced the final size by close to another fifty percent.

Final result: the entire BVH library, when zipped, adds up to 140M, 383M unzipped, while the DSQ library came out at 137M zipped, or 168M expanded - not too shabby, considering we started at five gigs! Those links, by the way, go to the actual converted libraries, which are being made available by BAG, for free, as our little present to the community. Check out this useful index to get an idea of what the files contain. The DSQ library, by the way, is specific to the ACK (BAG Advanced Character Kit) or Daz/Poser/Truebones skeleton, so it will only work for you if you are using a model with appropriate node names. Unless, of course, you buy Ecstasy Motion now and use it to make your own custom library of DSQs matching your model!

The most enjoyable part about this whole process was making use of the batch import functions in EM. Whole directories of BVH files can be converted back and forth from DSQ to BVH in one move, while custom BVH profiles can remove unnecessary node data and resample frame rates on the fly. Ecstasy Motion definitely strutted her stuff on this job!

The data used in this project was obtained from mocap.cs.cmu.edu.
The database was created with funding from NSF EIA-0196217.


------------------------------------------------------------------------------------------------------------------------------------------------


2. The Loop Detector


When presented with a large library of motion capture footage, the first problem you face is how to break it up into small manageable pieces. Fortunately, solving this problem is one of the reasons Ecstasy Motion was created. And with the Loop Detector, the process just got even easier.

A cyclic animation is any animation that is designed to repeat itself. Whether it be a walk or run cycle, a jumping jack or pushup, just standing and breathing, or the motion of washing a window, the one golden rule of a cyclic anim is that the last frame has to be exactly the same as the first frame. Cyclic anims are incredibly useful in games, obviously, because they can be of very small size but on repeat they can last forever. Ecstasy Motion encourages the use of cyclic anims in cinematics as well.

Here is a quick tutorial video demonstrating the entire process. It was recorded in realtime, and nothing has been taken out - it really did take less than two minutes to go from raw input data to a finished cyclic walk animation with ground transforms.



Using the Loop Detector, it takes only seconds to capture a new cyclic anim out of a longer sequence. As you play through the sequence, find the cycle you would like to capture, and then hit the Mark In button at the point where you would like the cycle to start. Then, hit the Loop Detector button, and let it play the rest of the anim. When finished, the Mark Out field will be set to the point where the character is posed most nearly identically to the pose it had at the Mark In frame. If it captures more than one cycle of your animation, and you want only one, you can play with the Max Frames value to set a cap beyond which it will not search.

Once the Mark In and Mark Out points have been established for your loop, you can see the results by using the Jump Slider Mark In/Mark Out buttons, and then crop it with the Crop button. At this point you will have a new anim containing just your loop. You will still need to orient it to face the front and to start at the local origin, but Ecstasy Motion has buttons for these functions as well, located on the Keyframe Editing rollout.

Finally, when doing this with real world data, you will frequently find that reality does not conform perfectly to one's idealistic expectations... in other words, a live human does not necessarily perform exactly the same walk cycle every time. The Loop Detector alone can't fix bad data, it can only find the closest point given what we have to work with. However, we have one more function just to satisfy this final problem. The Smooth Transition tool on the Sequence Timeline allows you to specify a number of Smooth Frames back from the end of the anim, and then when you hit Smooth Transition, that much of your anim will be interpolated to match the beginning frame, so there will be no observable snap when the animation repeats. (In the above video, I didn't bother with the Smooth Transition step, but it's just one more button to push.)

------------------------------------------------------------------------------------------------------------------------------------------------

3. Behavior Tree Chart


www.brokeassgames.com/blogs/chris/09_17_12/BTChartHeader.1024.jpg

In my last blog, I mentioned that I had taken a diversion into an increasingly common AI technique called Behavior Trees. At that point my new system was extremely difficult to use, and it could be made friendlier even now... but it just became an order of magnitude easier to understand, with the addition of the interactive Behavior Tree Chart. At first I only wanted to create a method of visualizing behavior tree structures, but once that existed it was a no-brainer to make it possible to click on the nodes in order to select them in the rollout, and then while I was at it I decided it would be much more exciting if the chart could actually highlight the active node at runtime as well, while the actor is "thinking"...

To make a long story short, all of the above got done. Here's a test example, to show how the chart handles a really complex tree with many layers:

www.brokeassgames.com/blogs/chris/09_17_12/testBT.jpg

The chart can handle as much depth as you want to throw at it, it just grows and grows. In the future I plan to make it more interactive yet, with the ability to slide nodes to the right or left to change their sequence, for example, and it would be awfully nice to have the ability to link different trees together in a graphical way as well. You can pass control from one behavior tree to another, but you have to do it with a script function.

The system is still a little barebones, and relies on the user having at least a passing knowledge of Torque Script, so in that sense it's still a work in progress. But it is working, right now, and you can stuff it with as much logic as your characters need. In the long run I think this is going to become a powerful, core feature of Ecstasy Motion.


------------------------------------------------------------------------------------------------------------------------------------------------

4. Exploding Doors (and other destructible objects)




In a classic case of need-driven development, I had a model come across my virtual desk one day from the BAG Art Dept., to see if we could physics-ify it. It was a door, ready to be broken into a bunch of pieces. I thought it should be easy, and it mostly was, except that until that point I hadn't actually tested the ability of bodyparts to operate without an active joint... and, not surprisingly, it didn't work on the first pass. I fixed the issue, however, and now Ecstasy Motion is capable of entering a whole new field of destructible props and environments!

Here's the same thing happening with a lot more force. The reason the door pieces drop vertically before blowing back is because I made my impulse force event happen a little too late after the ragdoll event. Once recorded with live physics, this sequence is saved as a static animation, and from there can be exported to FBX or BVH as needed.



------------------------------------------------------------------------------------------------------------------------------------------------

5. Project Management


In addition to all the shiny new features above, I also did some less glamorous but no less important work under the hood, cleaning up one of our longstanding weak points: namely the management and safeguarding of user data. Quite a long time ago we made the decision to switch to an open data format (SQLite database) rather than making up any kind of custom project file format specific to this app. This was a wonderful choice, and we never looked back... but it _has_ taken quite a while to wrap our heads around a couple of the logistical issues that came up.

The following additions will make your life as an Ecstasy Motion user a little easier:
  • "New Project" menu option, which creates a new DB as a duplicate of a system template. Previously you had to copy the database manually.
  • (Heh, sorry this took so long!)
  • Scene "Save As" button, which makes a duplicate of the current scene, with all of its actors, events, playlists, etc., under a new name.
  • Project merge tools, allowing actors, scenes, weapons, behavior trees, etc to be imported from one project to another.
  • (CRITICAL) There is now a step between making changes and permanently making changes. Much of the work flow in Ecstasy Motion involves writing modifications directly to the DB... and "Undo" isn't really hooked up in most cases... which made it very easy to accidentally commit mistakes to your project, which could at times be quite difficult to reverse. Instead, now there is a temporary copy of your database made when you fire up the program, and all the work gets done there until you hit the scene "Save" button.
  • REPEAT: you now have to hit the scene "Save" button before your work becomes permanent. Don't forget!!

------------------------------------------------------------------------------------------------------------------------------------------------

www.brokeassgames.com/blogs/chris/09_17_12/good_good.jpg

Where do we go from here?


These are indeed exciting times! Even though there is still a long way to go before everything works exactly the way we want, I have noticed that more and more of the items on my checklist are for things to be done with the program, as opposed to being done to the program. I still need to make a solid bunch of sample scenes to guide new users through all of the features, for example, and I also need to make several more tutorial videos similar to the Loop Detector one above.

There are still major items left undone, of course, including things like:
  • a completely reliable FBX importer/exporter (this is a Very Big Job)
  • another overhaul to make the behavior trees entirely drag & drop, except where custom scripting is truly necessary
  • one more pass through the Genetic Algorithm panel, to make it actually useful
  • a solid stab at some camera controls, both for making machinima videos in EM, and for saving camera positions out to FBX scenes
  • fix any number of annoying little bugs. :-P
  • and then: RELEASE THE ECSTASY MOTION SDK!

That last one is going to dovetail quite nicely with the new open source T3D. It will be just that much easier for people to make games combining T3D with Ecstasy Motion's custom features. There is a lot of work to be done between here and there, of course, cleaning up and packaging my source code for public consumption... but the SDK is really the endgame for EM and the Torque community, and I can't wait to see it happen!

However, to get all of this accomplished, I've done some soul searching and decided it would be far easier and more pleasant if we could get a few months of development actually funded for a change. Toward this end, keep your eyes out for my next announcement, which should be the launch of our Ecstasy Motion Kickstarter campaign!!! I'd hook you up with a link to it right now, but we still have to work out the details.

In addition, even though we are still not exactly where we want to be in terms of functionality, the program has reached the point where I am legitimately proud of it, and this means I'm just about ready to start actually marketing it beyond the walls of my beloved Garage Games alma mater! (Until now, you've been sort of a friendly test audience... and thank you very much for your participation, we've appreciated it!) Which also reminds me: if you are a current Ecstasy Motion user, and have good things (or even bad things) to say about the program, please shoot me an email! We would love to collect some user anecdotes and examples as we start talking to new people about the software.

Eventually, we really are going to raise the price to its final $199, but for now you can _still_ purchase Ecstasy Motion for the Early Adopter price of $149.95, at: www.EcstasyMotion.com

As a final note, not to make your eyes bleed but just to remind everyone how far we've actually come in the past three years... check out our first build, from 2009:

www.brokeassgames.com/blogs/chris/09_17_12/OriginalEcstasyGui.jpg

So, change is slow, but it does happen! Wish us luck on the next stage in our progress!

#1
09/19/2012 (1:24 am)
o.0

This is pure awesomeness Chris.

++
#2
09/19/2012 (1:37 am)
Sounds Good, Looks Good,Feels Good
i will definitely buy it.

is it a separate kit or i have to combine it's source with t3d ?

"Eventually, we really are going to raise the price to its final $199, but for now you can _still_ purchase Ecstasy Motion for the Early Adopter price of $149.95, at: www.EcstasyMotion.com"

so 199$ will be finale price.
will it cost extra 50$ later to get finale one?
any approximate date to raise the price?


#3
09/19/2012 (2:45 am)
I'm still on chapter 3 here, but I'm wondering if this blog is available as an ebook? :D

Edit: Seriously though, this is awesome news Chris. Any news on Tentacle Fu?
#4
09/19/2012 (4:47 am)
Your blogs are few and far between but when they arrive there always a good read :-)

Real life as usual gets in the way of me playing around with the new changes in EM straight away, but will have a mess about with all the new goodies as soon as I can.. It feels like Christmas :-D
#5
09/19/2012 (5:57 am)
This is great Chris. Did the MACK and FACK characters ever make it to 100% T3D compatible? I seem to recall something about them not being quite right and that you were working on it. Maybe I missed a post update.
#6
09/19/2012 (8:51 am)
Thanks, everyone!

@Dan, lol. I know, a little more often, and maybe people wouldn't have to set aside their whole morning to read them...

@ahsan: No idea when I'm going to raise the price, it will be whenever I run it for a whole day and it doesn't piss me off once. ;-) But to answer your question, *NO* you won't have to pony up an additional fifty bucks, our deal with our early adopters, whether they got in for $99 back in the day or $149 now, is that a) we LOVE you and b) you are now a full fledged owner of the basic standalone product and all its updates, you're in! And did we mention we love you?

Re: T3D, no this is a standalone application, you don't have to own T3D or do anything with the source code (although that is about to become significantly less of a barrier in a couple weeks anyway!)

There is one advantage that Torque owners have over non Torque owners using EM, although this too will change when we port to the open source release. Currently, we are limited in terms of which editors we could include with our build, so if you look up in the top in most of the screenshots I've posted in my blogs, you will find a mostly empty editors bar, with nothing but the world editor icon and Ecstasy Motion's icon.

We built the product to work with those other editors, however, so if you are a Torque owner, you can basically just drop copies of all the extra tools/ directories right into your EM build, and then you'll have them. The screenshot I included at the top of this one is my dev build, with all the editors included. (There's a couple of tiny script changes to make too, you might figure it out on your own with a merge tool, or else just ask me.)

Of course, when we port to the free version, then 'BLOOP' - those can all go into the main build as well.

In the spirit of open and honest communication, however, I must admit that one of those remaining bugs keeping us at the EA price point is the fact that EM doesn't play nice when switching between editors right now, things get a little messy. Working on it.

@Jeff: that's a good question, I'll ask our Art Dept. I thought they did, but I'm not sure. The main issue was the skin swapping, of which some aspect was not supported in T3D. If it still isn't then you'll have to get the fix off of our T3D GITHUB BRANCH when the time comes!

Hee hee, I still can't get over it. Somebody pinch me please.
#7
09/19/2012 (9:42 am)
Hey Chris,

So what's the plan with the SDK?
Would we be allowed to integrate it into our build of the engine or something?
If so, how would licensing/usage of it work for modders that may make use of our particular build of the engine?
#8
09/19/2012 (9:44 am)
Hi Chris, and congratulations on your progress with EM :)

I bought EM in 2009, and I'll be honest not used it since then !

However, I think its time to have another look ... but ...
I cant find my licence code :( I tried the contact page on your
web-site, but that page sees to be incomplete ?

Anyhoo, I was wondering if you could tell me how to apply to get my
licence code re-sent ?
(I am able to login to your web-site, user name Hewster :) )

Cheers.
#9
09/19/2012 (10:06 am)
@Hewster: do you by any chance remember the email address or username you were using when you bought it? Our website and intelliprotector have separate lists of users, and I can't find the email you used on our website in Intelliprotector. If you can dig up that info, I could look you up quickly. (chris at brokeassgames dot com) (EDIT: actually, I'm 99% sure the username has to be your actual name. Email me and I'll hook you up.)

I could also find you via the date you bought it, if you have bank / credit card records accessible.

@Jeff: the plan with the SDK is to package up all of the game-related features of EM and make them available as a patch. By this we mean we would remove the GUIs and whatever functions are only related to making and saving out animations, but keep all of the physics code, all the navmeshes, behavior trees, GA etc, and all of the code for interfacing to the OptiTrack and Kinect devices, so everything we've written so far in the direction of automating cinematics (stealing from the game industry to make movie making easier) can be ported back into making games again.

#10
09/19/2012 (10:39 am)
Thanks Chris, email sent :)
#11
09/19/2012 (10:57 am)
Thanks Hewster, reply sent. Have fun!
#12
09/19/2012 (11:58 am)
Ever impressive as always! I should slap myself for not having EM already.
#13
09/19/2012 (12:42 pm)
We could slap each other, Michael. :D
#14
09/19/2012 (12:49 pm)
Hey now, this is a nonviolent blog!! No slapping will be necessary. :-)
#15
09/19/2012 (4:56 pm)
This is a must have!
#16
09/22/2012 (3:33 pm)
Ok, I got to ask some questions about this tech.

Alright - So you mentioned somewhere during the live mocap demo that you can have individual bones go rag doll (or something like this). Could this simulate broken bones/Joints IF enough force is applied to a specified bone? Similar to real life.

Example - IF I fired a Weapon (For Visualization sake a Lee Enfield) from 200 Meters away and it hits a bone on a NPC or Character. Could this effectively "break" a bone for said NPC / Character?

#17
09/22/2012 (5:19 pm)
Well, yes and no... it is very much possible to "break" a physx joint, in fact that is how the exploding door demo works. Joints in physx can be given a breaking force and/or a breaking torque, such that when they receive more than this amount of force, they break.

This is not exactly similar to a broken bone in real life, however - to simulate breaking a bone, what you would actually need is a new joint, because now you've made two bones where you used to have one. This is not currently supported in Ecstasy Motion, but theoretically could be in the future if enough people wanted it.

The other thing to know about breaking _joints_ as opposed to bones, such that the bodypart actually becomes separated and falls off the character entirely, is that you need to build your characters with this in mind, so that polygons don't get stretched between the main body and the broken off bit.
#18
09/23/2012 (9:41 am)
@Chris Calef - This is exactly what I am looking for from this tool! Going to buy it when I can!
#19
09/23/2012 (7:55 pm)
@Benjamin: good to hear it! Looking forward to working with you.

And just so everyone knows... Ecstasy Motion is now officially PORTED UP TO MIT!!! Which means, among other things, that the full suite of editors is now available. Sorry for the mess re: material editor, I'm still having some trouble getting things to switch back and forth neatly, but I'm sure we'll have it sorted soon.