Jump to content

OpenSimEarth rumblings...


Recommended Posts

OpenSimEarth Approaches!


TL;DR: I have a T3D build on github that incorporates the animation recording and saving functionality from Ecstasy Motion, so you can blow up ragdolls and save them out to dsqs.


So, this hardly qualifies as a proper "Show-off" yet, it's not anywhere near done or anything, but since it's been pretty quiet around here, and I did just commit up some code that could be potentially useful to somebody, I thought I'd share a bit about what I'm doing anyway.


Before I forget, the repos in question are here (for the engine):


https://github.com/ChrisCalef/Torque3D/tree/open_sim_earth


and here (for the game directory):


https://github.com/ChrisCalef/OpenSimEarth_game


Don't get too excited yet, like I said they're in no state for distribution... but bookmark those babies, I have a LOT of plans for them!


http://opensimearth.org/images/ose_001.jpg


(Sorry for the most boring screenshot ever, but I'll explain the one interesting feature in a minute.)


Sooo.... what am I doing, anyway?


Basically, if you've been around these parts for any length of time, you must have heard me go on and on about Ecstasy Motion. (If you're a newcomer, go check out my blogs at garagegames.com, if you have all day.) Long story short, the idea has always been to make a T3D build enabled with ragdoll physics, animation editing capability, and a bunch of AI tools like navmeshes and behavior trees, and aim it at the independent filmmaker market, to generate animations for export to Maya or other movie making software. My projected price point has always been in the $99 to $199 range.


This has appeared to be a viable plan for some number of years, even though I knew it was taking me way too long to finish, but recent research has convinced me that at least in terms of Maya, I may have less of a niche than I previously thought. (Hint: google Miarmy).


No final decisions have been made, but at the same time, I've also been finding myself very powerfully drawn to my OpenSimEarth project idea, starting with this blog from a couple of years ago:


http://www.garagegames.com/community/blogs/view/22269


And then more recently this one:


http://www.garagegames.com/community/blogs/view/22953


Meanwhile, however, I'm still working on the movie project that has gone hand in hand with EM from the beginning:


https://www.facebook.com/Portlingrad


This film still needs the logic from EM in order to be completed, and I'm still convinced that there is a lot I could offer to other indie film producers. However, I've decided to go ahead and merge as much of my EM functionality as possible with my OpenSimEarth branch, making it fit in more properly into the engine, and make as much as possible available to Torque developers. Wherever relevant and desirable, I'd love to PR specific items into the T3D trunk.


So anyway, back to that boring screenshot above. The one new thing you can see there is a "Scenes" dropdown menu, with "+" and "-" buttons next to it. What's going on there is the ability to load and unload (unload isn't plugged in yet) physicsShape actors into a scene, from my sqlite database. Once there, the new and exciting bit as mentioned above is the ability to record sequences. A call to my script function "startRecording()" will cause all actors to start saving their current node rotations and base node translation to internal arrays. Then a call to "makeSequences()" will cause them all to save these rotations into dsqs, named after their database sceneShape id.


This ability is not limited to physics ragdoll effects, you can also use it to record an actor running around the world and performing various actions, such that you could play back a whole scene from only canned anims and not have to run the physics and AI on those characters anymore.


It may seem crazy for me to be giving away the crown jewels of EM like this, but I'd rather have the participation and help of the Torque community than whatever money I could make off of this code around here. I am considering adding something along the lines of "Pro Tools" for OpenSimEarth, however, where I will enable export to FBX and/or BVH, and that could be where I get to charge my hundred bucks or so from the indie filmmakers.


Anyway, that's basically it for the moment. Expect more functionality and some working web presence at opensimearth.org/.com sooner or later.


And, because you made it this far, here's another screenshot, this time with some violence in it. I did shoot those guys, and I'm not even sorry.


http://opensimearth.org/images/ose_002.jpg

Link to post
Share on other sites

Wow, very nice.


The 'record as sequences' thing sounds pretty similar to Valve's method of doing the really big showpiece physics stuff in the HL2 episodes, where you run the physics sim with hundreds and hundreds of parts in a complicated ordeal, and then bake it all out to a canned animation for ultra-lightweight playback during the actual game.


Definitely something that a lot of people could find useful!

Link to post
Share on other sites
Ah cool, I didn't know they did that in HL2. But yeah, that's the idea!

 

Yep, they talk about it in their dev commentary.


E7jERCfG1LU


Skip to 4:10 to see the bridge collapse, and then shortly after he goes and activates the dev comment node that talks about how they did it, but the tl;dr is they simulated a couple hundred physics objects, then baked it into a skeleton animation so it could actually work on the average gamer's computer.


Good stuff :)

Link to post
Share on other sites

Nice, yeah that sounds like a much larger version of something I did with a door once:




