Allegro.cc - Online Community

Allegro.cc Forums » The Depot » GRIM Editor

This thread is locked; no one can reply to it. rss feed Print
 1   2 
GRIM Editor
Matt Weir
Member #7,476
July 2006
avatar

This is just for the person who asked to have a look but anyone else is welcome.
(Mentioned in this thread.)

GRIM 2d Skeletal Animation Editor

This is the editor for the animation engine I have made for my game. It uses a series of 'bones' with 'skins' attached and can interpolate between any 'frame' smoothly.

I'm doing all the graphics myself (especially since the majority of the engine programming is now done) so this editor has never really been designed with other people in mind. It is not meant to be a finished product, just something to have a look at! The actual game uses Openlayer as opposed to the GRIM editor which uses Allegro (because of GUI) so ignore the slower framerate...

Read the 'Readme.txt' for additional info...

GRIM

(I've never posted any exe before, should I include the alleg42.dll too?)

Thanks!
Matt Weir. :)

Screenshots
http://www.angelfire.com/funky/feartheweasel/pics/GRIM_ScreenShots_3_2_2007.jpg

EDIT: Fixed download link

Paul whoknows
Member #5,081
September 2004
avatar

Angelfire said:

Angelfire does not allow direct linking
from offsite, non-Angelfire pages,
to files hosted on Angelfire.

I thought GRIM was a vector based animation program, I did not know it was your own editor, I am impressed, those screenshots looks like a really professional animation program:o

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

Mark Oates
Member #1,146
March 2001
avatar

Looks really cool. Too bad I don't have anything that I could use it for.

Matt Weir
Member #7,476
July 2006
avatar

@Paul whoknows: Thanks! Sorry I didn't realize angelfire didn't allow direct linking RAR's, it works for the screenshots. ::)

I'll prob release the whole system as a lib if anyones interested but maybe even just the whole source of everything. The source is pretty complex though with the data structures alone. It's definately not as easy as you first think especially with making drawing order (linear) be independant of calculation order (tree structure) etc....

I've got a few ideas for projects after my current one (side scroller). I'd really like to do a game like 'Sam and Max hit the road' or 'Day of the Tenticle' (prob 10+years old now if you haven't heard of them) with this system at some point later. :)

Here it is attached... GRIM

Hard Rock
Member #1,547
September 2001
avatar

This looks really cool. I'm actually working on an animation editor myself, although it functions very differently then yours.(I might post it soon, but who knows when I'll get to working on it)

The interpolation is very smooth and it looks really nice, good job!

_________________________________________________
Hard Rock
[ Stars Dev Company ][ Twitter ][Global Warming: ARA My TINS 07 Entry][Pong Ultra Website][GifAllegS Ver 1.07]
"Well there's also coolwebsearch but we'll let that be an IE exclusive feature" - arielb on the New Browser Plugins "What's better, HTML or Variables?"

Michael Jensen
Member #2,870
October 2002
avatar

I've contemplated and even tried building a skeletal animation engine, but it's been too hard for me to accomplish in the past -- I'll pull some joint and all the other joints get broken... -- never got around to allowing the joints to be skinned... the cool thing about this approach is that it makes walking animations easy to build. -- I'd love to check out your GRIM editor; but for now I'm not working on a project that can use it (Isometric/top down game)

Is there a tutorial? Also -- is there a way to "render" frames? like have the program go thru and just output a bmp file with transparency for every frame?

Also, for depth perception, it looks like you're not doing it now, but possibly you might make frames farther back in the z-order smaller, and closer up bigger. The closest bone might have +2 px to w/h and the farthest will have -2px from w/h, and in the middle area they all get normal w/h .... (in the top right frame, you can see the bottom of the far foot by about 2 pixels, when the fron is mostly overlapping it -- this is because they're not aligned perfectly, the bottom line is that this should never be possible.) -- Just thinking out loud.

Wilson Saunders
Member #5,872
May 2005
avatar

I made a similar program to this. But mine does not look as professional as this. Does yours do key frame interpolation?

________________________________________________
Play my games at http://monkeydev.com

Matt Weir
Member #7,476
July 2006
avatar

Thanks everyone for the nice words. :)

I don't have a tutorial or anything for this yet, this is basically the first version with all the main functionality working.

Quote:

the cool thing about this approach is that it makes walking animations easy to build.

Definately! One of the reasons of motivation to do this was so I could have better animations in my projects. Because your only saving the skin bitmaps and a file full of lengths and relative angles you can make lots of different animations quite easily and you won't have a huge file size or have to draw thousands of frames.

Quote:

Also -- is there a way to "render" frames? like have the program go thru and just output a bmp file with transparency for every frame?

Personally I'm just using the same engine in my game so I get proper interpolation but it definately would only be a few minutes work to code a 'Render' function into the editor if anyone wanted it.

Quote:

Also, for depth perception, it looks like you're not doing it now, but possibly you might make frames farther back in the z-order smaller, and closer up bigger.

Good idea! I havent implemented scaled drawing in the graphics part yet and you would have to scale the bones as well for it to work right. The only thing is I'd have to implement some sort of 'grouping' of bones in the editor to do this properly. It's on the cards anyway because I'm making it so that bones tagged 'at the back' are drawn, they will be drawn tinted darker.

