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 ... 4 5 [6] 7 8 ... 15

Author Topic: Integrating with another sim  (Read 158967 times)

Acetone

  • Hero Member
  • *****
  • Posts: 963
    • Youtube channel
Re: Integrating with another sim
« Reply #75 on: November 07, 2015, 03:51:56 am »

This one's more so Acetone can see his scenery at work.

Wow, wasn't expecting both runways will match at that level  :o
Really great video !


I made a vehicle with multiple lights and 'parked' it on the piano keys.
Absolutely killed the frame rate.

What kind of light are you using? I can't remember which one, but there should be a perf difference between point lights and spot lights.

Really, really interesting work. I bet some simmers with a home cockpit will be really interested by this tool :)
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #76 on: November 07, 2015, 05:17:30 am »

I used point lights. I tried with spots but they were kind of strange.

There are probably a million different optimizations and adjustments I could have made but it seemed fairly pointless because attaching the lights to a vehicle wasn't a persistant way of keeping them in the world. I had to reposition them every time I restarted the engine.

I had real pain originally positioning them. I hacked a BMW and tried to 'drive' them into position. That was ok until I realized that the handbrake on the BMW didn't work and when I was in the air the BMW started  rolling down the runway :)

Anyway.. file is attached if you want to play with it... You can edit the first few variables in the script file to adjust for the runway length and width, light intensity etc.
light_z is the distance they are up from the surface.

I'm really looking forward to a permanent solution.

Logged

HiFlyer

  • Hero Member
  • *****
  • Posts: 1788
  • newbie
Re: Integrating with another sim
« Reply #77 on: November 07, 2015, 05:39:05 am »

There is a video of Outerra showing a bajillion lights with little apparent fps impact, but it seems more work is required to have them available for runways and such.  =|

By the way, I've found that with a Nvidia card, Shadowplay can work very well with Outerra for making stutter-free videos that include sound.

« Last Edit: November 07, 2015, 08:29:30 am by HiFlyer »
Logged
Spex: Intel Core i7 6700K @ 4.6GHz / 32.0GB G.SKILL TridentZ Series Dual-Channel Ram / ASUS STRIX GeForce GTX 1080 / Sound Blaster Z / Oculus Rift VR Headset / Klipsch® Promedia 2.1 Computer Speakers / ASUS ROG SWIFT PG279Q ‑ 27" IPS LED Monitor ‑ QHD / 2x Samsung SSD 850 EVO 500GB / Windows 10 Pro

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Integrating with another sim
« Reply #78 on: November 07, 2015, 04:19:40 pm »

I've got a vehicle here and I'm modding the javascript to try and pick up it's position from an external server (via ajax).
I also tried to just read a local text file but the script seems to fail at:

var rawFile = new XMLHttpRequest();

Am I asking too much of the scripting engine at this point?
Should I wait for a few more updates? (-:

It's a pure JS, doesn't contain extra stuff from html. It won't be supported in future updates, vehicle scripts are supposed to define only the local vehicle behavior.
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #79 on: November 07, 2015, 08:56:07 pm »

Ahh..ok.
So I guess the follow up question is...

Is there any way, currently, to inject position data into a vehicle from an external source?
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Integrating with another sim
« Reply #80 on: November 08, 2015, 01:51:09 am »

Maybe via a hack .. but otherwise no, it would need some multiplayer code.
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #81 on: November 10, 2015, 01:13:32 am »

I'm guessing this won't work either?

Code: [Select]
var http = require('http');
    var server = http.createServer(function (request, response) {
        response.write('hi');
        response.end();
    });
    server.listen(3000);

It's telling me 'require' is not defined?

I did manage to get JSBSim to open a port but ended at a dead end too :)

L
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #82 on: November 10, 2015, 02:00:47 am »

OK, so looks like I confused V8 with NodeJS.. groan..

Don't suppose it's any easy job to compile in a tiny socket function and expose it to V8?
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Integrating with another sim
« Reply #83 on: November 10, 2015, 06:22:27 am »

This belongs to a higher level; how would you know form the script what instance to connect where?

Hmm, maybe you could create the planes from C++ via aircraft control API ...
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #84 on: November 10, 2015, 07:21:22 am »

2 Things..

1.) There's an aircraft control API?..  can I have a look?
2.) Being that my interest is driving OT with the FSX engine, I would spawn a bunch of aircraft. I believe they have an 'instance_id' (if not I'm sure I could generate a unique id) and have them 'checkin' with the fsx interface at the other end of the pipe (tcp port). the fsx interface would link them with AI traffic in FSX. I'd just send a string down the pipe like <id1><position><orientation> | <id2><position><orientation> | etc etc.

The best solution would be, to be able to have my fsx interface spawn and destroy OT aircraft at will but I'm  happy with small steps. It's a big lonely sky! :)

I'll try and upload a video of my flying dolphin :|
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Integrating with another sim
« Reply #85 on: November 11, 2015, 03:35:42 am »

There's an aircraft control interface but it's got a ton of dependencies, so I think I'd rather add methods to create and manage objects through the IGC interface. It would be creating static objects (i.e no sim engine attached to them). It will also need the velocity vector to interpolate rendering frames, but that can be computed from previous positions.
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #86 on: November 11, 2015, 03:58:28 am »

That sounds promising.

One spinoff of being able to create/destroy static objects is that I could spawn an airport where I need one (ie. when it's supposed to come into view).

Where do I send the Golden Pheasant ?  :)
Logged

Uriah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 569
  • We do these things not because they are easy. -JFK
Re: Integrating with another sim
« Reply #87 on: November 12, 2015, 02:35:16 am »

It would be great to be able to set the position, rotation and jsbsim properties of an aircraft from an external source. Not only could another simulator or physics engine drive the aircraft, but you could also record data in the CSV output from jsbsim and play-back a flight from stored data.

Great work langdon! I'll be sure to give your plugin a try. :)

Regards,
Uriah
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #88 on: November 12, 2015, 09:24:31 pm »

Cameni,

Is there any way to get the terrain altitude from any given lat/lon in the aircraft script?

I'm  trying to hack my autopilot script to do terrain following but I need to be able to 'look forward' at least a few hundred meters and get the terrain height to give my autopilot a 'pull up' command.

Thanks,
L
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Integrating with another sim
« Reply #89 on: November 13, 2015, 12:46:27 am »

You can use intersect() method of igc, preferably giving it as short from-to range as possible.
Logged
Pages: 1 ... 4 5 [6] 7 8 ... 15