X-Wings anyone? ...finished and textured

More
20 years 6 months ago #9276 by Sivadrake
somewhere on this forum i read something about animation channels and someone wanting to have an antenna array that unfolded itself, the replier(maybe nathankell) to the post(no idea who) stated that in EoC the best you could do would be *bam* and its there unfolded and all. they said something about how EoC only has two animation channels for movement of ship parts, or avatars, or something like that, im not sure its been awhile since ive read it, but i was thinking that the wings for the X-wing would fall under the same category, and that they would just pop into position when a keybind was hit. i hope thats not the case, but even having it like that would be more cool than just nothing, but then im not the one having to do all of the work for this:D

"Dust to dust we're wired into sadness"

"Dust to dust we're wired into sadness"

Please Log in or Create an account to join the conversation.

More
20 years 6 months ago #9278 by Second Chance
Ok, a couple of important points to note here.

First...

The thrust/tug type scales off the engine data; meaning the keyframes only provide targets for 0 (no thrust) and 1 (max thrust). The percentage of thrust used determines the animation for the tug engines.

This is actually exactly what we want. The animation itself does not scale off the engine data. The engine data simply provides Flux with a current power application figure (between 0.0 and 1.0) and this is used to set the animation channel value. We want this same control over the incremental values so that we can decide how quickly the animation moves in one direction or the other. Meaning, simply, that we set the incremented values directly as opposed to basing them on the engine thrust data. But the end result is that we can have a function with a loop that increments or decrements the channel value over a specified period of time (how long the wings should take to open and close). I'm pretty sure this is correct because it's fairly typical of game design, but if someone knows better please make your voice heard!

Next...
I haven't even thought about what we're going to do about an animated collision hull. [xx(] We may end up having to make the wings subsims with their own hulls, if that's possible.

And finally...
There's also the matter of the setup scene and where the guns are placed. I know how to reference an external LW scene from within a given LW scene (I like this feature of EoC) so I might be able to link the position of the gun nulls to the wing animation. But I'll have to think about it, which I haven't yet.

We're charting new territory here so there's probably going to have to be a lot of experimentation. Forward Ho!

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.

More
20 years 6 months ago #9280 by Shane

somewhere on this forum i read something about animation channels and someone wanting to have an antenna array that unfolded itself, the replier(maybe nathankell) to the post(no idea who)...

Heh, heh. That was Nathan Kell holding newbie-Shane's hand. I didn't know a point from a vertex then. ;) Now I only get them confused occasionally. :p :D

I haven't even thought about what we're going to do about an animated collision hull. We may end up having to make the wings subsims with their own hulls, if that's possible.

Interesting. Make 'em icTurret? Those have prebuilt rotational channels which you can set limits to. But how to direct them with POG? I wonder if there's a way to switch out turret systems via POG? Then you could create 8 turrets with different stow headings (4 for open, 4 for closed) and switch the turret models when needed.

God, how's that for kludge? :D

If all else fails, you could resort to an iDirector sequence or even a bink movie sequence for the wing animation. A quick LW animation with a high-poly model which does not show too much background (get real up-close with the camera work) while changing out the models behind the player's back.

As far as the collision hull; might be best to split the difference between the forms. The X-Wing is so small, you might not be able to tell the difference.

Just a few wild ideas. :D

<Edit> Oops. The movie or iDirector won't work. The AI X-Wings would still need animation. [:(]

Ah well...


<font size="1"><font face="Book Antiqua"><font color="black">"Never before in the history of the world had such a mass of human beings moved and suffered together. This was no disciplined march; it was a stampede-- without order and without a goal, six million people unarmed and unprovisioned, driving headlong. It was the beginning of the rout of Civilisation... of the massacre of Mankind."
--H. G. Wells The War Of The Worlds</font id="black"></font id="Book Antiqua"> </font id="size1">

Please Log in or Create an account to join the conversation.

More
20 years 6 months ago #9281 by MajorTom

Originally posted by Second Chance

But the only way we'll know for sure is to try it. I'll set up all the X-wing scenes tonight (with animation, of course :)) and send them to you. I'll explain what I did for animation channels and then you can experiment with getting them to respond to your commands. Sound good?


Right on! If I had a nickel for every time I've tried something while modding I'd be rich and never have to work again! :D

I'll try different time scaling approaches to see how they work (and give the animation a different sound for closing and opening). If it has to be coupled to thrusters we could perhaps make it so that the wings are open by default and if the player pushes thrust override (W) the wings will close automatically?

I agree with Shane on the c_hull issue. The ship is so small you won't notice. The icTurret solution probably won't work here because you can't select them as a weapon. Maybe we can just put the firing position for the weapons (nulls) in the middle of the two positions (like with the c_hull). The ships are so small that you won't notice from a distance of about 1 km or more anyhow