Quote:

this is because they're not aligned perfectly...

Mostly due to my not caring if the test model is perfect. ie. his legs are different lengths... ;)

Quote:

Does yours do key frame interpolation?

I'm afraid I'm not too sure what key frame interpolation is... In the test model there is a (poor) running animation which has four frames defined and the program works out all the frames in between. I'm only using linear interpolation but I find since I'm interpolating between lengths and relative angles (instead of just points) you can make things seem smooth with some tweaking of the model.

If anyone wants any more info on how things are done for anything their working on I don't mind at all. I'm not big on the 'keeping trade secrets' philosophy and I'll most probably release the source when I'm done anyway since there's a bit of interest. Sorry for the long post, but I try and answer all questions... ;)

PS: Does anyone know any commercial games that use this sort of thing? 2D not 3D...

Michael Jensen
Member #2,870
October 2002
avatar

I don't know of any 2D games that have this in their actual engine, but I wouldn't doubt that a few have used this approach with pre-rendered frames (I suppose any 2D game that uses pre-rendered 3d modles, is in a way, doing this?)

Quote:

Personally I'm just using the same engine in my game so I get proper interpolation but it definately would only be a few minutes work to code a 'Render' function into the editor if anyone wanted it.

and

Quote:

they will be drawn tinted darker.

Neato!!!!11

Quote:

key frame interpolation

key frames are the hard coded frames, so it sounds like you're implementing linear key frame interpolation, which is mega cool -- it would be cool if the render function mentioned above could render a variable amount of frames (ex: I have a 5 key-frame animation, and I want it to output 50, making the ones in between, and smoothely.)

Matt Weir
Member #7,476
July 2006
avatar

Sweet, it's on the todo list. As I've said it won't take too long to implement, the codes pretty much already there. This editor/graphics engine is the main priority at the mo because I need to get more graphics into the game engine. :) I'm just working out the logistics of supporting dynamic modification of the skeletons in the game so you could do something like shoot an enemies arm off and then attach it to you if you so wished. That particular scenario prob won't happen in the game but the idea is a laugh. Again all the main code is already there it's more a case of game design...

Also scanning in some of the art for my game right now so I should have a decent testing model instead of that weird cactus guy in the near future... (he will be missed though :P)

juvinious
Member #5,145
October 2004
avatar

Quote:

I don't know of any 2D games that have this in their actual engine, but I wouldn't doubt that a few have used this approach with pre-rendered frames (I suppose any 2D game that uses pre-rendered 3d modles, is in a way, doing this?)

On the NintendoDS, in both Castlevanias there exists a few characters that use this kind of technique for some large enemies. It's pretty interesting which makes this editor pretty awesome, keep up the good work Matt.

__________________________________________
Paintown

Matt Weir
Member #7,476
July 2006
avatar

Thanks for the encouraging words! :)

Yeah, I used to love Castlevania! They remember they used every trick in the book when it came to their bosses. Good times. I vaugly remember the final boss in Sonic the Hedgehog 2 was similar too, probably why I'm doing this now! (I was sooo addicted to that game when I was a kid, noone could beat me at two player!)

Michael Jensen
Member #2,870
October 2002
avatar

I seem to remember some bosses like that in CV: Symphony of the Knight (PSX) ... I'm not sure if this is how they were implemented though -- I'd guess that they were all separate enemies that were just hard coded not to drift too far from each other, or stored their positions as offsets of one another rather than act as actual joints -- could be just me thinking that though...

MW: I still haven't tried the program out, sorry, I've been swamped with work -- but I want to ask: is there anyway, that you can save frame files, without textures attached? So that if I made a whole bunch of running/jumping animations, etc, I could just attach them to new "skins" and have it all work? I think this would save the most time... especially if someone went thru the trouble to make complicated gestures and emotes...

edit: Also when they render, is it possible to place the characters all on an output bitmap of the same size (say, maybe, have it autodetect the largest bitmap it would need and just use that size) so that when I'm animating in my game, I can blit whatever bitmap needs to be blitted at the same exact point, and not worry about offsets or the character moving around within the image...?)

Sorry if I'm asking too much -- this is getting me excited enough to finally write my own platform-shoot-em-up-er...

Audric
Member #907
January 2001

There's this boss Galamoth, and I've seen several others in the Castlevania games on the GBA.

Quote:

I'm not sure if this is how they were implemented though -- I'd guess that they were all separate enemies that were just hard coded not to drift too far from each other, or stored their positions as offsets of one another rather than act as actual joints -- could be just me thinking that though...

It's the same thing ??? On the abstract level you design an animated character, on the implementation level you draw it by a series of rotated blits... Or whatever hardware sprites (or GL quads) the console uses.
Complex enemies (made of several animated joints) were certainly designed in a GRIM-like editor, then the data was translated for the console as hard-coded instructions: (x, y, angle) for each sprite.

Richard Phipps
Member #1,632
November 2001
avatar

I think Another World and Flashback used interpolation in their sprites..

