Outerra forum

User mods, screenshots & videos => Aircraft => Topic started by: ddenn on October 11, 2012, 04:40:23 am

Title: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 11, 2012, 04:40:23 am
Shavrov Sh-2 aircraft Outerra addon. Will work only with payware version of Outerra.

DOWNLOAD OTX (~6mb) (http://drive.google.com/uc?id=0B9vyBxVqCStkSVNFX2xsTVZoVms)

Update 15.02.2014, version 0.5.7 :
- Updated to new material system
(http://imageshack.com/a/img801/6299/9j21.jpg)



old and irrelevant messages

Update 16.06.2013, version 0.5.6 :
- Can be installed now in one click (exported to .OTX format)

Update 25.05.2013, version 0.5.6 :
- Can be installed now in one click (exported to .OTX format)

For correct work you need also replace OT's jsbsim_wrapper.dll with new version -  (I guess it will be updated with next OT update)

If you have problems with sounds (sounds disappearing on onboard Realtek HD audio cards for instance) you need to replace
OT's OpenAL32.dll with this version -

Update 11.01.2013, version 0.5.5 :
- Quick fix, wind sound is was too loud
- Changed flight model
- Added sounds (engine, prop, landing gear and wind)
- Fuel indicator now works

Update 16.10.2012, version 0.5.3:
- Changed propeller characteristics
- Changed flight model, added more drag. (CG point is still somewhere at wheels height)
- Minor 3d model bug fixes

Update 12.10.2012, version 0.5.2:
-Pilot is hidden in first person view
-Gears are retractable
-New collision points (possible land with gears up)
-Updated flight model


Edit2: Changed to direct link.
Edit: Download was updated to version 0.5.1, fixed RPM indication.



New method: Press F4 key, go to "aircrafts" tab, find and select "Shavrov_Sh-2", press "Spawn" button.

Old method: To use it ingame open F7 menu, place "ddenn/ShavrovSh2/Shavrov_Sh-2" object somewhere and it appears above current camera position. Close all menus, move near the plane and press enter (just a remainder, after you entered the plane press space to enable physics and plane controls).

Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: Chaoz on October 11, 2012, 08:29:49 am
Hi, great work! I just have a few things i noticed, First the engine rpm needle has the wrong calculation, you did it in degrees but the rotate function expects radians and if you don't look directly on the console the indicators vanish:



(http://imageshack.us/a/img213/3229/screen1349952792.jpg)
(http://imageshack.us/a/img253/5782/screen1349952795.jpg)
(http://imageshack.us/a/img18/7229/screen1349952799.jpg)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 08:34:29 am
Amazing. Well done ddenn!
Looks like you are the first one.

Would be good if you could share your experience with this one.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 11, 2012, 08:36:18 am
Hi, great work! I just have a few things i noticed, First the engine rpm needle has the wrong calculation, you did it in degrees but the rotate function expects radians and if you don't look directly on the console the indicators vanish

I can't do anything with vanishing indicators, that's Outerra team job :) Thanks for the report about indicator, will fix it.

Update: Fixed RPM indication, see first post. Though it doesn't work as it should in real aircraft, but that's my lack of JSBSim knowledge...

Amazing. Well done ddenn!
Looks like you are the first one.

Would be good if you could share your experience with this one.

Ask me what you interested in, I'll try to help.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: seppen on October 11, 2012, 09:01:57 am
Thank you :)
It´s already a little gem, need to build a proper hangar for it.

Perfect to use for exploring of Outerra creations from air.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 09:09:23 am
Quote
Ask me what you interested in, I'll try to help.


Hi ddenn,

Just interested in workflow. We've spoke about it with Cameni in this thread - http://www.outerra.com/forum/index.php?topic=1185.msg13516#msg13516 (http://www.outerra.com/forum/index.php?topic=1185.msg13516#msg13516)


Few things that you can mention:


Thanks in advance.
Hope your experience will help more people to develop content for Outerra.

P.S. Also it is interesting to know:


 
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 11, 2012, 09:49:49 am
I use Max 2012 with Open Collada plugin. Plane elements should be separate meshes, with its own Pivots. Than group all meshes and name that group after the plane before exporting it to DAE. Also it's a good thing to properly name materials. When importing resulting file to OT don't forget to check all meshes you what to animate as BONES, or animations won't work.

I used  JSBSim Aeromatic (http://jsbsim.sourceforge.net/aeromatic2.html) to create simple flightmodel, engine and propeller. I have to rewrite <contact type="BOGEY" name="LEFT_MAIN">, <contact type="BOGEY" name="RIGHT_MAIN">  and <contact type="BOGEY" name="TAIL"> positions in main FDM file, Shavrov_Sh-2.xml, to correspond tire collision points with 3d model. Tried to mess a bit with wings etc. but result was unflyable FDM, so I just tuned a bit DRAG and LIFT sections of the same xml to get more or less normal speeds. Also placing FDM files is important, main file should be in the /jsbsim/aircraft/[addon name] directory, and engine and prop files should be in /jsbsim/engine directory.

Last thing is animations script, sh2.aircraft.js. I've never used JavaScript before, but it's not hard to understand looking at default Cessna script file. There's some rules in JS, which I didn't know, but if error was made in the script you'll see it in the debug window of OT, and in the eng.log file.

Don't forget also to write your script and FDM file to model's .objdef .

There's how importing looks like:

Quote
to install aircraft user needs to open Outerra, import the addon from DAE format (chose right object to import and check all the bones for animations), exit Outerra, place .js script, .matlib and .objdev files to /packages/ folder and flight dynamic files into /jsbsim/aircraft/[addon name] folder (and some of them in /Engine/ subfolder), start Outerra and hope that nothing went wrong

Don't forget to convert all the textures to DDS format, or importing will be impossible.

P.s. Glass is just a material type, you can copy it from default Cessna .matlib file. The prop uses opacity texture, but it's just another material like in Cessna. The logic of prop meshes hiding/appearing is in the .js script file.

Camera position is set in the script file as well, by one of the objects of the aircraft (could be just dummy):

Code: [Select]
  this.set_fps_camera_pos(
    geom.get_joint_local_pos(geom.get_joint('ochki')));
}
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 09:57:17 am
Thanks Ddenn,

Abnout to import my model, everything imports well as Static, but as soon I try to import it as Aircraft - I don't see a bone list.
Thing is that I have Max 2013 and have to reexport everything through Meshlab.

I see all bones as Package objects, but not as bones. Will need to figure this out.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 11, 2012, 10:08:34 am
Thanks Ddenn,

Abnout to import my model, everything imports well as Static, but as soon I try to import it as Aircraft - I don't see a bone list.
Thing is that I have Max 2013 and have to reexport everything through Meshlab.

I see all bones as Package objects, but not as bones. Will need to figure this out.
This happens if all meshes of the scene didn't grouped in one group I think
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 10:19:59 am
Yes you right.

It is necessary to group them in Max, other way it regonize them as separate objects, not bones.
So grouping them solved the problem.

However reexporting through Meshlab makes everything as single mesh, so have to get Max 2012 with Open Collada.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 11, 2012, 10:49:47 am
It is necessary to group them in Max, other way it regonize them as separate objects, not bones.
So grouping them solved the problem.

However reexporting through Meshlab makes everything as single mesh, so have to get Max 2012 with Open Collada.

Try to use build-in Autodesk COLLADA export, may be the version in Max 2013 is finally usable...
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 11:09:19 am
Outerra crashes when importing Autodesk Collada.

Durin import Outerra perfectly sees bones and all configuration process goes fine. Only during conversion (last step) it crashes.

But anyway managed to get 2012 with Open Collada. The xport was even better - all Material Colors exported well.
Only the transparency didn't.

Here's a screenshot (Su-27):

(http://img824.imageshack.us/img824/171/screen1349967800.jpg)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 11, 2012, 11:12:02 am
Can you send the collada file from 2013?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 11:33:06 am
Can you send the collada file from 2013?

Can I send you a link to you as PM?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 11:44:48 am
Ok. Link Sent.

I've exported it with standard settings (Y-Axis Up).

Importing it back to max gives strange thing, the panel mesh is abnormal size, the rest is fine.
So in case you'll see strange mesh, it's probably will be a cockpit panel, the plane itself is 10 times smaller.

Will export it again without it and will send link again.


UPDATE: Sent you another link, now the export looks ok.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 12:02:21 pm
About JBSim file:

So which one did you change (which is the name of your mesh) BOGEY or LEFT_MAIN?

<contact type="BOGEY" name="LEFT_MAIN">,
     <y> -18.00 </y>
     <z>  45.00 </z>
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 11, 2012, 12:07:56 pm
There's no name of the mesh, I changed only coordinates, x,y,z
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 12:13:02 pm
Right, got it.

So you jsut had to change names in sh2.aircraft.js  (in packages folder)?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 11, 2012, 12:14:58 pm
Yes, mesh names are only in the .js script
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 12:31:11 pm
Two questions:

1) Have you taken JS file from cessna  (alredy existing one) and modified it?
And JS filename (in explorer) match model name?

2) During import I have each element 2 - for example "AerilonL" and "AerilonL PIVOT", which one you've chosen if you had the same thing?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 11, 2012, 12:37:27 pm
I made new file, but most code is from Cessna. I checked both as bones, because "AerilonL" will be needed for rotations/moving and "AerilonL_PIVOT" for hiding/showing the mesh.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 12:44:09 pm
Thanks, I'll try.
Mine doesn't want to fly yet :)

During import do you define Bone Name (in script) sections?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 11, 2012, 12:45:49 pm
You can use the "AileronL_PIVOT" for bone too and renamed it to the "AileronL" in .impcfg file. But the result will be the same. We internally remove all unnecessary nodes in hierarchy during import that is why you have to specify which nodes are bones. Btw if the node name in the hierarchy begins with "BONE" it will be automatically added to bone list...
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 11, 2012, 12:50:19 pm
Thanks, I'll try.
Mine doesn't want to fly yet :)

During import do you define Bone Name (in script) sections?

No, I just checked meshes


Btw if the node name in the hierarchy begins with "BONE" it will be automatically added to bone list...
Now that's a time saver, thanks

Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 12:56:53 pm
Also if If there is no PRop element in model, but it exists in script file and JBSim file - will it cause any problems?

My model still imports as static one - no sound from model and can't enter it. 
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 11, 2012, 01:00:40 pm
Also if If there is no PRop element in model, but it exists in script file and JBSim file - will it cause any problems?

My model still imports as static one - no sound from model and can't enter it.
did added script name and jsbsim FDM definition to your .objdef?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 01:04:48 pm

did added script name and jsbsim FDM definition to your .objdef?

No. Didn't know about it. Thanks will try in a minute.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 01:18:18 pm
Thank you guys. Finally Taked OFF.

With Piston engine sound! Sideways! And with world fixed camera  -But I finally did it :)

(http://imageshack.us/a/img23/3276/screen1349975468.jpg)
(http://imageshack.us/a/img191/2610/screen1349975516.jpg)
(http://img11.imageshack.us/img11/1967/screen1349975518.jpg)


Had to chase the plane with camera. :)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 01:34:08 pm
Ok. Camera fixed after restart.

Is there a way to change direction axis or I should rotate the model in Max?
And is there material transparency or it should be done by texture?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 11, 2012, 01:48:50 pm
Congrats! I guess it will be much easier to rotate model in max. There is opacity in the material propetries, the last number in "diffuse" : "1.0,1.0,1.0,1.0" , set it to 0.99 (like in Cessna glass material)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ZeosPantera on October 11, 2012, 01:49:53 pm
Shouldn't models go into the DATA directory eventually? Will this installation process change?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 01:53:53 pm
Congrats! I guess it will be much easier to rotate model in max. There is opacity in the material propetries, the last number in "diffuse" : "1.0,1.0,1.0,1.0" , set it to 0.99 (like in Cessna glass material)

Thanks will try.
Still have problems with camera - sometimes it attached to aircraft Usually after restart), but sometimes it stays in world.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 11, 2012, 02:02:27 pm
Thats very strange behavior. Did you use  this.set_fps_camera_pos( ... in your script file? I see also you've got error in the debugger panel, could you look at eng.log what this error is?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: cameni on October 11, 2012, 02:37:00 pm
Still have problems with camera - sometimes it attached to aircraft Usually after restart), but sometimes it stays in world.
Watch our for the sandbox mode - when you have the sandbox menu on, camera is held by the sandbox. Esc and you will be in the aircraft.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 02:46:56 pm
I've exit Menu (Sandbox) before I press enter to get in Aircraft. (On screens I've switched it back on to make screenshots).
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 03:12:02 pm
Just figured out, that Group Pivot point doesn't actually make difference in direction of the model in Outerra.
You have to rotate all (group) in the world axis, so it points forward along world Y axis.

However this doesn't work on bone objects. They've been rotating opposite way (probably as their Pivots were rotated 180 on Z axis).

Fixing the pivot points of bones, made another problem, they not appearing in Importer at all.

So will try to figure it out later.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ZeosPantera on October 11, 2012, 04:57:48 pm
I get this error

(http://i.imgur.com/Yqdio.jpg)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 11, 2012, 05:06:16 pm
I've got the same errors for most of the Apache textures (no problems with them in game as far as I can see), but no errors for Sh-2. Seems like Nvidia/AMD drivers issue again.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 11, 2012, 05:24:29 pm
it is not an error just our internal message which should not be there, it doesn't affect rendering...
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: krz9000 on October 11, 2012, 07:18:32 pm
hi guys, i love your plane and was so inspired that i started to create a dummy plane in maya using your names. i indeed suckseeded in that i have my plane in the right direction (modeled in yup and converted to zup through the exporter). the pivot of the prop is still wrong but that i can fix. i get the sound and i can enter the plane (still with camera totally wrong placed) but now my problem is: one i entered the plane how can i unpause the simulation? i press the hotkey (i changed it to "p") but nothing happens. what do i have to do to enable the physics?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 11, 2012, 07:21:15 pm
Try to press Space when you entered the plane (you might just changed wrong hotkey)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 12, 2012, 03:34:41 pm
Update 12.10.2012, version 0.5.2:
-Pilot is hidden in first person view
-Gears are retractable
-New collision points (possible land with gears up)
-Updated flight model

DOWNLOAD (~5mb) (https://drive.google.com/uc?export=download&confirm=&id=0B9vyBxVqCStkQTRDNHdfTGNHVnc)

Still can't figure out why 3d model is attached to FDM CG point and not to VRP
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ZeosPantera on October 13, 2012, 04:44:56 pm
In your next update you can fix the exhaust tips. http://i.minus.com/iJqmwcOCGXeFy.jpg (http://i.minus.com/iJqmwcOCGXeFy.jpg) I hate when they do that. Or will this require two sided textures?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 13, 2012, 06:46:45 pm
Apart form this:

Quote
this.set_fps_camera_pos(
    geom.get_joint_local_pos(geom.get_joint('ochki')));
}
Is there another way to position camera relatively to objects pivot?

And where are other camera positions stored?

Also what is Outerra (and maybe JSBSim) default measurement unit? Meters, Feet or other units)?
I just want to find their relation to 3D max units, so I can write a script to generate code for JSBSim -  <metrics>,<ground_reactions>.
+ Camera positions.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 13, 2012, 09:08:06 pm
In your next update you can fix the exhaust tips. http://i.minus.com/iJqmwcOCGXeFy.jpg (http://i.minus.com/iJqmwcOCGXeFy.jpg) I hate when they do that. Or will this require two sided textures?

I can just copy geometry and flip its normals, will do that.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 13, 2012, 11:04:05 pm
If you use 3D max - use Shell modifier.

(http://img811.imageshack.us/img811/8679/35515366.jpg)

However it might create unnecessary polygons.

Actually does the Outerra can support double sided textures?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 14, 2012, 02:47:33 pm
Actually does the Outerra can support double sided textures?
No, not yet
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 14, 2012, 03:15:07 pm
The double-sided material is usually needed for a few polygons and can cause light leaking, so i see no reason to support it and it can be easily replaced by duplicated polygons and flipped normals. There are special cases where double-sided material is important, like a foliage geometry but this will be handled by our tree generator.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: Steve.Wilson on October 15, 2012, 10:00:59 pm
Fill rate for extra polygons is faster than changing the render mode from single sided to two sided and back again.  It's an option, but by leaving it out FPS is preserved, rather than endangered, by having to model both sides of a polygon, so to speak.  X-Plane is two-sided polygon tolerant, but the devs advise against it for just the reason I've mentioned here.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 16, 2012, 07:58:43 am
Update 16.10.2012, version 0.5.3:
- Changed propeller characteristics
- Changed flight model, added more drag. (CG point is still somewhere at wheels height)
- Minor 3d model bug fixes

DOWNLOAD (~5mb) (https://drive.google.com/uc?export=download&confirm=&id=0B9vyBxVqCStkTk9NdVItTkJsdWM)
To install unpack the archive to your /Anteworld/ directory.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 17, 2012, 03:40:14 pm

this.set_fps_camera_pos(
    geom.get_joint_local_pos(geom.get_joint('ochki')));
}

Is there another way to position camera relatively to objects pivot?
Or add other camera than Fps?

And where are deafault camera positions stored?

Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 17, 2012, 03:50:50 pm
Default camera position is { x:-0.25, y:-0.2, z:0.3 } it is the camera position for cessna. Currently this is the only way, do you need a different way?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 17, 2012, 05:01:07 pm
Thanks, just minutes ago found that camera is relative to Model space. So can be set up this way

this.set_fps_camera_pos({x:0,y:3.5,z:2.45});

From this also found that Outerras measurements are in meters - which gives an easy way to export wheel positions, wingspan, engine positions and other stuff straight from 3D max using scripting.

Is it possible add more cameras (other than FPS)?


Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 17, 2012, 05:11:00 pm
Also have a question about twin engine aircraft:

In my Su-27 I have 2 engines, the JSBSim generator it automatically positioned engines +20.00 and -20.00 on Y axis.
The aircraft was always yawing to it's right.  So first of all thought that I need to swap X and Y axis. As in outerra X is side axis.

By experimenting with this, found that Outerra automatically swaps them. So everything is correct in aircraft script.
The only solution I found is to set up both enguines at center (Y= 0). In this case aircraft flies straight.

So my script looks like this now:

Quote
<engine file="Lyulka AL-31F">
    <location unit="IN">
      <x> 803.43 </x>
      <y> 0.00 </y> //Originally was 20.00
      <z>   0.00 </z>
    </location>
    <orient unit="DEG">
      <pitch> 0.00 </pitch>
      <roll>   0.00 </roll>
      <yaw>   0.00 </yaw>
    </orient>
    <feed>0</feed>
    <thruster file="direct">
     <location unit="IN">
       <x> 803.43 </x>
       <y> 0.00 </y> //Originally was 20.00
       <z>   0.00 </z>
     </location>
     <orient unit="DEG">
       <pitch> 0.00 </pitch>
       <roll>   0.00 </roll>
       <yaw>   0.00 </yaw>
     </orient>
    </thruster>
  </engine>

   <engine file="Lyulka AL-31F">
     <location unit="IN">
      <x> 803.43 </x>
      <y>  0.00 </y> //Originally was -20.00
      <z>   0.00 </z>
    </location>
    <orient unit="DEG">
      <pitch> 0.00 </pitch>
      <roll>   0.00 </roll>
      <yaw>   0.00 </yaw>
    </orient>
    <feed>1</feed>
    <thruster file="direct">
     <location unit="IN">
       <x> 803.43 </x>
       <y>  0.00 </y> //Originally was -20.00
       <z>   0.00 </z>
     </location>
     <orient unit="DEG">
       <pitch> 0.00 </pitch>
       <roll>   0.00 </roll>
       <yaw>   0.00 </yaw>
     </orient>
    </thruster>
  </engine>

But still trying to find where the error was -is it problems with JSBSim or in Outerra sets the power only to one engine causing it to yaw?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 17, 2012, 05:53:12 pm
Yes the problem is in engines, i start the first one only but it should be possible to start the second one in the script with the JSB interface:

Code: [Select]
   jsb["propulsion/engine[1]/set-running"] = 1; // start the second engine
   jsb["fcs/throttle-cmd-norm[1]"] = jsb["fcs/throttle-cmd-norm[0]"]; // set throttle for the second engine

I will add an automatic start for all engines to the next update...

A few useful documents about JSBSim:
JSBSim coordinate systems
http://jsbsim.sourceforge.net/JSBSimCoordinates.pdf (http://jsbsim.sourceforge.net/JSBSimCoordinates.pdf)
JSBSim manual
http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf (http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: deathevor on October 17, 2012, 07:11:45 pm
Thanks a lot,

Will try that.
JSBSim maybe not so big problem as there's quite a lot of examples around.

Would be nice to get more manuals for Outerra JS script (Aircraft *.js file in Packages folder).
All I found is http://www.outerra.com/xtrac/index.fcgi/wiki/aircraft (http://www.outerra.com/xtrac/index.fcgi/wiki/aircraft)

Also after changing engine to my own (turbine), the engine sound disappeared. Is it possible to link a custom sound to an engine?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 18, 2012, 04:34:54 am
Would be nice to get more manuals for Outerra JS script (Aircraft *.js file in Packages folder).
All I found is http://www.outerra.com/xtrac/index.fcgi/wiki/aircraft (http://www.outerra.com/xtrac/index.fcgi/wiki/aircraft)
This is the only documentation for it now, it will grow up as the API matures, if you have a request for new functionality please discuss it here on the forum, once it's agreed upon it should be put into Xtrac. API functionality is mainly driven by you - our users.
Also after changing engine to my own (turbine), the engine sound disappeared. Is it possible to link a custom sound to an engine?
I am currently working on it...
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 18, 2012, 09:57:11 am
What I'd like to have is ability to create clickable 2d pop-up panels withing script system and something like function drawText[Rectangle, Triangle, Line etc.] to draw on these pop-up panels and objects (aircraft panel texture). Also maybe something like drawObjects (loading them from file or/and generating primitives), with scaling and positioning options, and control of its alpha channel (would be good to control its textures too), to make special effects like smoke, flame etc.

P.s. And lit textures too, of course, texture which is not affected by engine lighting
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 18, 2012, 10:19:03 am
What I'd like to have is ability to create clickable 2d pop-up panels withing script system, something like function drawText[Rectangle, Triangle, Line etc.].

API for the window manager is planned, you will be able to create your own windows/dialogs etc.

Also maybe something like drawObjects (loading them from file or/and generating primitives), with scaling and positioning options, and control of its alpha channel (would be good to control its textures too), to make special effects like smoke, flame etc.

Such low level access to the renderer is not necessary, all you need is an interface to the particle manager and ability to spawn particle emitor with proper parameters. In modern engines particle systems run completely on the GPU side, it means all primitives are generated directly on GPU because it is much faster and efficient than creating primitives on CPU side and sending them to GPU through PCIe bus.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: krz9000 on October 18, 2012, 10:35:47 am
please dont call it LIT texture...thats so xplane :P better would be an "emitter-color" channel and an "emitter-intensity" channel. if intensity is black the diffuse color could be shown..if its higher then 0 then the emitter color dominates. this setup has potential to be a real light emitter source that illuminates the scene one day maybe?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 19, 2012, 06:27:30 am
Something like this? I prefer the name "emission texture" but it is more a weight between the engine's light and the pure diffuse color, in this case the weight is set to zero on those lighted pixels.

This is temporary solution i'm not sure if this is the right way how to do such effects. In my opinion it should be handled by standard lighting system all you need is a light or multiple lights inside the indicator:

Code: [Select]
{
"name" : "Cessna_INT",
"diffuse" : "1.0,1.0,1.0,1.0",
"Ax" : "0.03",
"Ay" : "0.03",
"m" : "0.4",
"tex_diffuse" : "Cessna_INT.dds",
"tex_normal" : "",
"tex_env" : "",
"tex_opacity" : "Cessna_EM.dds"
},

(http://i.minus.com/jI0QCmmcYbPfD.jpg) (http://minus.com/lI0QCmmcYbPfD)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 19, 2012, 06:36:20 am
Yes, something like that. Though I'm not sure about lights inside the indicator, how this might work? Also we need not only indicators, but lamp 3d objects as well, could that be done by this method?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 19, 2012, 06:49:54 am
You will be able to do any light with this system (interior/exterior) the only limitation are shadows those will be limited for a few lights.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: seppen on October 19, 2012, 08:31:48 am
You will be able to do any light with this system (interior/exterior) the only limitation are shadows those will be limited for a few lights.

Ahh :), wonderful news.
Been messing around with bakeing lightmaps, but for large/complex structures seen up close it´s takeing ages to generate, and even 4096 maps not look that good.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ZeosPantera on October 19, 2012, 10:20:35 am
I don't know if anyone has ever recommended putting actual dynamic light(s) inside of dozens of gauges of an aircraft cockpit. This is the best thing I have ever heard.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 19, 2012, 10:40:50 am
(http://i.minus.com/j85vlJ4oZuPK7.jpg) (http://minus.com/l85vlJ4oZuPK7)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on October 19, 2012, 10:45:31 am
Landing/taxi lights would be nice too :) How far they are in plan?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: krz9000 on October 19, 2012, 10:47:11 am
does outerra support a deferred lighting system?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 19, 2012, 11:40:27 am
Landing/taxi lights would be nice too :) How far they are in plan?

Not very far but i have to do a few performance tests to decide what technology is best for Outerra.

does outerra support a deferred lighting system?

Currently we are using forward renderer with depth prepass. There are 3 possible scenarios how to handle multiple lights:

Each option have pros and cons so we have to do a few tests before we choose one.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ZeosPantera on October 19, 2012, 03:05:13 pm
Are these types for static lighting of models and the ground or are these methods also for dynamic(moving) light sources?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: angrypig on October 19, 2012, 03:24:41 pm
All these methods are for dynamic lights...
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ZeosPantera on October 19, 2012, 03:58:34 pm
Might I suggest the first "test" be Street lights that get automatically placed in the road editor. Would be cool if they could be knocked over and out too. But I am thread jacking now.

(http://i.imgur.com/b2utz.jpgz)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: John514 on November 03, 2012, 11:21:22 am
Might I suggest the first "test" be Street lights that get automatically placed in the road editor. Would be cool if they could be knocked over and out too. But I am thread jacking now.

+1
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: seppen on November 05, 2012, 05:07:28 pm
+2
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on January 11, 2013, 09:32:44 am
New update is available - http://www.outerra.com/forum/index.php?topic=1281.msg14981#msg14981 (http://www.outerra.com/forum/index.php?topic=1281.msg14981#msg14981)

Update 11.01.2013, version 0.5.4 :
- Changed flight model
- Added sounds (engine, prop, landing gear and wind)
- Fuel indicator now works
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on January 11, 2013, 11:55:40 am
The wind sound was too loud, fixed. Model updated again.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: traumstrand5 on February 12, 2013, 04:54:59 am
That looks great!
Gonna give it a try as soon as time allows it!
 :)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on May 25, 2013, 04:29:30 am
Updated first message (http://www.outerra.com/forum/index.php?topic=1281.msg14981#msg14981), Sh-2 converted to .OTX format for easy installation.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: murkz on May 25, 2013, 04:51:36 am
Updated first message (http://www.outerra.com/forum/index.php?topic=1281.msg14981#msg14981), Sh-2 converted to .OTX format for easy installation.

Thank you ddenn.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: bugsblake on May 25, 2013, 07:46:19 am
hay thanks for the great plane! looks sweet in the pics though has a problem! once installed it shows up in the aircraft list with pic but it wont spawn? says error cant load flight dynamic model! anyway im sure its just a simple bug and look forward to trying this out when fixed! thanks :)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on May 25, 2013, 09:27:24 am
Hm, that's interesting. Cameni, does this .otx archive has all the files from /jsbsim/ folder?

hay thanks for the great plane! looks sweet in the pics though has a problem! once installed it shows up in the aircraft list with pic but it wont spawn? says error cant load flight dynamic model! anyway im sure its just a simple bug and look forward to trying this out when fixed! thanks :)

Try to unpack this file to the /Anteworld/ folder, that's sh-2 FDM - http://drive.google.com/uc?id=0B9vyBxVqCStkVVpvWDFxek82RG8 (http://drive.google.com/uc?id=0B9vyBxVqCStkVVpvWDFxek82RG8)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: bugsblake on May 25, 2013, 10:16:23 am
no that didnt help! tried in both outerra folders, both package folders and even your model folder but i always get the same error! guess cameni is gonna have to answer this one!
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on May 25, 2013, 10:26:34 am
OTX format really doesn't work for aircrafts, it doesn't include jsbsim fdm files. And here's my mistake in FDM archive, this one should work - http://drive.google.com/uc?id=0B9vyBxVqCStkVUtGVXl6UEJZNms (http://drive.google.com/uc?id=0B9vyBxVqCStkVUtGVXl6UEJZNms) Unpack it to /Anteworld/ folder.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: bugsblake on May 25, 2013, 12:07:46 pm
ok just dropping the extracted folder into anteworld folder didnt work! but then i went into your uppacked folder and took the sh2_fdm2 folder and put that into anteworld/jsbsim/aircraft folder and then dropped the 2 engine files into anteworld/jsbsim/engine folder and it works now! :)

just unpacking the folder straight to the anteworld folder wont work because it makes a sh2_fdm2 folder! if you named the .rar file "anteworld" you would be able to just unpack straight there as it would merge the folders! ;)

