Author Topic: Idea on Animation Via rotation :)  (Read 2964 times)

0 Members and 1 Guest are viewing this topic.

Offline aldo_14

  • Gunnery Control
  • 213
Idea on Animation Via rotation :)
I was actually thinking about this in the shower.... and although Bob's already working on it, I decided I might as well get some opinions on my thinking 'ere.  I know sod all of the FS2 code, and less of C++ so correct me please :)

Ok, assumptions;
1/ FS2 uses some sort of animation 'trigger' when starting the mission to start rotations.  Hoepfully, this can also be halted.  Also, this function (hopefully, again) is setup to use a 360 rotation - which can hoepfully be altered whent eh function is adapted.  Also, that the rotations in an FS2 model can be reversed in-mission.


My 'idea' (probably not original)

Firstly, rotations are specified by a 3rd value in the tbl for the physcial subsystem entry, defining a clockwise roatation in degrees (can be negative).  If this entry is present and correct (< +360 || >-360 degrees), the ship is 'flagged' as using special rotation when it is loaded into a mission.

The actual rotations are defined by a new funciton, which effectively rotaets the object for xx degrees (as defined in the tbl entry).  A single bit / value integer is used as a 'flag', to indicate the current status of the rotation.  I.e.  it's set to 0 when the object is at the start, and 1 when it is at the end of the rotation path.  this is used to define the 'next' rotation (so objects can go 'back' into position).  This is so the system can't be broken by using seperate methods to rotate forward and back.

  The standard properties for rot time, etc, defined in the pof are used for the speed of this movement.  

(It could be that FOV could be used instead of the previously mentioned tbl entry for the rotation params..depends on relative parsing speed, i guess).

An SEXP is 'hooked' onto the new function, to call rotations (using ship name and subsys name, and only when the subobject is not destroyed).  I'm not sure on the logistics of stopping a rotation and reversing it before it 'finishes' - some protection may be needed here.

Still obviosuly thinking of technical details, though.... not looked at the actual rotation code in FS2 yet, so I'm just throwing out ideas.

I should say, I'm just wanting opinions on my thinking here.... I'm not looking to step on anyones toes.

 

Offline Joey_21

  • 28
    • http://denebsystem.cjb.net/
Idea on Animation Via rotation :)
:confused: Lamens terms? :confused:

 

Offline an0n

  • Banned again
  • 211
  • Emo Hunter
    • http://nodewar.penguinbomb.com/forum
Idea on Animation Via rotation :)
Faustus panels spin left, Faustus panels spin right.
Faustus panels spin fast, Faustus panels spin slow.

Or expanded:
Faustus panels spin left, then Faustus panels spin forward.
Faustus panels spin fast, then Faustus panels spin slow.
"I.....don't.....CARE!!!!!" ---- an0n
"an0n's right. He's crazy, an asshole, not to be trusted, rarely to be taken seriously, and never to be allowed near your mother. But, he's got a knack for being right. In the worst possible way he can find." ---- Yuppygoat
~-=~!@!~=-~ : Nodewar.com

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Idea on Animation Via rotation :)
X-Wings 1 and 3 rotate clockwise, wings 2 and 4 rotate counter clockwise. Wings stop. ;7
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline aldo_14

  • Gunnery Control
  • 213
Idea on Animation Via rotation :)
Quote
Originally posted by Joey_21
:confused: Lamens terms? :confused:


i thought that was laymans terms.........

 

Offline Joey_21

  • 28
    • http://denebsystem.cjb.net/
Idea on Animation Via rotation :)
Eh.... I just can't visualize the concept... oh well... :doubt:

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Idea on Animation Via rotation :)
Quote
Originally posted by Joey_21
Eh.... I just can't visualize the concept... oh well... :doubt:


You can write this:
Quote
Originally posted by Joey_21
Bored with Window's Calculator? Click Here.



But you can't visualise THIS:
Quote
Originally posted by GalacticEmperor
X-Wings 1 and 3 rotate clockwise, wings 2 and 4 rotate counter clockwise. Wings stop. ;7


:wtf:
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Solatar

  • 211
Idea on Animation Via rotation :)
I actually downloaded that calculator. Loads more help than the windows one when I froget to bring home by regular calculator.

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Idea on Animation Via rotation :)
What hes getting at is adding contorllable S-Foils or whatever you want to the FS2 Engine (rotations are in pof data btw) :lol:
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Idea on Animation Via rotation :)
The game controls turret rotations, so making rotations you can control by SEXP should be possible. I haven't taken a look at the code to see how hard it would be to do though.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Joey_21

  • 28
    • http://denebsystem.cjb.net/
Idea on Animation Via rotation :)
Might I add that the calculator wasn't programmed with a real programming language. :rolleyes:

I did it in Visual Basic, sorry guys...... :D

Don't bother trying to explain it to me though, you'll just end up banging your head on the desk, so it's not worth the trouble. Just tell me if it ever gets in the source and I'll definately check it out. :D

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Idea on Animation Via rotation :)
from what I've looked into adding stuff to the object properties string isn't very hard, but the model animation system is quite conveluted, look at the OBJ2 section of the reading code
thing to remember the angs of a model subsytems are in radians (I think, 0-6.25)
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Joey_21

  • 28
    • http://denebsystem.cjb.net/
Idea on Animation Via rotation :)
Quote
Originally posted by Bobboau
from what I've looked into adding stuff to the object properties string isn't very hard, but the model animation system is quite conveluted, look at the OBJ2 section of the reading code
thing to remember the angs of a model subsytems are in radians (I think, 0-6.25)


That's 0 to 2pi isn't it? 6.28. Angle from degrees to radians is:
rads = degs*pi/180.

rads = 360*pi/180
360/180 = 2
2*pi = 2pi
rads = 2pi

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Idea on Animation Via rotation :)
yes
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Idea on Animation Via rotation :)
Just a little note, it's real easy to use angles in FS2 due to the following:
Code: [Select]
#define PI 3.141592654f
#define PI2 (3.141592654f*2.0f) // PI*2
#define ANG_TO_RAD(x) ((x)*PI/180)


You just use:
Code: [Select]

ANG_TO_RAD(angle)


The rotational code, particularly for turrets, is very complex though. The code seems to support continuous rotation and "stepped" rotation though. (The latter I'm not sure how to use yet as I've never heard of it in FS2 before.)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

  

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Idea on Animation Via rotation :)
look at the rahu (shivan gas miner) for an example of steped rotation
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together