Board index FlightGear Media

Good times in the Ka50, in FG + game engine architecture

Screenshots, videos, sound recording etc. taken in/with FlightGear.

Good times in the Ka50, in FG + game engine architecture

Postby chriscalef » Thu Apr 02, 2020 3:12 am

Hey, just wanted to share a happy moment, it took longer than I might have hoped for, but I now have my FlightGear / game engine (currently T3D) interface back up and running. What you see here is me flying around the FlightGear version of Portland Oregon, landing on buildings that get represented on the Torque side at the moment as terrain. This represents three different socket connections: one which receives the UDP stream containing the aircraft position, rotor speed, etc; another which sends commands back to FlightGear and receives responses; and a third which communicates terrain data from FlightGear to the game engine.

chriscalef
 
Posts: 279
Joined: Wed Feb 20, 2013 10:28 pm

Re: Good times in the Ka50, in FG + game engine architecture

Postby FightOrFlight » Fri Apr 03, 2020 12:31 pm

This is very interesting. So since it basically communicates the essential data for visualization, I'm assuming it can work with almost any-complexity flightgear aircraft? So if someone modeled VRS or electronics, it would mirror that accurately to T3D since it's only transmitting the results of FG's calculations?
FightOrFlight
 
Posts: 7
Joined: Fri Oct 04, 2019 9:57 pm

Re: Good times in the Ka50, in FG + game engine architecture

Postby chriscalef » Sat Apr 04, 2020 4:47 pm

Yes, exactly! My other favorite aircraft is the Dragonfly ultralight, but any aircraft will work. You just need to convert the art for it out of .ac format and into your game engine's native format, for me in Torque that meant using Collada as an intermediary, in Blender.
chriscalef
 
Posts: 279
Joined: Wed Feb 20, 2013 10:28 pm

Re: Good times in the Ka50, in FG + game engine architecture

Postby chriscalef » Sat Apr 04, 2020 4:51 pm

Re: controls, the joystick is still being used by FlightGear, so you don't need anything special to handle basic flight controls, but the keyboard shortcuts aren't accessible anymore when your game engine has focus, so I've had to make commands that I send from Torque to FG over my controlDataSource socket. Right now all I'm doing with that is firing off an engine start command and a FG quit command, but I will need many more such commands before I'm done, for instance to apply damage to the aircraft when it gets hit. (FlightGear already damages it if you crash, as per usual.)
chriscalef
 
Posts: 279
Joined: Wed Feb 20, 2013 10:28 pm

Re: Good times in the Ka50, in FG + game engine architecture

Postby chriscalef » Tue Apr 07, 2020 9:22 pm

Next phase: Attempting to use buildings on the game engine side which were created by blender-osm, and then exported from Blender into T3D.

Clearly the heights are going to require some code tweaking if this is how I end up doing it, and I need to get far enough into osm2city to figure out how to dial down or remove the peaked roofs. But the good news is on the horizontal plane, the sizes all lined up pretty much perfectly on the first try!

After all that works, then we get to deal with the textures.

chriscalef
 
Posts: 279
Joined: Wed Feb 20, 2013 10:28 pm

Re: Good times in the Ka50, in FG + game engine architecture

Postby chriscalef » Tue Apr 14, 2020 7:45 pm

Well, many thanks to osm2city and @vanosten, things in my imaginary battleground are starting to look much better.

Image

Image
chriscalef
 
Posts: 279
Joined: Wed Feb 20, 2013 10:28 pm


Return to Media

Who is online

Users browsing this forum: No registered users and 3 guests