anyway im sure the exporter will be updated to work better with aircraft now we know of this! thanks
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on June 16, 2013, 07:52:56 am
Updated first post (http://www.outerra.com/forum/index.php?topic=1281.msg14981#msg14981), FDM now is included to the .otx file, airplane can be installed in one click.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: adriaan on June 16, 2013, 09:12:59 am
thanks for the update! are you working on anything new?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on June 16, 2013, 09:35:56 am
Yes, working on this beast

(http://imageshack.us/a/img850/8051/cvfp.jpg)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ZeosPantera on June 16, 2013, 12:00:17 pm
THAT I want to fly.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: adriaan on June 16, 2013, 12:24:47 pm
that looks great! what a giant plane!
looking forward to flying this
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: bugsblake on June 16, 2013, 12:43:00 pm
oh very nice! i look forward to that! :)

really want to get an icon A5 in outerra but untill watercraft are supported theres really no point!

plus i still got my MQ-9 Reaper to finish, if i ever work it out! ;)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: adriaan on June 16, 2013, 12:52:01 pm
looks like you got a lot of issues on the reaper. still the landing gear?
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: bugsblake on June 16, 2013, 01:22:38 pm
yes! was told as i used another plane as starter files it was causing problems as my plane was a different type! i went to the jsbsim site and made my own files for the reaper but they dont work? need to work out why but not had a lot of time to work on much in the last few days! i'll get there in the end though!