I'm also envisioning my stuff here as being useful for baking out AI behaviors, for ambient background anims, eg a field full of rabbits foraging and occasionally hiding or running away or something - you could design a fairly intensive behavior tree for a lot of agents, and then bake out a good one and turn all that off at game time.


Re: what features are there and how to test them... my apologies but the most important feature of OpenSimEarth - the flightgear-based terrain paging system - isn't really packaged up and ready to distribute at the moment, I've had it packaged up before but I'm back into a bit of a mess with it at the moment. Hope to have it ready to go in the next couple of weeks though.


In the meantime, what you can do is download the game directory repo, and run the executable (OpenSimEarthGame.exe), and then pick Empty Room for your mission. You should get a flat plane with a little tower thing on it with a messed up texture (orange no material). :-P


Once there, you should be able to open the world editor and in the library tab, find a new dropdown box, with my two scenes named PRTL_BLDG and PRTL_TEST. Both of them simply create a handful of my Michael4 actors (dude in black underwear), with a very simple BadBehavior behavior tree attached that has them run back and forth between the one health object and their starting position, sort of.


Not too exciting at this point, but if you go into openSimEarth.cs, line 300 or so, and uncomment the following:


//schedule(40, 0, "startRecording");


Then you will start recording everything that your actors do. At this point you can shoot them in realtime, or go into the behavior trees and add setDynamic(1) somewhere to make them ragdoll, or add forces to them, or add more complicated behaviors, and all will be recorded.


When you are ready, then you can hit "alt g" or type stopRecording() into the console, and then after that hit "alt b" or type makeSequences(), and then you will get a dump of scene sequences into the folder art/shapes/m4_optimized/scenes/ and then a number representing the database id of your current scene.


Also, you can make more scenes and sceneShapes in the database itself, best way to do that is to open the sqlitestudio executable I included with the build in the main game directory.


Finally, I also created a handy little system called actionSequences, wherein I make it possible to assign a particular sequence name at the shape instance level to a generic category, ie you can say %shape.setActionSeq("run","my_particular_run"), and then later on in the code or in behavior tree scripts you can call actionSeq("run") without having to know or care which particular run anim this shape is currently using. I find it makes a lot of things easier, and you can expand the system infinitely with as many actions as you like.


I fixed the scene unload button now as well (the "-" button by the dropdown) so be sure you do a fresh update before you try anything. I also added a global position per scene, which gets added to the local position of each scene shape, with intent that I can start making "scene templates" where you could reproduce a common scene with it's common shapes many times over on a map. (i.e., fill in a single family dwelling with a typical family doing their typical things, in whichever house you walk into.)


My next easy low hanging fruit trick is going to be loading/unloading scenes based on proximity, so you can cross a landscape and instantiate/deinstantiate little active scenes as you travel.


Many apologies if you can't get it to work at all, this stuff is beyond bleeding edge at the moment, but do let me know and I'll try to figure it out for you!

Link to post
Share on other sites
  • 2 weeks later...

Demonstration videos... sure, someday... Got a lot of nuts and bolts work to do before that becomes relevant though. :-)


Re: T3D main line, yes and no. The project itself, no, because it is going to involve a lot of logic and dependencies that go far beyond Torque's general purpose game engine mission. However, my intent as I go is to make as many subcomponents as possible be PRed back to the main line, ie things like my animation tools, etc.


In addition, I'm trying to separate out useful lines of work that are still too specific to include in the main engine into their own repos to be shared separately on github (for instance, any physics work I do that doesn't make it into the engine) so that people could make use of it without fully adopting OpenSimEarth.


But anyway, still fixing the terrain pager at the moment, and many other little things to do after that...

Link to post
Share on other sites

So, I got to a relatively stable spot with my recent binge on the network layer, and jumped off in a different direction. One item on my long list of goals for the project involves sharing models between flightgear and T3D, and since flightgear is exclusively based on a model format called .ac, (AC3D) the tools options are somewhat limited. However, Blender works for .ac files (possibly with a plugin?), and I saved them out as collada from Blender and imported those into Torque.


Aside from some slight issues with the textures :-P, the shapes appear to be working, so far. Expect future updates.


http://opensimearth.com/images/screenshots/fg_aircraft_02.jpg


http://opensimearth.com/images/screenshots/fg_aircraft_01.jpg


http://opensimearth.com/images/screenshots/dragonfly_01.jpg


http://opensimearth.com/images/screenshots/heli_cockpit.jpg


Don't get too excited though, you can't fly them... yet.

Link to post
Share on other sites

Ah there we go, starting to look a little better. The DAE importer, at least for my files coming in from blender, appears to have a hard time making materials for textures, as opposed to solid color materials which seem to work fine. Had to make the material entry myself, but after that the UV coords seemed to be hooked up and working fine.


http://opensimearth.com/images/screenshots/dragonfly_02.jpg


http://opensimearth.com/images/screenshots/dragonfly_03.jpg

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...