Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Author Topic: [Tip] Aircraft's origin point.  (Read 5914 times)

Levi

  • Hero Member
  • *****
  • Posts: 580
  • Outerra Supporter
    • Outerra Mods Site!
[Tip] Aircraft's origin point.
« on: July 20, 2014, 04:16:45 am »

Hello all!
Today I want to share with you a simple solution for a problem that frustrated me this morning.

The problem:
I set the aircraft's pivot point at desired location (where the CoG is), placing it at scene's origin (0, 0, 0). Then, imported in Outerra (via FBX importer), the moments/flight dynamics and exterior cameras, have the origin on center of the model's bounding box, not where I specified. I also tried changing 'AERORP', 'VRP', 'CG' and the weights in FDM, with no luck. Interestingly, the interior camera has it's origin where my pivot point is :-\. In the picture below you can see where Outerra is placing the Origin.


The solution:
Knowing that the origin point will be placed on center of the model's bounding box, I simply created a square box at scene's origin (0, 0, 0), making sure that the aircraft is actually inside that box, then I put a transparent and non reflective material on it, and the problem is gone :)


Maybe the problem is only tied to FBX importer and/or airplanes.

I hope this info will be useful for some of you too :)
Logged

bomber

  • Hero Member
  • *****
  • Posts: 503
  • newbie
Re: [Tip] Aircraft's origin point.
« Reply #1 on: July 20, 2014, 06:35:43 am »

A bit confused as I can't work out from your explanation If this is a camera, 3d modelling or FDM issue.

If it's a camera problem, shouldn't it be repositioned at the pilots head position ?

If it's a modeling issue then i suggest aligning the models 0,0,0 point at the FDM's datum point...

FDM's datum point I suggest standardizing the X axis (longtitudenal or 3d max Y axis) on the pilots position.

Simon.

Also be aware your image shows 3d max's co-ord system as being 'left hand rule'.... JSBsim uses 'right hand rule'...  What co-ord rule does Outerra use ?
Logged
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchell

Levi

  • Hero Member
  • *****
  • Posts: 580
  • Outerra Supporter
    • Outerra Mods Site!
Re: [Tip] Aircraft's origin point.
« Reply #2 on: July 20, 2014, 07:24:34 am »

I guess the issue is more like about how Outerra imports the 3D model for airplanes use, because as as said before, the origin for FDM and exterior cameras is not where I set it in 3Ds Max, but is placed on the center of model's bounding box.

Also, I'm not sure what exactly datum is, but I don't see any value for it in FDM. Isn't it the VRP (visual reference point)? Anyways, I use to set 'AERORP', 'VRP', 'EYEPOINT' and CG at 0,0,0.

3Ds Max and Outerra's co-ord system are the same, +Y Forward.

Max/Outerra, +Y == -X in FDM.
Max/Outerra, +X == +Y in FDM.
Max/Outerra, +Z == +Z in FDM.
Logged

bomber

  • Hero Member
  • *****
  • Posts: 503
  • newbie
Re: [Tip] Aircraft's origin point.
« Reply #3 on: July 20, 2014, 07:47:21 am »

A datum point is a point from which another object is measured from.... It can be anywhere.

I appreciate the above sentence doesn't help but it's important to understand that theres no value defined for it, there are only values for how far other objects are away from it.

JSBsim uses the pilots point mass position as the initial away from it reference.

Also theres a problem using the CoG of a plane, as the CoG moves during the course of a flight, with reduction of 'usable' materials, such as fuel, oil, bombs, ammo, even cargo if it's dropped.

VRP is used by JSBsim, I don't know if it's used by Outerra.. but my guess is that as there's more than one camera position it's in this code that the work needs to be done to align a internal camera with a plane.

On a side note, how is it expected that a 'player' jump to different positions in a plane, such as the gunners, bombaimers, navigators etc... Does Outerra have defined positions in a vehicle with defined camera positions and user controls ?

If not something to work on....
Logged
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchell

PytonPago

  • Hero Member
  • *****
  • Posts: 2254
  • It´s way too complex, dont let me try to explain !
Re: [Tip] Aircraft's origin point.
« Reply #4 on: July 20, 2014, 08:25:14 am »

A datum point is a point from which another object is measured from.... It can be anywhere.

I appreciate the above sentence doesn't help but it's important to understand that theres no value defined for it, there are only values for how far other objects are away from it.

JSBsim uses the pilots point mass position as the initial away from it reference.

Also theres a problem using the CoG of a plane, as the CoG moves during the course of a flight, with reduction of 'usable' materials, such as fuel, oil, bombs, ammo, even cargo if it's dropped.

VRP is used by JSBsim, I don't know if it's used by Outerra.. but my guess is that as there's more than one camera position it's in this code that the work needs to be done to align a internal camera with a plane.

On a side note, how is it expected that a 'player' jump to different positions in a plane, such as the gunners, bombaimers, navigators etc... Does Outerra have defined positions in a vehicle with defined camera positions and user controls ?