Michael Jensen
Member #2,870
October 2002
avatar

Might you mean, Out of this world? That game was awesome... I think it did use a skeletal system, but it was also only vector based (everything was filled triangles)

But awesome games.

Nice Link RP,

Quote:

See, way back in the day, the Egyptians had a lot of weird things: mummified people, a fixation with cats, large triangular buildings, and magical dinosaurs that had control of the elements and guarded the tombs of the dead. You may wonder why it is that, if they had these creatures, we've never found bones of them, but I tell you, we've never found Jimmy Hoffa either, so yeah...

Quote:

It's the same thing

I was thinking maybe they weren't rotated or maybe my head was just being strange. It does that.

Audric
Member #907
January 2001

They are rotated by fine angles, this explains why they have sometimes hard, yet "fuzzy" edges, instead of artistically anti-aliased. See for yourself on the picture of Galamoth.

It's easier when you have no rotation : You can animate pretty centipedes or asian dragons, with several blocks touching each other.

Michael Jensen
Member #2,870
October 2002
avatar

you're right.

edit: I also did some googling and found this (very cool):
{"name":"142_full.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/0\/40e978470b9a6c27d86ee52bbfe5ea65.png","w":544,"h":398,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/0\/40e978470b9a6c27d86ee52bbfe5ea65"}142_full.png

Matt Weir
Member #7,476
July 2006
avatar

Quote:

is there anyway, that you can save frame files, without textures attached? So that if I made a whole bunch of running/jumping animations, etc, I could just attach them to new "skins" and have it all work?

It's one of the things that is definately planned. At the moment you can just load a skeleton, manually change all the skins, then save it to do the same sort of thing but I plan on integrating it a lot better. The thing is I want to accomodate it if your second set of skins needs different lengths of bones (ie. a creature is basically the same, same gestures etc. but has longer arms). It all starts to get pretty complicated after a while if you want to have a heap of 'one button' features like 'change entire skin' though in how you store the info to disk. Still all very possible though. I'm planning on grouping everything together in it's own file format which should make this stuff easier. (At the moment it's all seperate PNG's and generated textfiles while features are still being added.)

Quote:

They are rotated by fine angles, this explains why they have sometimes hard, yet "fuzzy" edges, instead of artistically anti-aliased.

In the game I'm using this in it's all aliased by OpenLayer and displayed in 800x600 which does a nice job of hiding the jaggies but yup, you would definately have problems in low resolution. ;)

Quote:

I also did some googling and found this

Haha, that's so cool!

gnolam
Member #2,030
March 2002
avatar

Quote:

Might you mean, Out of this world?

Yes. "Out of this world" is the US title; "Another world" is the European (and original) title.

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

Richard Phipps
Member #1,632
November 2001
avatar

And Another World is a better title anyway.

Matt Weir
Member #7,476
July 2006
avatar

Well the graphics for my game have finally started their migration from the sketchbook into the digital world so as promised, here's a better example...

{"name":"591195","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/e\/de5613ef9ed751ab3721ccdd706b393c.jpg","w":645,"h":506,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/e\/de5613ef9ed751ab3721ccdd706b393c"}591195

Takes quite a while to draw all the graphics because you have to draw everything that lies behind other things as well. It will be a few long nights copying over and colouring/shading some of the bosses that's for sure! Thanks to photoshop though all the detail is done on different layers to the coloring so I can easily have the same skin but different colours and textures. (The baby blue on the above guy prob isn't permanent in other words! ;))

I'll release another demo of the editor for people to play with in a few days as new features are being added all the time as I need them (eg. proper offsetting for skins added today). Proper timing for the frames is next so that certain frames can be longer/shorter than others. (already working in the game but not the editor... ::))

Thanks for all the suggestions on features etc, much appreciated! Have a nice day all.

Matt.

Michael Jensen
Member #2,870
October 2002
avatar

Quote:

It's one of the things that is definately planned. At the moment you can just load a skeleton, manually change all the skins, then save it to do the same sort of thing

That's good enough, so long as the animations are preserved, and just replacing the skins in one frame does it globally to all the other frames...

or hmmm... does changing a bone length in one frame change it in other frames too? This might be very useful...

Matt Weir
Member #7,476
July 2006
avatar

Quote:

so long as the animations are preserved, and just replacing the skins in one frame does it globally to all the other frames...

That's exactly how it works. Only 1 skin per bone but the skin can have infinite animation frames and infinite frame sets.

Quote:

does changing a bone length in one frame change it in other frames too? This might be very useful...

I decided against doing that as a default action because quite often I use different bone lengths in frames as special effects. A hand can squeeze a trigger, guns have moving parts etc. Coupled with the skins having their own animations (eg. blinking lights, gun muzzle flash) you can get some nice stuff happening. There is a function in the menu to 'Normalise Bone Lengths' though which takes the current frame and makes all the bone lengths in every frame the same. I'll also put in 'Normalise Selected Bone Length' to do the same but just with a single bone. I am however avoiding the feature creep scenario by not writing any features until I actually need them for the moment... ;)

Richard Phipps
Member #1,632
November 2001
avatar

 1   2 


Go to: