Author Topic: 1st p. view with cockpit?  (Read 9089 times)

0 Members and 1 Guest are viewing this topic.

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
1st p. view with cockpit?
well, would be cool to have the padlock already ( you kow, you lock a ship, and the pilot turns the head to follow this fighter, so your target always stay in the middle of the screen ), now that would be great.
SCREW CANON!

 
1st p. view with cockpit?
That would be really cool!
Imagine to have an option where the view always follows the target( found in all real simulators)!!!!!
When will I learn?  The answer to life's problems aren't at the bottom of a bottle, they're on TV! -- Homer,  "There's No Disgrace Like Home''
I sometimes find myself here on this forum, late at night constantly pressing "Reload" over and over again

 
that kinda view would be somewhat difficult to create. it requires rewriting the complete camera code because of two-var camera need. U should create straight-forward camera target for world (space) interaction (collision detection) and one just for the movable view.

saw that in independence war code. it's just too complicated.
it's easier and probably would suffice just to use some new animated mesh format and process it on it's own.
Serious Sam (I'm familiar with some of the code) uses similar system.

or Would it just be enough to use standard fs format and forget about that 'helmet' system.?
live long & prosper!

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
1st p. view with cockpit?
Iluvathar...you telling me that you plan to use Clodai 2 engine for that FPS?
Which reminds me...have the sketches...will drop by your place and show them to you!:D
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Quote
Originally posted by Iluvathar
that kinda view would be somewhat difficult to create. it requires rewriting the complete camera code because of two-var camera need. U should create straight-forward camera target for world (space) interaction (collision detection) and one just for the movable view.

saw that in independence war code. it's just too complicated.
it's easier and probably would suffice just to use some new animated mesh format and process it on it's own.
Serious Sam (I'm familiar with some of the code) uses similar system.

or Would it just be enough to use standard fs format and forget about that 'helmet' system.?


I don't understand... since there's already a "cockpit" view that you can control, wouldn't it be possible to link that one to the target, and let the controls handle the ship?

and since it's cool, I think no, it wouldn't be enough. or we can just trash the SCP coz after all FS2 was way enough.
bah.
SCREW CANON!

 

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
1st p. view with cockpit?
How about the cockpit in SW-Alliance?
It could be done like that....

Anyway, we all agree that the biggest problems would be the cockpit guages and the free look..
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
1st p. view with cockpit?
I'm obviously not understanding your objections to why the padlock view wouldn't work, Iluvathar. Could you explain in clearer detail?
[I am not really here. This post is entirely a figment of your imagination.]

 
well... it's just too ccomplicated.
Let's try the simple way:
I was trying to say that we can always add static cockpit view, because fs is made that way. There are no smooth sliding camera.
The code internally mostly uses ROTATION MATRICES so there a problem shows up. The problem is called GIMBLE LOCK. That's why there are just static cameras (180deg max). Creating padlock view or want hat-controled in-cockpit camera would require using of QUATERNIONS. Quaternions would make possible cockpits like those in IL2 sturmovik and Falcon 4.0.

Well... that's it. Just know that creating such a cockpit u want is really a BIG BIG job.

Sorry.

I must point I'm not sure completely about the particular problem in detail, but I'm sure it doesn't work because I've tried.:-(

uhhh...
live long & prosper!

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
1st p. view with cockpit?
you mean the hamilton complex-type quaternions? :wtf: I didn't even know those are used anywhere... :p

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
1st p. view with cockpit?
i did a search of gametutorials.com and this came up

Quote

Around the eighteenth century, a man named W. R. Hamilton discovered quaternions and that
 they could be used as a 4D extension to complex numbers. Following this discovery, it was
 proven that quaternions could also be used for rotations and orientations in three dimensions.
 It wasn't until 1985 that quaternions were used in computer graphics.

 In essence, quaternions are used for rotations.  One of the most popular applications for
 quaternions is in character bone/skeletal animation.  Think of a quaternion as a 4D vector:

 q = (x, y, z, w)    or    q = w + xi + yj + zk   i,j and k being imaginary numbers
 
 Another representation of a quaternion is:
 
 q = [w, v]
 
 "v" represents a vector (x, y, z), and "w" is a scalar.  Just when you think you are
 starting to understand what a quaternion is, a stumbling block is placed in front of you.
 That is, you can't think of the vector (x, y, z) as a 3 dimensional vector, but a vector
 in 4 dimensions.  You can't visualize this because we can't really comprehend a fourth
 dimension.  This is one of those things that you need to just accept, and move on (while  
 playing Quake 3 and barreling your rail gun into your opponent's chest, which if it happens
 to be the Angelina Jolie version of Lara Croft, a big one at that).

 When talking about quaternions, I will be using the first representation.  Before I go
 on to more of the math, I will address the reasons why we use quaternions.
 
 Before quaternions, Euler Angles were primarily what was used to represent a rotation.
 Euler angles are defined as an angle for each axis like so:

 (x, y, z) or (yaw, pitch, roll) or (heading, pitch, roll)

 These are the same, just different representations.  "Heading" is sometimes preferred
 to "yaw" because of the Y abbreviation which confuses yaw with the y-axis.  Each angle
 has it's own rotational matrix.  That means, if each axis rotation is written with matrices
 B, C, and D, then the general matrix A can be defined as:

 A = BCD

 with B C D described as:

 B = [  cos(yaw) sin(yaw) 0 ]    C = [ 1       0            0 ]  D = [  cos(roll) sin(roll) 0 ]
      [ -sin(yaw) cos(yaw) 0 ]        [ 0  cos(pitch) sin(pitch) ]      [ -sin(roll) cos(roll) 0 ]
      [  0        0        1 ]        [ 0 -sin(pitch) cos(pitch) ]      [  0         0         1 ]

 Keep in mind that the order that the matrices are multiplied together is important.

 The famous problem with euler angles is the potential for gimbal lock.  This happens
 when a rotation "overrides" another rotation, which limits your degrees of freedom.
 Quaternions solve this problem, as well as allow a smooth rotation when interpolating
 between 2 rotations.  Though axis angle rotation may not suffer from gimbal lock, when
 interpolated, they can cause unnatural abrupt movements between the rotations.  One of the
 simplest form of quaternion interpolation is called:

 SLERP (Spherical Linear Interpolation - Strange acronym isn't it?)

 When would we need to interpolate between rotations?  Like I mentioned above, the perfect
 example is when doing bone animation.  Each key frame is usually stored with a rotation
 matrix, which can be converted to a quaternion.  If you have the current frame and the
 next frame's rotation stored in a quaternion, the interpolation can easily be performed,
 which will result in a new interpolated quaternion, depending on time t of course.  Check
 out the MD3 Animation tutorial on our site to see an example of SLERP in action.

 There are many aspects that deal with quaternions, but we will only focus on
 converting an angle axis rotation to a quaternion, then converting a quaternion to
 a rotational matrix to be applied to the current model view matrix.


i thought there was already some of this quater-whatever in the vector math libraries in the fs2 source

edit: CP did you get that pm?
« Last Edit: June 05, 2003, 10:54:06 pm by 31 »
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
1st p. view with cockpit?
If there is, cool.  But in the ship rotation code and in FRED2's background editor, it uses Euler angles.
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
1st p. view with cockpit?
First, gimbal lock is when you get two out of your three axes lined up due to over-rotation on one of them. You see this a lot in 3d animation (during bone work, for example) and modelling during object-centered camera rotations. It doesn't really apply here.  That's a red herring. If you were really concerned with it, automatic unlocking of the pad during over-rotation conditions (people just can't turn their heads too far) and returning to the normal forward view would solve the problem.

As for the necessity to rewrite the engine using quaternions--um no. It would certainly make things easier for some operations, absolutely. But they are NOT required.

Seriously, implementing padlock views would require some work, but it would not require a complete overhaul of the engine codebase. But hey, what do I know?
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Quote
Originally posted by Iluvathar
hat-controled in-cockpit camera


didn't I tell you a couple times already that this is already in FS2?
I love when people blatantly ignore me :p
SCREW CANON!

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
1st p. view with cockpit?
Quote
edit: CP did you get that pm?


Did you send me a pm? It sometimes fails to notify me when I have recieved one; let me go check manually...

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
1st p. view with cockpit?
just incase you didn't (my pm's have a way with dying sometimes)

check this bug, i have a proposed fix: http://fs2source.warpcore.org/bugzilla/show_bug.cgi?id=81
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline aldo_14

  • Gunnery Control
  • 213
1st p. view with cockpit?
The HUD code treats the screen element (radar, et al) as if they were 3D planes, doesn't it?  Couldn't you adapt it (specifically the code for loading the LOD1 model into the bottom LHS) to display a large cockpit pof model in a similar way?  Sure, you'd only see it looking straight forward, but it could be start.... personally, I'd rather keep the gauges et al shown as if they were projected on the pilots view - as, if you treat them as part of the cockpit you either have to chop off half the screen, or show very little cockpit (only the small bars on the glass display thing).

Plus, if you encoded the cockpit in a similar vein to the HUD guages, couldn't you turn it off in a similar way?

 
... (RE:mikhael & venom)
mikhael: well.. u're maybe right..
venom: sorry, didn't see tha post. I know now:-)
live long & prosper!

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
1st p. view with cockpit?
Quote
Originally posted by aldo_14
The HUD code treats the screen element (radar, et al) as if they were 3D planes, doesn't it?  Couldn't you adapt it (specifically the code for loading the LOD1 model into the bottom LHS) to display a large cockpit pof model in a similar way?  Sure, you'd only see it looking straight forward, but it could be start.... personally, I'd rather keep the gauges et al shown as if they were projected on the pilots view - as, if you treat them as part of the cockpit you either have to chop off half the screen, or show very little cockpit (only the small bars on the glass display thing).

Plus, if you encoded the cockpit in a similar vein to the HUD guages, couldn't you turn it off in a similar way?


well, something like in wing co prophecy would be cool for a start ( there's just a model, it has no gauges or anything, it's just for the "feeling" ).
SCREW CANON!