I'll post a movie of it, as soon as we can get it to work (however that may be).




Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
20 years 6 months ago #9284 by Second Chance
I'm having some trouble with the avatar scenes. For some reason the wings don't show up on the high lod model. They show up fine for the mid and low lod models, just not the high. I'm going to have to reprocess all the lwo objects into pso's again anyway, since my idea of just flipping and mirroring the textures for different parts of the model didn't work (the LW 5 objects flipped them all back). So 3/4 of the wing textures don't line up anymore. :(!

MajorTom, didn't you say once that the HUD target model was the collision hull? If that's the case then I'm going to make the X-Wing's collision hull with the wings open, so it shows up right in the HUD.

Also, I didn't mean to imply that the animation had to be tied to the thrusters. I was just using the thrusters as an example. You should be able to exercise total control over the animation from Pog. I just meant to indicate that we wanted the same level of incremental control over the animation.

It also occurs to me that the player shouldn't be firing the guns with the wings closed anyway. So I think I should just put the gun nulls where they should be with the wings open and maybe you could prevent the guns from firing until the player opens the wings.

I really like your idea of adding sound to the wing animation. If you could get a gear-like whirring noise like in the movie that would totally rock! [8D]

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.

More
20 years 6 months ago #9287 by MajorTom
YooHoo! Changing speed on the fly works!!!

here's the pog for the function:
Code:
ToggleFlightProperties() { hship player=iShip.FindPlayerShip(); float speed_rate = Sim.Speed( player ); debug { Debug.PrintString( "SWMOD: current Switch Status is: " ); Debug.PrintInt( Global.Int("mt_wing_status") ); Debug.PrintString( " \n" ); Debug.PrintString( "SWMOD: current speed is: " ); Debug.PrintFloat( speed_rate ); Debug.PrintString( " \n" ); } switch ( Global.Int("mt_wing_status") ) { //slow him down when airfoils are deployed case 0: Global.SetInt( "mt_wing_status", 1 ); // First, make sure only the X-Wing can do this! if ( !Sim.FindSubsimByName(player, "Cargo_Airfoils") )break; //Tell the server so it can propogate the status to other players iMultiplay.ClientSendUserMessage( 66, player, none, "Opening Airfoils" ); iMultiplay.ChangeMaxSpeed( player, 0.9 ); Stream.Play( 0, "wav:/audio/sfx/open_wings", 0, 0 ); Task.Sleep( Task.Current(), 1 ); break; //speed him up when airfoils are closed case 1: Global.SetInt( "mt_wing_status", 0 ); // let everyone know about this event too iMultiplay.ClientSendUserMessage( 67, player, none, "Closing Airfoils " ); iMultiplay.ChangeMaxSpeed( player, 1.11111111 ); Stream.Play( 0, "wav:/audio/sfx/close_wings", 0, 0 ); Task.Sleep( Task.Current(), 1 ); break; break; // default break for wierd unexpected stuff }// end switch }// end ToggleFlightProperties [b]Debug looks like this:[/b] SCRIPT&#058; &#91;unknown&#93; SWMOD: current Switch Status is: 0 SCRIPT&#058; &#91;unknown&#93; SWMOD: current speed is: 1380 FLUX: &#91;unknown&#93; User Message received: id=16782779 id2=0 type=66, data="Opening Airfoils " SCRIPT&#058; &#91;unknown&#93; SWMOD: current Switch Status is: 1 SCRIPT&#058; &#91;unknown&#93; SWMOD: current speed is: 1242 FLUX: &#91;unknown&#93; User Message received: id=16782779 id2=0 type=67, data="closing Airfoils " SCRIPT&#058; &#91;unknown&#93; SWMOD: current Switch Status is: 0 SCRIPT&#058; &#91;unknown&#93; SWMOD: current speed is: 1380 FLUX: &#91;unknown&#93; User Message received: id=16782779 id2=0 type=66, data="Opening Airfoils " SCRIPT&#058; &#91;unknown&#93; SWMOD: current Switch Status is: 1 SCRIPT&#058; &#91;unknown&#93; SWMOD: current speed is: 1242 FLUX: &#91;unknown&#93; User Message received: id=16782779 id2=0 type=67, data="closing Airfoils " SCRIPT&#058; &#91;unknown&#93; SWMOD: current Switch Status is: 0 SCRIPT&#058; &#91;unknown&#93; SWMOD: current speed is: 1380 FLUX: &#91;unknown&#93; User Message received: id=16782779 id2=0 type=66, data="Opening Airfoils " SCRIPT&#058; &#91;unknown&#93; SWMOD: current Switch Status is: 1 SCRIPT&#058; &#91;unknown&#93; SWMOD: current speed is: 1242

Originally posted by Second Chance

MajorTom, didn't you say once that the HUD target model was the collision hull? If that's the case then I'm going to make the X-Wing's collision hull with the wings open, so it shows up right in the HUD.

I think its the size of the HUD target model that's determined by the c_hull (how it's scaled to fit the target window). I dunno if that goes for the actual wireframe model too, it could use the avatar for that? we'll have to try and see. regardless, I agree the c_hull should be with wings opened.


It also occurs to me that the player shouldn't be firing the guns with the wings closed anyway. So I think I should just put the gun nulls where they should be with the wings open and maybe you could prevent the guns from firing until the player opens the wings.


No problem! we can add a iSim.LockDownWeapons and iSim.WeaponTargetFromContactList to the appropriate switch cases.

But you'll have to reverse the KeyFrames I think because
we'll need to have the ship spawn with wings open, otherwise a player might not figure out why his weapons don't work when he starts off (I can just mirror the switch functions shown above to comply with that)

I really like your idea of adding sound to the wing animation. If you could get a gear-like whirring noise like in the movie that would totally rock! [8D]

I've got a fairly good, useable sound out of the stock EOC game for now.

I'm a little worried about Lucas or whoever claiming copyright infringements if we use copies of original sounds?

For me thats an important issue we should discuss and resolve too!

Edit:
changed the position of the call to set the global for the switch.
It should be the very first call in the switch case. (so the function can't run twice if the player hits the key multiple times)
/Edit

Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.