Re: [Flightgear-devel] 3D Cockpit, cont'd

2002-03-20 Thread David Megginson

Andy Ross writes:

  That's exactly the idea.  You take a plane of instruments (what
  we're currently calling a panel XML file) and project it into 3D space
  via specifying corners.  It draws on top of the existing stuff, with
  no problems whatsoever.  If you want to have only one instrument per
  panel, that works fine.  Most (well, all) cockpits, though, have a
  bunch of flat boards with instruments mounted on them.  Call each one
  of those a panel and we're done.  All the work carries over
  automatically.
  
  The only code changes required are to allow the corner vertices to be
  specified in the configuration (/sim/panels[n]/bottom-left/x-m,
  etc...), and allow more than one panel to be created at once.  Maybe
  there's a need for a cockpit xml file to unify some of this.

I don't look at raw OpenGL all that often -- I guess I'll have to do a
bit of trig to figure out the transformation, given the corners.  If
you have even the slightest inclination to try this yourself, please
be my guest.

I do need to get the panel into a proper SSG scene graph some day
soon.


All the best,


David

-- 
David Megginson
[EMAIL PROTECTED]


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] 3D Cockpit, cont'd

2002-03-20 Thread Andy Ross

David Megginson wrote:
  Andy Ross writes:
   That's exactly the idea.  You take a plane of instruments (what
   we're currently calling a panel XML file) and project it into 3D
   space via specifying corners.  It draws on top of the existing
   stuff, with no problems whatsoever.  If you want to have only one
   instrument per panel, that works fine.  Most (well, all) cockpits,
   though, have a bunch of flat boards with instruments mounted on
   them.  Call each one of those a panel and we're done.  All the
   work carries over automatically.
  
   The only code changes required are to allow the corner vertices to
   be specified in the configuration (/sim/panels[n]/bottom-left/x-m,
   etc...), and allow more than one panel to be created at once.
   Maybe there's a need for a cockpit xml file to unify some of
   this.
 
  I don't look at raw OpenGL all that often -- I guess I'll have to do
  a bit of trig to figure out the transformation, given the corners.
  If you have even the slightest inclination to try this yourself,
  please be my guest.

You miss the point.  The code already *does* figure out the
transformation given the corners. :) The only thing you have to do is
fill in the corner coordinates to match the numbers you're already
generating in the model file.

It can be as simple as drawing a named quad to represent the panel in
the cockpit model, grabbing the coordinates from that manually and
typing them into the XML, or as complicated as providing the XML with
the symbolic name of the quad and having the panel work it out.  But
really, there's no math or rendering code required -- you just have to
fill in values for the a, b and c vectors in the panel
code. (Well, there's an axis swap involved -- these values are in
OpenGL screen coordinates, not model orientation, so X is left, Y up
and Z backwards).

I'd do this myself, but I'm clueless about cockpit authoring.  What
you have right now is as close as I could come without actually doing
cockpit design. :)

Andy

-- 
Andrew J. RossNextBus Information Systems
Senior Software Engineer  Emeryville, CA
[EMAIL PROTECTED]  http://www.nextbus.com
Men go crazy in conflagrations.  They only get better one by one.
  - Sting (misquoted)


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] 3D Cockpit, cont'd

2002-03-14 Thread David Megginson

Jim Wilson writes:

  Nice seats too :-)

I'm probably not going to be able to get away with such low poly
counts for the interior for long, but I don't want to fork the models
quite yet.


All the best,


David

-- 
David Megginson
[EMAIL PROTECTED]


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] 3D Cockpit, cont'd

2002-03-14 Thread William L. Riley

On Wednesday 13 March 2002 05:41, you wrote:
 I figured out how to tweak the view position in the (very rough) 3D
 cockpit, so that the runway is now visible during taxiing and
 takeoff.  As before, use

   fgfs --aircraft=c172-3d

 to try it out.

*de-lurk*
Very impressive! Thank you for this cool feature.

I took a hi-res screenshot and found something interesting. Obviously it 
doesn't look like this under normal conditions.
http://24.116.72.89/fgfs/fgfs_c172-3d_hires.jpg
Talk about your nightmarish instrument scans! ;) Excellent work on this, I 
had a blast puttering around KSFO and making myself dizzy.

Wm

*re-lurk*

-- 
William L. Riley
[EMAIL PROTECTED]

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] 3D Cockpit, cont'd

2002-03-14 Thread David Megginson

Andy Ross writes:

  Apropos of this stuff, David, you might want to look at panel.cxx and
  investigate parameterizing the panel location.  Right now, the panel
  is drawn in front of the viewer, with the top edge six degrees down
  from the center of the view and subtending 60 degrees of arc from side
  to side.  This is fine, as far as it goes, but the real design allows
  for plastering the panel into 3D space by defining three corner
  points.

I'd be thrilled for someone to take over the 2D panel code.  I think
that the future lies with the 3D cockpit, and I'm thinking of ways to
carry most of the current panel work over -- we should be able to keep
the current instrument XML files (which represent 99% of the work
invested) and project each instrument individually into 3D space.  I'm
not promising this next week or even next month (or next quarter, for
that matter), but we will need to be able to have different
instruments lying on different planes (i.e. the overhead panel, the
door panels, the center pedestal, etc.).  For bigger things, like
throttles and yokes, we'll probably use animated 3D objects.


All the best,


David

-- 
David Megginson
[EMAIL PROTECTED]


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] 3D Cockpit, cont'd

2002-03-14 Thread Andy Ross

David Megginson wrote:
  Andy Ross writes:
   Apropos of this stuff, David, you might want to look at panel.cxx
   and investigate parameterizing the panel location.
 
  I'd be thrilled for someone to take over the 2D panel code.  I think
  that the future lies with the 3D cockpit, and I'm thinking of ways to
  carry most of the current panel work over -- we should be able to keep
  the current instrument XML files (which represent 99% of the work
  invested) and project each instrument individually into 3D space.

That's exactly the idea.  You take a plane of instruments (what
we're currently calling a panel XML file) and project it into 3D space
via specifying corners.  It draws on top of the existing stuff, with
no problems whatsoever.  If you want to have only one instrument per
panel, that works fine.  Most (well, all) cockpits, though, have a
bunch of flat boards with instruments mounted on them.  Call each one
of those a panel and we're done.  All the work carries over
automatically.

The only code changes required are to allow the corner vertices to be
specified in the configuration (/sim/panels[n]/bottom-left/x-m,
etc...), and allow more than one panel to be created at once.  Maybe
there's a need for a cockpit xml file to unify some of this.

Andy

-- 
Andrew J. RossNextBus Information Systems
Senior Software Engineer  Emeryville, CA
[EMAIL PROTECTED]  http://www.nextbus.com
Men go crazy in conflagrations.  They only get better one by one.
  - Sting (misquoted)


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] 3D Cockpit, cont'd

2002-03-13 Thread Jim Wilson

David Megginson [EMAIL PROTECTED] said:

 I figured out how to tweak the view position in the (very rough) 3D
 cockpit, so that the runway is now visible during taxiing and
 takeoff.  As before, use
 
   fgfs --aircraft=c172-3d
 
 to try it out.
 

Nice seats too :-)

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel