Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Download Outerra Tech Demo. Unofficial Outerra Discord server, MicroProse Discord server for OWS.

Pages: [1] 2 3 ... 5

Author Topic: Model - JBSim guidance?  (Read 58770 times)

deathevor

  • Sr. Member
  • ****
  • Posts: 265
  • User
    • Sk-Films
Model - JBSim guidance?
« on: July 31, 2012, 04:31:35 pm »

Hi,

I'm working on one Jet Plane (3D Model) at the moment, that I wan't to contribute to Outerra.
As there is no model importer at the moment, I would like to find out the workflow to get the model ready to be used in your engine.

Could you please give a bit of guidance on this?

At the moment I have a 3D Max model and all elevators, rudders and ailerons are made as separate Mesh elements.
As I know Outerra will import COLLADA format - so should all elements be separate models or elements?
And what files (scripts to prepare) to control those elements and link whole model to JBsim?

Thanks
Logged
VFx Artist/Supervisor, Private Pilot - www.sk-films.com

Steve.Wilson

  • Full Member
  • ***
  • Posts: 176
  • Home Cockpit Builder
Re: Model - JBSim guidance?
« Reply #1 on: July 31, 2012, 06:08:19 pm »

Here you go, Sergei....  I'm in the same boat.  These links should help on the flight dynamics side.

http://jsbsim.sourceforge.net/aeromatic2.html

http://jsbsim.sourceforge.net/CreatingJSBSimAircraft.pdf

I'm still seeking knowledge about how to convert a textured 3DS model to Collada myself.  I agree that what you have so far is what's needed for the basic model, but I'm not sure how to rig the rotation/translation animations just yet.  This can be a thread where we gather references.....bound to be a hot topic when the importer is done later this year.....(right, Brano?  ;) )

Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Model - JBSim guidance?
« Reply #2 on: August 01, 2012, 02:20:24 am »

This is question for Angrypig, who's managing both the importer and the JSBSim linking. Expect an answer from him when he wakes up and caffeinates himself and wakes up for real :)

There will be a separate forum for models and importer, and after an initial period the info will be distilled into a wiki.
Logged

MiB

  • Jr. Member
  • *
  • Posts: 34
Re: Model - JBSim guidance?
« Reply #3 on: August 01, 2012, 04:01:34 am »

Expect an answer from him when he wakes up and caffeinates himself and wakes up for real :)

Maybe not the best translation from czech (: "Ať vstávám kdy vstávám, probouzím se v deset") but:
As http://en.wikipedia.org/wiki/Jan_Werich said: It doesn't matter when I get out of the bed - I wake up at 10.
Logged

deathevor

  • Sr. Member
  • ****
  • Posts: 265
  • User
    • Sk-Films
Re: Model - JBSim guidance?
« Reply #4 on: August 01, 2012, 06:32:14 am »

Thanks WarpeD for info.

As I know 3D Max, Blender (and major of 3d software) does export to Collada format (*.dae).
Never used it for myself, so can't tell much about textures - but based on models that I've seen in Collada format - the texture comes just as separate file(s). Basically the same as does 3ds.

Here's some examples of Collada models - http://ourbricks.com/khronos/colladarepository.

Just a question about this - http://jsbsim.sourceforge.net/aeromatic2.html
So as I understand as soon as JBsim file is generated, it just should be included in JBsim folder in outerra or to keep it with model?
Logged
VFx Artist/Supervisor, Private Pilot - www.sk-films.com

deathevor

  • Sr. Member
  • ****
  • Posts: 265
  • User
    • Sk-Films
Re: Model - JBSim guidance?
« Reply #5 on: August 01, 2012, 06:46:36 am »

This is question for Angrypig, who's managing both the importer and the JSBSim linking. Expect an answer from him when he wakes up and caffeinates himself and wakes up for real :)

There will be a separate forum for models and importer, and after an initial period the info will be distilled into a wiki.

It would be nice if Mr Andrypig could breakdown dynamic model workflow and how files should be linked between each other to work in Outerra. Thanks in advance.
Logged
VFx Artist/Supervisor, Private Pilot - www.sk-films.com

angrypig

  • Sr. Member
  • ****
  • Posts: 454
