Trespasser supports Animation scripts!

Released! - TresCom Ops' TC Act 2 Archive Forum.

Moderators: scallenger, Hilwo, Kovu

Remdul
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 1845
Joined: Mon Jul 22, 2002 12:35 pm
Location: Holland, Europe

Post by Remdul »

Uh, did I miss anything? Just kidding.

Well that er...sounds AMAZING!! Lemme try that! :o

Good job Andres!!
Remdul
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 1845
Joined: Mon Jul 22, 2002 12:35 pm
Location: Holland, Europe

Post by Remdul »

Wow, that was great. That's just very very cool!

Rebel we got some work to do. :mrgreen:

I can think of tons of things we can use this for. Can it be used to animate dinos aswell?

Hell, I'll write a MaxScript tonight to export stuff from 3dsmax/gmax...

* Yeah, such a script might come in handy for complex animations. Like you said Andres, without a parent/child thing it might be hard to animate things like rotations. Using a lot of frames with a short interval will probably be accurate enough in most cases.

Dang, this thing is really really cool! No more circling pteros, but real flying ones. :)

Rebel, think you can make a dino that's not animated by AI, put it in a coma or something? I'd be neat to be able to animate a dino, or even other characters using the Tres' skin and bone system...

Imagine...a scriped fight between two dinos! :yum:

This thing is really opening new doors...this'll change everything!
Remdul
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 1845
Joined: Mon Jul 22, 2002 12:35 pm
Location: Holland, Europe

Post by Remdul »

Rebel, was that animation you included in view.zip different from the one Andres uploaded? It's only playing that one...maybe you accidently switched files?
User avatar
Rebel
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 6119
Joined: Sun Nov 10, 2002 10:26 pm
Location: That country nobody likes (you know the one)
Contact:

Post by Rebel »

Dinos not moving are subject to that stand-still pose, aren't they? Think that's as close to a coma as you can get them to be, Rem.

You can't run these scripts continuously though, can you? I mean, if for instance you used play animation scripts for a circling pterandon, you couldn't run thousands of frames, you'd need to either loop it, (int firecount = -1)restart animation or switch to another. Question is, is this a better method? That, I don't know! :?

My ideas were less grand: ingame-intro, crane movement, camera shot to vent system inside of ship, hint to escape cargo hold, etc. I of course am not the animation expert here, so no doubt my ideas are probably less ambitious.
User avatar
Rebel
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 6119
Joined: Sun Nov 10, 2002 10:26 pm
Location: That country nobody likes (you know the one)
Contact:

Post by Rebel »

Rem, yes it is different, but you need to 'delete' the test.asb file from the data folder before the engine will play the new script.
Andres
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 113
Joined: Thu Nov 14, 2002 8:35 pm
Contact:

Post by Andres »

Trespasser acts like a compiler - if there's not a binary version of an animation, Trespaser 'compiles' the ASCII version into a binary. But if the binary one already exists, it doesn't bother looking at the ASCII version.

That would be cool if we could have an animated dino fight with jumping etc. Set the position of joints and $Head object etc of a 'frozen' dino maybe. Or perhaps an animation will automatically override the dino movement. Hehe, from Remdul's enthusiasm, I suspect he might already be trying that now ;)
User avatar
Rebel
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 6119
Joined: Sun Nov 10, 2002 10:26 pm
Location: That country nobody likes (you know the one)
Contact:

Post by Rebel »

I can save him some time. If you try to use the script to force the dino's movements (if active dino for sure), the dino gets stretched out from its position and distorts into some freakish picture show.
Andres
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 113
Joined: Thu Nov 14, 2002 8:35 pm
Contact:

Post by Andres »

How did you force the dino's movements? Did you update the position of *all* joints and $ objects together?
User avatar
Rebel
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 6119
Joined: Sun Nov 10, 2002 10:26 pm
Location: That country nobody likes (you know the one)
Contact:

Post by Rebel »

Well, No! :lol:

I treated him like a pooch, picked him up by the scruff of the neck! I forced it as a single object; it was an instance.
Remdul
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 1845
Joined: Mon Jul 22, 2002 12:35 pm
Location: Holland, Europe

Post by Remdul »

Well, haven't tried yet (still playing with some basic stuff), but maybe the skin/joint stuff is not world axis, cos the vertices (thus joints) have to be moved locally (per mesh) etc.

Just guessing...

Andres, are there other codes which can be used in these animation scripts? Some other codes (like with t-scripts) hidden in the EXE?

* Never mind, I couldn't find any beside the ones you used in your sample file...
Last edited by Remdul on Mon Sep 08, 2003 8:48 pm, edited 2 times in total.
Andres
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 113
Joined: Thu Nov 14, 2002 8:35 pm
Contact:

Post by Andres »

lol. Interesting - that might explain why it looked funny, if the dino (skin) moved but the joints got left behind. But then you can teleport a whole dino at once using just the instance. Still, I think it might be worth someone trying to script the movement of joints.
User avatar
Rebel
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 6119
Joined: Sun Nov 10, 2002 10:26 pm
Location: That country nobody likes (you know the one)
Contact:

Post by Rebel »

Scripting joints would need to be extremely precise, wouldn't they? I don't think I can handle that job! :no:
Remdul
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 1845
Joined: Mon Jul 22, 2002 12:35 pm
Location: Holland, Europe

Post by Remdul »

Sounds like it.

I almost got that MaxScript finished (no big deal). Just gotta get camera's working (need to calculate rotation, MAX cams don't have that, just a target).

Btw, haven't played much with rotations but why 4 values for rotation (I hope it doesn't have to do with matrices cus my math sux)?

Gettin very late now, will post the script tomorrow. :)
Andres
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 113
Joined: Thu Nov 14, 2002 8:35 pm
Contact:

Post by Andres »

Matrices? No, this is far worse, they are quaternions! Actualy they are more intuitive than matricies in some ways, but best of all MAX has them built in so you shouldn't have to do any math at all. Quaternion is writtin to the script in "x y z w" order (depending on how MAX works you might have to use -w instead of w).
Remdul
-=TresCom Developer=-
-=TresCom Developer=-
Posts: 1845
Joined: Mon Jul 22, 2002 12:35 pm
Location: Holland, Europe

Post by Remdul »

Quaternions, yeah know about em, max returns rotations like that by default. DW must have used pretty much the same script I'm writing...

* Hmm, I tried both (x y z w) and (x y z -w) order but the camera spins about the z axis (viewing direction that is). Lemme quickly google up some info on quaternions, was going bump into these things sometime anyway... :)

* Crap. Still messing with the x y z w stuff, tried a lot of combinations and it didn't work...
Locked