Ogre Track Editor (and future cut scene editor)

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
mickeyren
Greenskin
Posts: 142
Joined: Thu Dec 18, 2008 11:32 am

Ogre Track Editor (and future cut scene editor)

Post by mickeyren »

Dear everyone,

Here is my own contribution to the community.

A screen shot:
Image

The application(4.8mb)

You probably need the .NET runtime if you don't have it installed on your machine yet.

Don't forget to edit the paths on plugins.cfg and resources.cfg to point to your directories.

Current feature list:
  • Able to create multiple animation tracks (screen shot shows 2)
  • Loads your whole resources including mesh animations - good when you want to sync the animation track with the mesh walking animation for example.
  • Play your tracks
  • Auto generate Ogre code similar to the camera track example included in the SDK. When you're finally satisfied with your tracks, just hit the ogre icon button and the code will be generated for you to just copy and paste into your code editor.
  • Position, orient and time individual node key frames
  • Deletion of individual node/key frame
  • Save/Load your track collection
  • Loads terrain.cfg - so you can create a track that follows the contour of the terrain or go through canyons and rivers.
Some more feature I plan to add:
  • Scale time and auto compute time - by entering a maximum time for the whole track, the app will auto compute all the in betweek key frames taking into account the path distance
  • Reset orientation
  • Documentation, right now we have to do with the tool tips I littered around the buttons
And a few technical details:

The application is developed using C#, the open source Dock Panels Suite created by Weifen Luo and MOGRE as its rendering engine. It uses the standard property grid as well that we see in the VS IDE.

I'm happy to hear your suggestion what you may need/want included and if its nothing to hard, I'll try to incorporate it before the release. Right now this editor serves my needs for a demo game I'm creating, but I'm willing to squeeze in some more features for the community.

Cheers,

David
Last edited by mickeyren on Wed Feb 11, 2009 9:30 am, edited 8 times in total.
User avatar
^DJ_Link^
Kobold
Posts: 28
Joined: Tue Oct 18, 2005 5:04 pm
Contact:

Re: Ogre Track Editor

Post by ^DJ_Link^ »

Looks awesome. Thanks for the contribution. I'll give it a try after work :D
User avatar
sisyphus
Halfling
Posts: 50
Joined: Mon May 12, 2008 11:13 am
Location: London, England
Contact:

Re: Ogre Track Editor

Post by sisyphus »

Sweet! Perfect for generating in-game cut scenes, in addition to other things. Thanks!
http://GPForge.com | digital art and entertainment
User avatar
Rasengan
Halfling
Posts: 46
Joined: Sun Jul 13, 2008 12:21 pm
Location: Brussels

Re: Ogre Track Editor

Post by Rasengan »

Hoow!

Theze kind of tools are really appreciated.
Thank you for sharing!
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Re: Ogre Track Editor

Post by tuan kuranes »

Seems great.

What would be really nice is some export of animation track, using xml (check skeleton ogre xml format) or a binary format, with example loading/playing code (even in the form of a plugin, like particle manager).
Check Ogreaddons dotscene viewer/interface/manager.
Dotscene export + animation export => Direct movie creation, cut-sene creation, etc...
mickeyren
Greenskin
Posts: 142
Joined: Thu Dec 18, 2008 11:32 am

Re: Ogre Track Editor

Post by mickeyren »

Hey guys! Hey Tuan!

Its a privilege seasoned Ogre developers like you noticed my app!

The editor will generate an Ogre formatted code for you similar to the camera track example(ready for copy and paste), doing an xml dump of the tracks might be overkill for such a simple app - but is there already a defined animation tracks in XML in Ogre? If so I can follow the specification and allow dumping of the tracks in XML.

I doubt this can be used for cut scene though, cut scene usually have scripts attached to them. or else this would be a dull or silent cut scenes :)

Anyway, I have uploaded the editor and updated the first post.

Once again, I'm open to suggestion for features that anyone may need.
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Re: Ogre Track Editor

Post by tuan kuranes »

Thanks for releasing it !
but is there already a defined animation tracks in XML in Ogre?
Use ogre command line tool OgreXmlConverter on a skeletal animated mesh (robot.mesh) and open the resulting skeleton mesh. Check into Ogre/tools folder for source, and more specifically in skeletonserializer class.
I doubt this can be used for cut scene though, cut scene usually have scripts attached to them. or else this would be a dull or silent cut scenes :)
Your tool is very adapted for cut-scenes from my point of view, specially for indies that lack actor voices for their cutscenes...
Anyway, "trigger Events" based on animation time, either in another xml file or inside the same one using an extension to the ogre/dotescene xml, would give application the ability to adds sound/speech/music or scripts.
mickeyren
Greenskin
Posts: 142
Joined: Thu Dec 18, 2008 11:32 am

Re: Ogre Track Editor

Post by mickeyren »

Hi Tuan

Thanks for your suggestion. I would probably incorporate the Xml dotscene compatible dump.

For your other suggestion, do you mean to say like while the user is defining the track - and lets say for instance at key frame 3 / or at 20 seconds during the track, will allow the user to put a trigger event?

If so, probably how I would do this is (off from top of my head), whenever an event has been triggered, a user supplied call back function will be called, something like this (prototype of callback function:)

void TriggerEventCallback( string animationName, int nodeKeyIndex, float time)
{
}

Where the animation name gives the user which animation this trigger event is coming from, the nodekey is the index to the node key frame and the current time of the track.

So a sample Ogre code would look like this:

Code: Select all

void TriggerEventCallback( string animationName, int nodeKeyIndex, float time)
{
  if( animationName == "OrcWalkingTowardsPlayer" )
  {
     if( nodeKeyIndex == 3 )
     {
       // Do something - pause the track, spit out message balloons, spawn more orcs etc.,
      }   
   } 

   if( animationName == "Spaceships" && time = 20.f)
   {
      // Activate next wave of space ships
   }
}
Let me know if that's what you have in mind, though I'm still trying to get my head around how to do this best, and as you can see above sample is quite messy and would stretch into a long and messy if-else conditions.

Thanks!
User avatar
stealth977
Gnoll
Posts: 638
Joined: Mon Dec 15, 2008 6:14 pm
Location: Istanbul, Turkey
x 42

Re: Ogre Track Editor

Post by stealth977 »

About triggers:

In my opinion it doesnt matter how you realize it in your own code, but when you export it, you can put in something like;

Code: Select all

<ANIMATIONTRACK name="bla bla" framestart="x" frameend="y" etc. etc.>
  <TRIGGER frameid="3" action="playsound scream.mp3"></TRIGGER>
</ANIMATIONTRACK>
then the loader application can parse it, and when animation reaches the correct frame, it can send a command to the listener class like;

listener.triggerEvent("playsound scream.mp3");

the listener class's triggerEvent function checks for valid commands (playsound for example) and then execute the corresponding function with the argument (scream.mp3)

Oh btw, if you want to show the same action in your editor, you can implement the same mechanism in your editor too, but this implementation covers all kinds of user-defined triggers while your in-editor implementation may only support limited kinds of triggers as WYSIWYG.

Just my 50 cents =)
Ismail TARIM
Ogitor - Ogre Scene Editor
WWW:http://www.ogitor.org
Repository: https://bitbucket.org/ogitor
mickeyren
Greenskin
Posts: 142
Joined: Thu Dec 18, 2008 11:32 am

Re: Ogre Track Editor

Post by mickeyren »

Thanks guys. I definitely want this to be useful and I want the Ogre community to use this so I would be supporting this for a while.

So I'm expanding this application - adding cut-scenes like you and Tuan suggested by mainly these additional features:

1. export to ogre xml format as Tuan suggested
2. add triggers - like Stealth suggested on how it should be done.
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Re: Ogre Track Editor (and future cut scene editor)

Post by Kencho »