Re: Model - JBSim guidance?
« Reply #6 on: August 03, 2012, 09:08:49 am »

At the moment I have a 3D Max model and all elevators, rudders and ailerons are made as separate Mesh elements.
As I know Outerra will import COLLADA format - so should all elements be separate models or elements?

yes all moving parts have to be separate elements, you don't have to do any skinning for those elements, the only thing you have to be aware of is the pivot orientation. Mesh elements that have to be exported as bones have to be defined in impcfg file which looks like this for cessna model:

Code: [Select]
cessna172 [object]
  propeller_nose [*propeller_nose]
    propeller_plane [*propeller_plane]
    Propeller [*propeller]
    Rudder [*Rudder]
    ElevatorLeft [*ElevatorLeft]
    ElevatorRight [*ElevatorRight]
      ElevatorRightTrim [*ElevatorRightTrim]
    FlapsLeft [*FlapsLeft]
    AileronLeft [*AileronLeft]
    AileronRight [*AileronRight]
    FlapsRight [*FlapsRight]
      pointer_heading [*pointer_heading]
      pointer_airspeed [*pointer_airspeed]
      pointer_fuelflow [*pointer_fuelflow]
      pointer_QTY_R [*pointer_QTY_R]
      pointer_QTY_L [*pointer_QTY_L]
      pointer_OIL_Temp [*pointer_OIL_Temp]
      pointer_OIL_Press [*pointer_OIL_Press]
      pointer_VAC [*pointer_VAC]
      pointer_AMP [*pointer_AMP]
      pointer_vsi [*pointer_vsi]
      pointer_attitude [*pointer_attitude]
      pointer_attitude_pitch [*pointer_attitude_pitch]
      pointer_altimeter_long [*pointer_altimeter_long]
      pointer_altimeter_round [*pointer_altimeter_round]
      pointer_altimeter_short [*pointer_altimeter_short]
      rudder_L [*rudder_l]
      rudder_R [*rudder_r]
      pointer_RPM [*pointer_RPM]
      pointer_heading_set
      pointer_EGT_REF [*pointer_EGT_REF]
      pointer_EGT [*pointer_EGT]
  legL [*landing_gear_l]
wheel_L [*wheel_l]
  legR [*landing_gear_l]
wheel_R [*wheel_r]
  legF [*landing_gear_nose]
wheel_F [*wheel_front]
  THROT [*throttle_lever]
  MIX [*mixture_lever]
  rudder_L [*control_wheel_l]
  rudder_R [*control_wheel_r]
flapsLever [*flaps_lever]
  exit_point [*exit_point]
  nose_gear [*nose_gear]
  camera_pilot [*camera_pilot]

the names in the square brackets define bone names used in the engine, in this case those names are mostly same as mesh node names...

And what files (scripts to prepare) to control those elements and link whole model to JBsim?

the "script" is not ready yet, but the plane configuration will be easy, something like JsbSim variable -> mesh element : filter params, this will be used for control elements and indicators, i am not sure what we will use for more complicated systems, but probably it will be Javascript or native code scripting.

But there are other requirements:

Do not use default 3DS Max COLLADA export! Use OpenCOLLADA plugin instead.
http://opencollada.org/download.html

All textures have to be in the right DDS format
- diffuse has to be DXT1 format
- normal map has to be 3Dc/ATI2 format
- opacity map has to be ATI1 format

- roughness map has to be ATI1 format
- material reflectance map has to be ATI1 format

those last two texture maps allow you to define whole material in textures so you can have one single mesh and multiple materials and the mesh is still rendered in one draw call. Usually reflectance is not so important as the roughness so in most case the roughness texture map is enough.

there is a nice tool set for texture conversion http://code.google.com/p/nvidia-texture-tools/ but please always use lossless formats as the source like TGA, because all our target formats are lossy, so if you use use a JPEG for source the result will have terrible quality...

Do not make triangles longer than 0.5m.
This is a temporary requirement and it will be solved automatically during the import process later. And there is also automatic real-time solution for that but it is not tested yet...

