Animated Aircraft Model - Latest Version

Here is my latest demonstration of an aircraft in flight. In this version, you can toggle between camera views, including (1) an external view that is fixed with the horizon, (2) an external view that is locked to the aircraft, and (3) an internal virtual cockpit view.

This demo incorporates lessons I have learned over the past year about objects, including (1) how to attach the camera to different objects; and (2) how to rotate the aircraft using linked objects. Once you have created the necessary objects, the required camera and rotation subroutines are very short since three.js is doing the “heavy lifting”.

EDIT
I have made several improvements to user input, including removing the input lag. I removed engine controls, which did not seem that useful. I added button “flight” controls for touchscreen users and also buttons to activate animated parts and for other options. While some devices change the formatting of the buttons, they seem to work fine. I have added self-centering which activates if bank or pitch is less than 7.5 degrees.

EDIT 12/31/21
I have added links to more extended discussions of the lessons learned, including sample code.

12 Likes

Love this

Pacific Fighters!!!

1 Like

I created this model about 15 years ago for the Microsoft Flight Simulator X as a “homage” to my father-in-law who flew with VC-27. For three.js, I re-created the model using Blender and animated the various parts (including the gauges) and (with a lot of help) figured out how to import and animate these parts in three.js. That is one of the major “features” of the program that I hope to better explain shortly. (It is also the messiest since, on this plane, the landing gear consists of 8 animated parts.)

FYI - I also have a very simplified three.js flight simulation that uses this plane and is showcased elsewhere.

2 Likes

I started a main battle tank simulator in Unity but i realized it isn’t something one man can do and not take forever.

Wanted to do a WWII flight sim too

Back when I first started trying to create a flight simulator, the available options were very limited and disappointing. These days, there are many great flight (and tank) simulations that you can play online for free - such as War Thunder - and that are better than anything I could create.

Nevertheless, after many years of working on this challenge, I was able to come up with a simplified flight simulation using a method described on my aviation webpage in some detail. Essentially, I treat thrust and drag as operating along the flight path and lift and gravity as fligth-path deflectors. While “simplified”, this approach was able to correctly prove that my previous understanding of the dynamics of a climb was incorrect.

This simplified approach should be adequate for most flight simulation applications. (I am also an instrument-rated commercial pilot, so I have a sense of whether a simulation is realistic.)

You are in a completely different world with a tank simulation. You have to learn how to create interesting terrain and to make objects follow and hide in the terrain. You have to learn collision mechanics and the physics governing a projectile in flight.

Note that here are other very good programmers who are pursuing both of these challenges and who have created some interesting simulations that you can find by searching the showcase.

1 Like

I was a Tanker…

What kinds of tanks? Abrams and/or AFVs?
I’ve enjoyed playing tank simulations over the years - but expect that they are just a pale imitation of what it is like in real life.

I was a M1A1 Abrams crewman. Steel Beasts is pretty realistic, obviously as much as possible being a sim.

I was trying to be as realistic as possible…but it was a ton of work. I was doing it in my free time while freelancing. Once I got a real job….no more time.

And with the turbine, the performance of the M1A1 was different than almost any other tank on the battlefield.

I spent 10 years trying to create a decent flight simulator (1980-1990) before I realized that I would never catch up to what came to involve large teams of programmers. But now that I have retired, I have the time to go back and try to pass on the useful parts of what I learned.

EDIT: Deleted response, mistakenly added, which related to an entirely different discussion.

2 Likes

Any ideas on how I could go about doing realistic flight animation using A-frame, it’s also based on three.js. It makes adding scenes and objects, shapes, materials, etc a lot easier, and takes care of the scene initialization, window resizing, and rendering for us automatically.

I have not used A-frame. From looking at their website, it appears that their main goal may be to help you map a 3D world and to control your orientation and position within that world. However, they may not have attempted to model different methods of transporting yourself through that world, such as flying.

At a minimum, a flight simulator needs to take into account the forces of trust, lift, drag and gravity and to determine the effects of those forces on your movement through those worlds. Since my ACflyt module focuses only on replicating flight (and not creating 3D worlds), it may work well with something like A-frame. You can see some demo programs here.

1 Like