If not something to work on....

  The other positions would be good, if there was a camera mode that could be bound to a certain mesh origin point, so rotations and movements could be related without much math stuff given into the coordinates of the camera. There was a discussion about it some whyle ago ... it should be implemented in the future (maybe with some other camera mods too) ...

  Also, im not much sure if aircrafts (or vehicles) changing mass works in the alpha yet. There should be too some inter-object bullet phys. interactions be added, (like some cargo objects affecting the vehicle - now, just importing objects like vehicles simply just with mass parameters would work partially).
  But devs. have some biome/cloud/lighting work on the menu now. Doe, they're come in time slowly one after another ...
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

bomber

  • Hero Member
  • *****
  • Posts: 503
  • newbie
Re: [Tip] Aircraft's origin point.
« Reply #5 on: July 20, 2014, 08:31:49 am »

Still conscious that the explanation I've given is confusing...  ok so lets look at the flight model for your plane.

   <htailarm  unit="FT" >   36.59 </htailarm>

JSbsim uses this value for a part of it's moment calcs... 36.59ft equals 11.15m. So it I took a tape measure and measure 11.15m from the centre of the h-stab forward towards the nose at 11.15m is where your datum point is...

Now you also stated where your CoG is...

   <location name="CG" unit="M">
     <x> -4.00 </x>
     <y> 0.00 </y>
     <z> -1.319 </z>
   </location>

So this tells me because it's a negative that the CoG is 4m forward of the datum point.

Also there's a nose wheel..

  <contact type="BOGEY" name="NOSE">
   <location unit="M">
     <x> -7.586 </x>

So slowly you're defining where everything is in relation to a single point... but where is that single point on YOUR 3d model that you have ? How do you align the flight model with it's graphical representation ?

Some flightsims allow you to translate and rotate the 3d model upon insertion to align with the fdm, I don't know how outerra works on that area as yet... but why make it hard on yourself ?

Go back to your 3d model and move it so that the centre of the h-stab in the Z axis is -11.15m and the nose wheel is +7.586m

If they don't match up... your fdm and your 3d don't align..

Logged
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchell

bomber

  • Hero Member
  • *****
  • Posts: 503
  • newbie
Re: [Tip] Aircraft's origin point.
« Reply #6 on: July 20, 2014, 08:39:51 am »



  Also, im not much sure if aircrafts (or vehicles) changing mass works in the alpha yet. There should be too some inter-object bullet phys. interactions be added, (like some cargo objects affecting the vehicle - now, just importing objects like vehicles simply just with mass parameters would work partially).

If using a JSBsim FDM it's all part of the JSBsim 'black box' package

  But devs. have some biome/cloud/lighting work on the menu now. Doe, they're come in time slowly one after another ...

Oh I'm not screaming for changes.... I've put the next 2 years aside for working in Outerra and seeing if I can get to where I want to go.
Logged
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchell

Levi

  • Hero Member
  • *****
  • Posts: 580
  • Outerra Supporter
    • Outerra Mods Site!
Re: [Tip] Aircraft's origin point.
« Reply #7 on: July 20, 2014, 09:24:19 am »

Still conscious that the explanation I've given is confusing...  ok so lets look at the flight model for your plane.

   <htailarm  unit="FT" >   36.59 </htailarm>

JSbsim uses this value for a part of it's moment calcs... 36.59ft equals 11.15m. So it I took a tape measure and measure 11.15m from the centre of the h-stab forward towards the nose at 11.15m is where your datum point is...

Now you also stated where your CoG is...

   <location name="CG" unit="M">
     <x> -4.00 </x>
     <y> 0.00 </y>
     <z> -1.319 </z>
   </location>

So this tells me because it's a negative that the CoG is 4m forward of the datum point.

Also there's a nose wheel..

  <contact type="BOGEY" name="NOSE">
   <location unit="M">
     <x> -7.586 </x>

So slowly you're defining where everything is in relation to a single point... but where is that single point on YOUR 3d model that you have ? How do you align the flight model with it's graphical representation ?

Some flightsims allow you to translate and rotate the 3d model upon insertion to align with the fdm, I don't know how outerra works on that area as yet... but why make it hard on yourself ?

Go back to your 3d model and move it so that the centre of the h-stab in the Z axis is -11.15m and the nose wheel is +7.586m

If they don't match up... your fdm and your 3d don't align..

Always, my reference point which I use to measure any distance, is where the model's pivot point is (it uses to be where the CG is), which is always at 0,0,0 in the Scene.
On that point I put the CoG, AERORP, EYEPOINT (I know this is used to specify where G-forces are computed for the pilot, but I don't need this for now) and VRP.
Sometimes I modify the CG to find the right balance. On the A380 I'm working on, I have the CG right on the center at 0,0,0 and I moved the Payload to find the right balance. The fuel tanks being places approximately where they are in real life.

This way I have the graphical representation perfectly aligned with FDM. I made some tests before with the wheels and Structure collision points, and they do align with the 3D model.

So, my datum is at 0,0,0, being right in the center of my model's bounding box.

Btw, I haven't touched the metrics for 'htailarm' and 'vtailarm', but seems to match their current metrics (but not perfectly) if measured longitudinally from 0,0,0. Are those measured longitudinally from the datum?
Logged