Level of details (LOD)
Every separate object in COLLADA file has to have corresponding root node with object name. In the second hierarchy level you can define LOD levels, these levels are optional but you should use them because they help a lot with performance. Currently we support 4 LODs, these LOD parents names have to start with LOD0.., LOD1..., LOD2..., LOD3..., COLLISION... the last will be used as a collision mesh...


Logged

deathevor

  • Sr. Member
  • ****
  • Posts: 265
  • User
    • Sk-Films
Re: Model - JBSim guidance?
« Reply #7 on: August 03, 2012, 02:32:32 pm »

Thank you very much Angrypig. :)

"yes all moving parts have to be separate elements," - first I thought as separate elements within the mesh. But as you've said about pivot points, I understand they should be separate objects?

Here's a snapshot of the model I'm working on.

It's still far from being finished, but it's getting there.

By the way, what is target Poly count for Outerra?

« Last Edit: August 03, 2012, 02:34:49 pm by deathevor »
Logged
VFx Artist/Supervisor, Private Pilot - www.sk-films.com

Steve.Wilson

  • Full Member
  • ***
  • Posts: 176
  • Home Cockpit Builder
Re: Model - JBSim guidance?
« Reply #8 on: August 03, 2012, 03:28:45 pm »

Yes!  We need a supersonic aircraft to really get around in Anteworld.  Nice looking model, Sergei.
Logged

angrypig

  • Sr. Member
  • ****
  • Posts: 454
Re: Model - JBSim guidance?
« Reply #9 on: August 03, 2012, 03:52:52 pm »

"yes all moving parts have to be separate elements," - first I thought as separate elements within the mesh. But as you've said about pivot points, I understand they should be separate objects?

Yes separate object in 3DS Max terminology.

By the way, what is target Poly count for Outerra?

If you use LODs the poly count is not big issue then it's more about memory footprint, use as much polys as you need. For example our cessna has ~170k, t817 60k and Guy has 20k and 4 LODs...
Logged

deathevor

  • Sr. Member
  • ****
  • Posts: 265
  • User
    • Sk-Films
Re: Model - JBSim guidance?
« Reply #10 on: August 03, 2012, 04:21:05 pm »

Thanks again.

Just in case, should I triangulate model by myself or leave it to engine?
Logged
VFx Artist/Supervisor, Private Pilot - www.sk-films.com

angrypig

  • Sr. Member
  • ****
  • Posts: 454
Re: Model - JBSim guidance?
« Reply #11 on: August 03, 2012, 05:31:08 pm »

Just in case, should I triangulate model by myself or leave it to engine?

What do you mean by "triangulate model" ?
Logged

deathevor

  • Sr. Member
  • ****
  • Posts: 265
  • User
    • Sk-Films
Re: Model - JBSim guidance?
« Reply #12 on: August 03, 2012, 06:01:20 pm »

My model is made with square polygons.



3D Max does automatic triangulation.


To my concern 3D engines does this automatic triangulation as well. And sometimes it's better to do it yourself to avoid any problems with surfaces.

Newer worked with game engines, so might be wrong about some things. So basically the question was, should I leave Squares or divide them in Triangles manually?

P.S. Just realized that any converter should already save mesh in triangles.

Logged
VFx Artist/Supervisor, Private Pilot - www.sk-films.com

angrypig

  • Sr. Member
  • ****
  • Posts: 454
Re: Model - JBSim guidance?
« Reply #13 on: August 03, 2012, 06:08:36 pm »

Newer worked with game engines, so might be wrong about some things. So basically the question was, should I leave Squares or divide them in Triangles manually?

P.S. Just realized that any converter should already save mesh in triangles.

You don't have to triangulate quad primitives. OpenCollada plugin should export them as quads but i have my own triangulation process in importer and it should be able handle any primitive supported by COLLADA format.
Logged

deathevor

  • Sr. Member
  • ****
  • Posts: 265
  • User
    • Sk-Films
Re: Model - JBSim guidance?
« Reply #14 on: August 03, 2012, 06:38:21 pm »

Thanks. Also, as I understand Impcfg file will be used only in your converter or it should present in outerra's folder?
Logged
VFx Artist/Supervisor, Private Pilot - www.sk-films.com
Pages: [1] 2 3 ... 5