Outerra forum

Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => Topic started by: deathevor on July 31, 2012, 04:31:35 pm

Title: Model - JBSim guidance?
Post by: deathevor 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
Title: Re: Model - JBSim guidance?
Post by: Steve.Wilson 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/aeromatic2.html)

http://jsbsim.sourceforge.net/CreatingJSBSimAircraft.pdf (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?  ;) )

Title: Re: Model - JBSim guidance?
Post by: cameni 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.
Title: Re: Model - JBSim guidance?
Post by: MiB 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 (http://en.wikipedia.org/wiki/Jan_Werich) said: It doesn't matter when I get out of the bed - I wake up at 10.
Title: Re: Model - JBSim guidance?
Post by: deathevor 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. (http://ourbricks.com/khronos/colladarepository.)

Just a question about this - http://jsbsim.sourceforge.net/aeromatic2.html (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?
Title: Re: Model - JBSim guidance?
Post by: deathevor 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.
Title: Re: Model - JBSim guidance?
Post by: angrypig 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 (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/ (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...


Title: Re: Model - JBSim guidance?
Post by: deathevor 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.
(http://img441.imageshack.us/img441/176/captureazb.th.png) (http://img441.imageshack.us/i/captureazb.png/)
It's still far from being finished, but it's getting there.

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

Title: Re: Model - JBSim guidance?
Post by: Steve.Wilson on August 03, 2012, 03:28:45 pm
Yes!  We need a supersonic aircraft to really get around in Anteworld.  Nice looking model, Sergei.
Title: Re: Model - JBSim guidance?
Post by: angrypig 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...
Title: Re: Model - JBSim guidance?
Post by: deathevor on August 03, 2012, 04:21:05 pm
Thanks again.

Just in case, should I triangulate model by myself or leave it to engine?
Title: Re: Model - JBSim guidance?
Post by: angrypig 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" ?
Title: Re: Model - JBSim guidance?
Post by: deathevor on August 03, 2012, 06:01:20 pm
My model is made with square polygons.

(http://img600.imageshack.us/img600/4802/capture2qr.th.png) (http://img600.imageshack.us/i/capture2qr.png/)

3D Max does automatic triangulation.
(http://img443.imageshack.us/img443/4025/capture3sf.th.png) (http://img443.imageshack.us/i/capture3sf.png/)

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.

Title: Re: Model - JBSim guidance?
Post by: angrypig 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.
Title: Re: Model - JBSim guidance?
Post by: deathevor 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?
Title: Re: Model - JBSim guidance?
Post by: angrypig on August 03, 2012, 06:49:14 pm
Thanks. Also, as I understand Impcfg file will be used only in your converter or it should present in outerra's folder?

Yes, the file is required for import process only...
Title: Re: Model - JBSim guidance?
Post by: krz9000 on August 18, 2012, 07:36:30 am
seems like opencollada does not support maya2012 and maya 2013...it possible to use autodesks dae_fbx exporter?
Title: Re: Model - JBSim guidance?
Post by: techno_werewolf on August 20, 2012, 12:09:12 pm
Is it the same for on/off raod trucks/cars. moving parts have to be separate elements. im running Google SketchUp 8
Title: Re: Model - JBSim guidance?
Post by: angrypig on August 21, 2012, 07:58:36 am
seems like opencollada does not support maya2012 and maya 2013...it possible to use autodesks dae_fbx exporter?

You can use it but i cannot recommend it, because the result DAE file usually doesn't comply with the COLLADA standard. I have to check the latest version but older versions was very buggy...
Title: Re: Model - JBSim guidance?
Post by: Deutschmark on August 28, 2012, 03:24:48 am
Hi, I have a question, I use Milk shape 3D for making my 3D models I also use 3Dmax9, But Milk shape 3D also exports collada dea and has a full bones animation suite can this be used in Outerra?

Deutschmark
Title: Re: Model - JBSim guidance?
Post by: Deutschmark on August 29, 2012, 03:35:19 am
Hello, I ask this question above because Milk shape 3D is only a one time buy of 30.00 USD and all updates when the ones that make the program do a update are free, I think something like this if the exported collada dea from it did work in Outerra would be a great thing for a lot of people here.

Deutschmark   
Title: Re: Model - JBSim guidance?
Post by: cameni on August 29, 2012, 03:40:27 am
I'm kicking Angrypig here all day to write a response, but he says he needs to think it through.

A safe bet would be to wait and see, I guess there will be specific issues with each of the modeling programs (or their Collada exports) that will have to be ironed out later. We are here using mainly Blender, have some exps with Max.
Title: Re: Model - JBSim guidance?
Post by: Deutschmark on August 29, 2012, 04:07:26 am
Ok, we wait and see, I would just like to add this, Blender although its free can have a very high learning curve to it for a lot of people and 3D max for most people has a very big price tag.

Deutschmark
Title: Re: Model - JBSim guidance?
Post by: angrypig on August 30, 2012, 12:37:00 pm
So currently we are not using animations and bones for aircraft/vehicle moving parts. Real bones and animations are not finished yet but it will change soon. So it means all moving parts have to be separate meshes/nodes. I choose this way because it is using much cheaper shader. And moving/rotation constraints are handled in code/script.
Title: Re: Model - JBSim guidance?
Post by: Deutschmark on August 30, 2012, 12:47:17 pm
Hi Angrypig, ok thats fine, but can the exported collada dea from Milk shape 3D be used in Outerra?, I have exported collada dea with out using animations and bones for aircraft/vehicle moving parts and it worked just fine in the app it was going into.

Deutschmark     
Title: Re: Model - JBSim guidance?
Post by: angrypig on August 30, 2012, 12:49:53 pm
Hi Angrypig, ok thats fine, but can the exported collada dea from Milk shape 3D be used in Outerra?, I have exported collada dea with out using animations and bones for aircraft/vehicle moving parts and it worked just fine in the app it was going into.

Deutschmark     

If the COLLADA file is in COLLADA 1.4 standard it should be fine.
Title: Re: Model - JBSim guidance?
Post by: Deutschmark on August 30, 2012, 01:20:34 pm
Thank you Angrypig, I have just sent a e-mail to the developer of Milk shape 3D to ask if the COLLADA is a 1.4 standard and I will reoprt back in this thread when I hear from them.

Deutschmark 
Title: Re: Model - JBSim guidance?
Post by: Deutschmark on August 30, 2012, 03:38:55 pm
Hi Angrypig, I just received a e-mail back from the developer of Milk shape 3D and this is what he had to say;

( Yes, it exports to COLLADA 1.4.1, but skeletons and animations are not exported. )

So Angrypig is this good for using in Outerra?


Deutschmark
Title: Re: Model - JBSim guidance?
Post by: angrypig on August 30, 2012, 03:54:54 pm
Yes it is suitable for vehicles and aircrafts but not for characters and skinned animations.
Title: Re: Model - JBSim guidance?
Post by: Deutschmark on August 30, 2012, 04:03:17 pm
Thank you Angrypig, that is a BIG plus for modders like me that will make vehicles and planes and space vehicles for Outerra as Milk shape 3D is very low cost and is very easy to use with no BIG learning curve to it, this in my eyes is a big win win for the ones that will make vehicles of all kinds for Outerra.

Deutschmark 
Title: Re: Model - JBSim guidance?
Post by: Steve.Wilson on August 30, 2012, 04:44:40 pm
Yes it is suitable for vehicles and aircrafts but not for characters and skinned animations.


So how would animations for ailerons and landing gear and all of the other moving bits of an aircraft be handled without exportation of the original animations crafted in Milkshape?
Title: Re: Model - JBSim guidance?
Post by: Deutschmark on August 30, 2012, 07:27:40 pm
Am no expert here, but from reading what Angrypig said on page one you just need to define the pivot point orientation on the part and the movement of the part will be done by external files like .xml, that's if am understanding it right, am sure Angrypig will be able to tell us both better how it works.

Deutschmark
Title: Re: Model - JBSim guidance?
Post by: Steve.Wilson on August 30, 2012, 08:06:30 pm
Pretty much what I'm hoping for.  My experience is in X-Plane, and I model with Rhino3D, which also exports Collada.  This is going to be a bit of a learning curve, especially since my mind is rather set in the X-Plane development path.
Title: Re: Model - JBSim guidance?
Post by: angrypig on August 31, 2012, 03:23:20 am
Yes it is all about right pivot point setup and script.
First what you have to do is tell importer that you want to convert node into bone let say "elevator" node. This is done in our import UI so it is easy. The second step is the script, in first iteration we will expose Javascript interface only, later we will add support for C++ native "scripting"...

Code: [Select]
function update(obj, dtime)
{
    // get normalized elevator position from JSBSim in range [-1, 1]
    var elevator_pos = obj.get_fdm_value("surface-positions/elevator-pos-norm");

    // this is simplified version real elevator has range [-28, 23] degrees for c172
    obj.rotate_node_X_abs("elevator", elevator_pos * 25.0);

    // this is exampe for propeller rotation
    var eng_rpm = obj.get_fdm_value("engines/engine[0]/rpm");
    obj.rotate_node_Y("propeller", eng_rpm * (1.0 / 60.0) * dtime);
}

This could be challenging for complex animation like a landing gear on B737 but for such complex animations i will going to support animations from COLLADA. We are currently working on scripting so if you have any ideas don't hesitate to write them here. :)
Title: Re: Model - JBSim guidance?
Post by: Deutschmark on August 31, 2012, 04:30:18 am
Hi Angrypig, the game I work in now has a very nice and easy way for doing moving gears, its a free animation meaning it can be as many frames as the one making it would like to use and as many parts as well, the gear 3D file is a separate 3D X file from the full 3D model and is called ( gear.x ) and the in game key is ( G ) and if you have a gear.x file in the model folder and the user hit the G key the animation of that file will then be activated there is no scripting, coding nothing for the mod maker to do other then to do the animation in the 3D app and export it and put it in the models folder.

Deutschmark
Title: Re: Model - JBSim guidance?
Post by: angrypig on August 31, 2012, 04:58:12 am
It sounds simple but it is limiting too, as i said i will support animation but it won't be the X format it will be our own format created from COLLADA file. And for complex parts like flaps on B777 you have to control animation or multiple animations in script and if you want to simulate failures the script is the only way how to do it in efficient and simple way... Every aircraft is different and the scripting is the only way how to give people freedom. There are other things that will be controlled in script like sounds systems etc.
Title: Re: Model - JBSim guidance?
Post by: Steve.Wilson on August 31, 2012, 07:41:54 am
How will the hierarchy of animations work?  Say, for easy example, you want to animate the elevator trim tab.  Will groups of objects be possible?
Title: Re: Model - JBSim guidance?
Post by: angrypig on August 31, 2012, 09:03:17 am
The hierarchy is supported implicitly so if you have nodes in hierarchy in 3dmax and you mark them to export in importer the same hierarchy is exported into our pkg file.
Title: Re: Model - JBSim guidance?
Post by: Steve.Wilson on August 31, 2012, 09:25:03 am
What about Milk Shape and exports from other modelers besides 3DS?  Given the extreme expense of 3DSMax it's pretty important to find a low cost way to facilitate the import of aircraft and other articulated models.
Title: Re: Model - JBSim guidance?
Post by: angrypig on August 31, 2012, 09:40:05 am
I used the 3dsmax as an example, the hierarchy is always exported into COLLADA file, it doesn't matter what 3D modeler you have at least i don't know one which is not using a hierarchy for modelling...
Title: Re: Model - JBSim guidance?
Post by: User_name on September 02, 2012, 09:38:25 pm
Suggestions that’s a hard one.

First one would be to try to schedule script execution and JSBsim independent of frame rate, e.g. it runs every 20ms (milliseconds) or 50 times a second. In a flight sim periodic time interval operation is a must when trying to script a F35B as an example. 

(http://rense.com/1.imagesH/f2.jpg)

Yes, know Windows will never be a deterministic OS, but perhaps return a ms (us preferred) interval since last execution of script so dt in control loops can be better accounted for.  If you could provide a good periodic task, then this would put you ahead of X-plane in many respects from the start.

Something that hasn’t been mentioned is “instruments” in which most if not all variables from JSBsim should be exposed to script (know this is a loaded proposition). With this custom instruments or displays can be created down the road.

Last one - documentation… I suck at this in real life and 80% of the time have to go back and reverse document, but if script or eventual C++ is going to be successful, the end user needs to know what it is “X” function does and how.
Title: Re: Model - JBSim guidance?
Post by: ddenn on October 08, 2012, 12:00:13 pm
Does anybody know what property to use to get wheels position in JSB (rotations and vertical movements)? Is there any list of JSB properties?
Title: Re: Model - JBSim guidance?
Post by: angrypig on October 08, 2012, 12:32:58 pm
jsb["gear/unit[0]/compression-ft"]; // gear compression in feets
jsb["gear/unit[0]/z-position"]; // probably the gear Z position in aircraft space
jsb["gear/unit[0]/wheel-speed-fps"]; // speed in feets per second


i never tested these values so you will be the first one :) i am going to test it on ah64. If you need more just give me know i will find them in JSBSim source...then i will add them to our wiki too
Title: Re: Model - JBSim guidance?
Post by: ddenn on October 08, 2012, 12:37:19 pm
Thanks, will test it
Title: Re: Model - JBSim guidance?
Post by: angrypig on October 08, 2012, 03:28:48 pm
jsb["gear/unit[0]/compression-ft"] tested it's working for c172r...

Code: [Select]
  val = jsb["gear/unit[1]/compression-ft"];
  geom.rotate_joint_orig(landing_gear_l_id, val * 0.225, {x:0,y:1,z:0});
  val = jsb["gear/unit[2]/compression-ft"];
  geom.rotate_joint_orig(landing_gear_r_id, val * 0.225, {x:0,y:-1,z:0});
  val = jsb["gear/unit[0]/compression-ft"];
  geom.move_joint_orig(landing_gear_nose_id, {x:0,y:0,z:val*F2M});
Title: Re: Model - JBSim guidance?
Post by: ddenn on October 08, 2012, 03:46:26 pm
Yes, it works, as well as jsb["gear/unit[0]/wheel-speed-fps"];

I have another question, can we have "retract gear" binding?
Title: Re: Model - JBSim guidance?
Post by: angrypig on October 08, 2012, 03:53:02 pm
i will try to add it into the next version...
Title: Re: Model - JBSim guidance?
Post by: ddenn on October 09, 2012, 02:30:24 am
Is there property for camera position? I'd like to hide pilot when camera is in cockpit view.
Title: Re: Model - JBSim guidance?
Post by: angrypig on October 09, 2012, 03:07:50 am
not yet but i will add a function for that...
Title: Re: Model - JBSim guidance?
Post by: ddenn on October 12, 2012, 03:10:52 am
I found very strange behavior, if I change CG (Center of Gravity) point in FDM the 3d model moves like it attached to it. This should not happen, CG is not constant in aircrafts and changes all the time with fuel quantity changing, plane' load etc. The 3d model position should depend only on VRP (Visual Reference Point) point in FDM file, as it does it FlightGear. Right now changing VRP does nothing.

(http://www.flightgear.ru/wiki/images/%D0%9E%D0%BF%D0%BE%D1%80%D0%BD%D1%8B%D0%B5_%D1%82%D0%BE%D1%87%D0%BA%D0%B8_%D0%BC%D0%BE%D0%B4%D0%B5%D0%BB%D0%B8.jpg)

P.s. Can we have command to reload model's script and FDM without reloading Outerra?

Title: Re: Model - JBSim guidance?
Post by: deathevor on October 12, 2012, 07:59:01 am
Question to angrypig:

Was there any luck with MAx 2013 Autodesk Collada importing, is there a chance we'll have it?


P.s. Can we have command to reload model's script and FDM without reloading Outerra?

Agree with this, would be very useful tool especially if it would be a hotkey, it means you could see all changes in configuration almost live.
Title: Re: Model - JBSim guidance?
Post by: Chaoz on October 12, 2012, 08:25:16 am
what i can't understand is, that even if you put a value in the maxrpm line, the rpm goes way higher...
Title: Re: Model - JBSim guidance?
Post by: angrypig on October 12, 2012, 08:49:57 am
Question to angrypig:
Was there any luck with MAx 2013 Autodesk Collada importing, is there a chance we'll have it?

I didn't have a time to try it yet... working on bugs and features :)

P.s. Can we have command to reload model's script and FDM without reloading Outerra?

Agree with this, would be very useful tool especially if it would be a hotkey, it means you could see all changes in configuration almost live.

Yes i want this feature too :)
Title: Re: Model - JBSim guidance?
Post by: angrypig on October 12, 2012, 11:03:55 am
what i can't understand is, that even if you put a value in the maxrpm line, the rpm goes way higher...

Can you show us the script?
Title: Re: Model - JBSim guidance?
Post by: Chaoz on October 12, 2012, 11:14:14 am
well i'am working with the Shavrov-Sh2 model of dden, which has a rpm gauge labelled until 2000 rpm, the engine script says 1650 rpm as max rpm and I don#t know what part everything else plays in calculating the rpm in the end but when I'am at 100% throttle the rpm is somewhere over 2300 rpm and doesn't fit into the gauge...

Script goes:
<piston_engine name="M11">
  <minmp unit="INHG">          6.0 </minmp>
  <maxmp unit="INHG">         28.5 </maxmp>
  <displacement unit="IN3"> 524.80 </displacement>
  <maxhp>        100.00 </maxhp>
  <cycles>         4.0 </cycles>
  <idlerpm>      450.0 </idlerpm>
  <maxrpm>      1650.0 </maxrpm>
  <maxthrottle>    1.0 </maxthrottle><!-- Deprecated -->
  <minthrottle>    0.1 </minthrottle><!-- Deprecated -->
  <sparkfaildrop>  0.1 </sparkfaildrop>
  <volumetric-efficiency> 0.85 </volumetric-efficiency>
  <stroke unit="IN">  5.51  </stroke>
  <cylinders>      5.0 </cylinders>
  <compression-ratio> 5.0 </compression-ratio>
</piston_engine>
Title: Re: Model - JBSim guidance?
Post by: angrypig on October 12, 2012, 11:42:37 am
I just downloaded Ddenn's SH2 and the RPM indicator works fine. The JSBSim FDM definition has nothing with the indicator, the indicator is handled by the Javascript in "packages\ddenn\ShavrovSh2\sh2.aircraft.js".
Title: Re: Model - JBSim guidance?
Post by: Chaoz on October 12, 2012, 03:54:27 pm
yeah i just downloaded it for comparision and saw that dden simply divided the rpm so 1650 is displayed but when compared to the real value in jsb as shown in the image it's just not true.

it's because of the line in the js script which says rpm*PI/2900 although it should be 2000 since the indicator is only labelled until 2000...

(http://imageshack.us/a/img844/7889/screen1350070822.jpg)
Title: Re: Model - JBSim guidance?
Post by: ddenn on October 12, 2012, 03:58:55 pm
Yep, I'm cheating :) Have no idea why engine works that way
Title: Re: Model - JBSim guidance?
Post by: ddenn on October 13, 2012, 06:05:52 am
Found what was the problem with RPM. The propeller required too small power to operate. Required power could be tuned in table data <table name="C_POWER" type="internal"> of propeller .xml.
Title: Re: Model - JBSim guidance?
Post by: ddenn on November 04, 2012, 12:50:06 pm
Can we have some dummy objects/marks to see where the contact point of the flightmodel is? At least a zero point of the FDM. Somehow I can't figure out where the zero point is and how the axis now oriented in new coordinates.
Title: Re: Model - JBSim guidance?
Post by: angrypig on November 05, 2012, 03:02:03 pm
JSBSim coordinate system used for visual reference point (VRP) it is little bit confusing because JSBSims structural coordinate system is different from the one use in Max or Blender.
(http://www.city-gallery.com/knoblock/projects/flightgear/Docs/media/3DCoordsFlightGearVisual.png)

Cessna VRP is set to { X: 44.97448, Y: 0, Z: 36.63664 } in Blender it is { X: 0, Y: 44.97448, Z: -36.63664 }
So if you want to find the VRP/Contact point in Max switch X <-> Y and add minus to the Z. Set the VRP to 0,0,0 is probably the easiest way how to deal with it...

(selected dummy is c172 VRP)
(http://i.minus.com/jyRz11L8FIejE.png) (http://minus.com/lyRz11L8FIejE)

Title: Re: Model - JBSim guidance?
Post by: ddenn on November 10, 2012, 08:37:38 am
Thanks. But still, can we have some indication of collision points? Before the update zero point, from which I set collision points, was somewhere at the front-middle part of the 3d model' bounding box. After the latest update as far as I can see it moved forward much, it's hard to tell where it is now.
Title: Re: Model - JBSim guidance?
Post by: angrypig on November 10, 2012, 09:04:02 am
Thanks. But still, can we have some indication of collision points? Before the update zero point, from which I set collision points, was somewhere at the front-middle part of the 3d model' bounding box. After the latest update as far as I can see it moved forward much, it's hard to tell where it is now.

I will try to add something for that... Contact points, VRP position, Viewer position anything else?
Title: Re: Model - JBSim guidance?
Post by: ddenn on November 10, 2012, 09:09:58 am
That should be enough, thanks!
Title: Re: Model - JBSim guidance?
Post by: ddenn on January 08, 2013, 02:53:29 pm
Finally have a little time to mess with Sh2, and I have a problem, when I move CG point by x coordinate, all the 3d model including alt+7 visualization of the contact points moves by z coordinate

(http://imageshack.us/a/img23/3486/jsbcp1.th.jpg) (http://imageshack.us/a/img23/3486/jsbcp1.jpg)
Title: Re: Model - JBSim guidance?
Post by: ZeosPantera on January 08, 2013, 03:09:22 pm
Looks perfectly fine.. Why is it going into the ground? Regardless of the mass position.
Title: Re: Model - JBSim guidance?
Post by: ddenn on January 09, 2013, 01:41:02 am
No, it's not fine.
Title: Re: Model - JBSim guidance?
Post by: Allan Davidson on January 09, 2013, 05:35:56 am
0 and -100 make wight ballance to the same point, but -100 put it into underground.

How bout 50?
Title: Re: Model - JBSim guidance?
Post by: angrypig on January 09, 2013, 05:55:23 am
it is a BUG...
Title: Re: Model - JBSim guidance?
Post by: Midviki on January 31, 2013, 03:22:31 pm
1) Do windows need to be separate Objects as well?

2) The shiny thingy on the texture ( the reflection ), can it be introduced from Max?Does that glass work in the same way? ( I need a bit of help ) :)