ddenn has helped me a lot with getting this this running! wouldnt be where i am now without him! :D (thank you) just trying to work this out on my own before i bug him again! hes got his own stuff to work on!

anyways sorry to be chatting about my plane in your thread! was asked! if you want to ask anymore about it, do so in my thread in the importer section. ;)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on February 15, 2014, 12:52:33 pm
The addon was updated with new material file to match recent Outerra changes. Download new version - http://forum.outerra.com/index.php?topic=1281.msg14981#msg14981 (http://forum.outerra.com/index.php?topic=1281.msg14981#msg14981)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: PytonPago on February 15, 2014, 01:25:41 pm
Thanks ! Looking good.  :)
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: bugsblake on March 04, 2014, 05:30:13 am
tried to land this on the water today, guess that bits not done yet! lol will you be updating this to land on water now or are we still waiting on something for planes to be able to do that? i really want an icon A5 if we can! :) thanks for the last update!
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on March 04, 2014, 05:38:01 am
Yep, water physics is not working for aircrafts yet. And I've no info about OT team working on it.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: PytonPago on March 04, 2014, 06:27:57 am
Yep, water physics is not working for aircrafts yet. And I've no info about OT team working on it.

Has JSBSim something for that ? I imagine, water-crafts are simulated in other sim-software too ... just water-level had to be set somehow for the starters.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: ddenn on March 04, 2014, 06:34:32 am
Can't say for sure, but I think it's possible, and could be implemented someday.
Title: Re: Aircraft Addon - Shavrov Sh-2
Post by: Jon S. Berndt on March 16, 2014, 10:06:21 am
Yep, water physics is not working for aircrafts yet. And I've no info about OT team working on it.

Has JSBSim something for that ? I imagine, water-crafts are simulated in other sim-software too ... just water-level had to be set somehow for the starters.

JSBSim has recently had added to it a capability that gives better floatation modeling. I did not add that myself. I think you would have to ask about that in the FlightGear forums or mailing lists. Eventually, I'll get some documentation about that feature.

Jon