Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Unknown Target on April 29, 2002, 02:00:53 pm

Title: Has someone implemented....
Post by: Unknown Target on April 29, 2002, 02:00:53 pm
Animations yet!?!
Someone should really do it! I want it for a project I'm doing ;), but I can't program :(
Title: Has someone implemented....
Post by: heretic on April 29, 2002, 02:03:57 pm
you mean for ships?
Title: Has someone implemented....
Post by: Colonol Dekker on April 29, 2002, 03:13:44 pm
As far as i knoew, You see ani-textures in every single mission.. "cough -THRUSTERS-cough" Isn't it a matter of making a skin with ani-'d blinky lights / pilot waving out a cockpit and sticking it on ? :headz:
Title: Has someone implemented....
Post by: Nico on April 29, 2002, 03:21:11 pm
Quote
Originally posted by Colonol Dekker
As far as i knoew, You see ani-textures in every single mission.. "cough -THRUSTERS-cough" Isn't it a matter of making a skin with ani-'d blinky lights / pilot waving out a cockpit and sticking it on ? :headz:


no.
Title: Has someone implemented....
Post by: EdrickV on April 29, 2002, 03:27:16 pm
Quote
Originally posted by Colonol Dekker
As far as i knoew, You see ani-textures in every single mission.. "cough -THRUSTERS-cough" Isn't it a matter of making a skin with ani-'d blinky lights / pilot waving out a cockpit and sticking it on ? :headz:


I haven't looked through the whole thruster code, but I do know that in the code that loads the textures if it sees "thruster" or "invisible" in a texture name that it will not try to load the textures. They're handled somewhere else.
To map animations onto a model as textures, we'd probably have to insert our own special case code and specify a string for it to search. For example: If ani maps are named animap- have it search for "animap-" within the texture name. If so handle it with special code modified from whatever code actually draws thrusters. And incidently, explosions are also anis. But mapping an ani to a model normally does not work just yet. Unless someone's edited that feature into their own copy.
(Warp holes are another special case, the pof isn't even texture mapped.)
Title: Has someone implemented....
Post by: Unknown Target on April 29, 2002, 05:54:31 pm
No, like having a ship actually have a moving part. For instance, in Homeworld. some ships have opening missle bays, or rotating parts, I mean like that;)
Title: Has someone implemented....
Post by: EdrickV on April 29, 2002, 06:58:25 pm
Quote
Originally posted by Unkown Target
No, like having a ship actually have a moving part. For instance, in Homeworld. some ships have opening missle bays, or rotating parts, I mean like that;)


Rotating parts do exist, though you don't really control them. Other moving part things probably won't be put in for a while. That'd be a complicated mess and would probably require modifications to the POF format and programs which edit it. But Kazan wants to do stuff like that, as he mentioned previously in one of the FSF threads.
Title: Has someone implemented....
Post by: penguin on April 29, 2002, 08:20:48 pm
Quote
Originally posted by EdrickV


I haven't looked through the whole thruster code, but I do know that in the code that loads the textures if it sees "thruster" or "invisible" in a texture name that it will not try to load the textures. They're handled somewhere else.
To map animations onto a model as textures, we'd probably have to insert our own special case code and specify a string for it to search. For example: If ani maps are named animap- have it search for "animap-" within the texture name. If so handle it with special code modified from whatever code actually draws thrusters. And incidently, explosions are also anis. But mapping an ani to a model normally does not work just yet. Unless someone's edited that feature into their own copy.
(Warp holes are another special case, the pof isn't even texture mapped.)

The code to draw the thruster textures is in the ship_do_thruster_frame() routine (Ship/Ship.cpp:3566)  There's also a ship_do_weapon_thruster_frame() routine for missle thrusters.

Any subobject with 'thruster' in the name is treated this way (see Model/ModelRead.cpp:1496)

Hacking it to permit an ANI as a texture for any poly would be a little more complicated, since it's handled at the subobject level right now.  But since the code to draw and update an animated texture is already there, some cutting and pasting and minor tweaking might get you where you need to go.
Title: Has someone implemented....
Post by: EdrickV on April 29, 2002, 09:25:29 pm
Quote
Originally posted by penguin

The code to draw the thruster textures is in the ship_do_thruster_frame() routine (Ship/Ship.cpp:3566)  There's also a ship_do_weapon_thruster_frame() routine for missle thrusters.


Oy. That's a lot of code to render a single thruster frame for a single object. And that has to be done multiple times for each ship/weapon who's thruster glow you can see. I had a feeling it would do it frame by frame like that. (Saw something referencing it somewhere while looking for other stuff.) That submodel thing, and how the texture is actually "applied" will also raise the complexity of doing anis as textures. It doesn't really use the texture data in the model, and from what I've seen apparently doesn't apply the thruster ani to the submodel faces. Unless I missed something. In any event, it's up to other people to code that mess at least for now 'cause I can't compile it yet.