Thanks for contributing this. The general feel in the community is that Ogre lacks proper tools for a few tasks, and this will probably be handy for a number of people, even in its current state (this already might help doing better demos with cooler fly-by's in future releases).

Keep up the great work!
Image
mickeyren
Greenskin
Posts: 142
Joined: Thu Dec 18, 2008 11:32 am

Re: Ogre Track Editor (and future cut scene editor)

Post by mickeyren »

Hey thanks for showing likeness and enthusiasm.

Actually I do think ogre already have editors its just that they are not full blown editors or there are no official editors.

But yeah this is my own little contribution to this community and in fact im waiting for someone to complain or report a bug. :D
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Re: Ogre Track Editor (and future cut scene editor)

Post by tuan kuranes »

Triggers like stealth977 is indeed the simplest and lightest solution.
Bugs reports will come for sure...
Thanks again.
mickeyren
Greenskin
Posts: 142
Joined: Thu Dec 18, 2008 11:32 am

Re: Ogre Track Editor (and future cut scene editor)

Post by mickeyren »

Hi

I'm a little confuse so I just want to make it crystal clear what I understood that I needed to do so far.

I saw what the OgreXMLConverter tool does, what it is for (converting ogre native binary mesh into xml formatted output), and saw these animation format from a .skeleton:

Code: Select all

 <animations>
        <animation name="Die" length="0.541667">
            <tracks>
                <track bone="Joint1">
                    <keyframes>
                        <keyframe time="0">
                            <translate x="0" y="0" z="0" />
                            <rotate angle="0">
                                <axis x="1" y="0" z="0" />
                            </rotate>
                        </keyframe>
.......
So, i would more or less go with the same format, perhaps just add an addition element <trigger> that would be nested inside <track>.

All in all, all I need to do is instead of my application saving to a binary format, it will save its tracks and triggers as xml, and that's it?

I'm just confused with Tuan's earlier suggestion:
Anyway, "trigger Events" based on animation time, either in another xml file or inside the same one using an extension to the ogre/dotescene xml, would give application the ability to adds sound/speech/music or scripts.
Mainly I could not find how the dot scene format look like (wiki has very minimal information about the dotscene), or perhaps Tuan suggested me to export it to a dot scene format? (which i believe might be out of my applications league).
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Re: Ogre Track Editor (and future cut scene editor)

Post by tuan kuranes »

You would just add animation in a dotscene file

Code: Select all

<scene formatVersion="">

    <nodes>
        <node name="Robot" id="3">
            <position x="10.0" y="5" z="10.5" />
            <scale x="1" y="1" z="1" />
            <entity name="Robot" meshFile="robot.mesh" static="false" />
        </node>
        <node name="Omni01" id="5">
            <position x="-23" y="49" z="18" />
            <rotation qx="0" qy="0" qz="0" qw="1" />
            <scale x="1" y="1" z="1" />
            <light name="Omni01" type="point" intensity="0.01" contrast="0">
                <colourDiffuse r="0.4" g="0.4" b="0.5" />
                <colourSpecular r="0.5" g="0.5" b="0.5" />
            </light>
        </node>
    </nodes>

   <animations>
        <animation name="Robotwandering" length="0.541667">
            <tracks>
                <track Node="Robot">
                  <TRIGGER frameid="3" action="setanimationstate walk"></TRIGGER>
                    <keyframes>
                        <keyframe time="0">
                            <translate x="0" y="0" z="0" />
                            <rotate ang
         ....
        </animations>
</scene>
More complex examples are in Ogre addons dotscene folder. (samples, viewer, etc.)

You can just add DotScene_Loader a simple loader instead of the whole ogreaddons plugin at start. (still ogreaddons dotscene has several .scene to test/play with)

Things is that dotscene are currently direclty exportable from XSI/maya/ogreMax/Blender. So if we could load it then in your great app, and then save from that cutscenes, that give "developper free", "artist only" cutscenes pipeline.
And that would be great !
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Ogre Track Editor (and future cut scene editor)

Post by jacmoe »

This is the latest - in progress - dotscene format:
https://ogreaddons.svn.sourceforge.net/ ... ceneFormat
Look in documentation.
And find a sample scene - in media/OgreSDK/bin/release - called MyScene.scene.

It contains xml tags for specifying animations:

Code: Select all

				<animations>
					<animation name="ShootReplication" type="node" length="0.541667" interpolationMode="linear" rotationInterpolationMode="spherical">
						<nodeAnimationTrack handle="0" associatedNodeName="Joint1" useShortestRotationPath="false">
							<transformKeyFrame timePosition="0">
								<translation x="0" y="0" z="0"/>
								<orientation>
									<angle_axis angle="0" x="1" y="0" z="0"/>
								</orientation>
							</transformKeyFrame>
							<transformKeyFrame timePosition="0.166667">
								<translation x="0" y="0" z="0"/>
								<orientation>
									<angle_axis angle="0" x="1" y="0" z="0"/>
								</orientation>
							</transformKeyFrame>
							<transformKeyFrame timePosition="0.208333">
								<translation x="0" y="0" z="0"/>
								<orientation>
									<angle_axis angle="0" x="1" y="0" z="0"/>
								</orientation>
							</transformKeyFrame>
							<transformKeyFrame timePosition="0.291667">
								<translation x="0" y="0" z="0"/>
								<orientation>
									<angle_axis angle="0" x="1" y="0" z="0"/>
								</orientation>
							</transformKeyFrame>
							<transformKeyFrame timePosition="0.541667">
								<translation x="0" y="0" z="0"/>
								<orientation>
									<angle_axis angle="0" x="1" y="0" z="0"/>
								</orientation>
							</transformKeyFrame>
						</nodeAnimationTrack>
						<nodeAnimationTrack handle="1" associatedNodeName="Joint2" useShortestRotationPath="false">
							<transformKeyFrame timePosition="0">
								<translation x="-0.244575" y="-0.945701" z="0"/>
								<orientation>
									<angle_axis angle="0.0761765" angleUnit="radian" x="0" y="0" z="-1"/>
								</orientation>
							</transformKeyFrame>
Only a small snippet, but I believe you can use this directly.

Hope that helps!

And great work, by the way. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
mickeyren
Greenskin
Posts: 142
Joined: Thu Dec 18, 2008 11:32 am

Re: Ogre Track Editor (and future cut scene editor)

Post by mickeyren »

Hi guys

Thanks so much for all the info. I think I now have all the information i need to get going. I'll go and have a stab on it and make a release sometime next week with these new ideas. Just finshing up my Ogre demo game and would be releasing it this week and believe it or not, I ended up not using my track editor and opted for using steering behaviors instead. Much much better AI.

Cheers,

David
nickG
Greenskin
Posts: 122
Joined: Fri Jan 20, 2012 6:44 pm
Location: Russia,Moscow
x 1

Re: Ogre Track Editor (and future cut scene editor)

Post by nickG »

reupload this please;
hydexon
Gremlin
Posts: 164
Joined: Sun Apr 14, 2013 8:51 pm
x 10

Re: Ogre Track Editor (and future cut scene editor)

Post by hydexon »

nickG wrote:reupload this please;
Seems the author remodelated their website and changed the links but its here: http://programmingmind.com/contents/ogr ... r/download but seems too simple and quite outdated but you can do something with it.
Post Reply