air and engines

Post and discuss features you'd like to see in the BEPUphysics library.
Post Reply
JusTiCe8
Posts: 52
Joined: Mon Jun 01, 2015 9:02 am

air and engines

Post by JusTiCe8 » Wed Jun 10, 2015 8:59 am

Hi,

do you have any interest in adding air in BEPU for various airships (from gliders to jet planes, including turboprop/piston engine powered planes as well as choppers, balloons and parachutes) ?
If not, would you like to provide some inputs to the best way of adding such "component" ?

I think atmosphere could be first added with an uniform atmosphere in simulated space (same temp/density/pressure at a given altitude, no matter where the character is in the world) like what is done in Kerbal Space Program, then adding non uniform atmosphere (based on maps similar to terrain heightmap which set temp/pressure, n map for n layers of atmosphere).
And add drag for everything including surface vehicles like cars (also negative lift could be useful for racing car).

And obviously the subsequent thing is engines, I don't think of something super accurate and resource consuming but something more or less simple with a basic fuel (density, energy potential, ...) and various type of engine which use the same fuel in various ways to produce thrust, or torque for piston engine, which can be use together with wheels.

I'm aware it could be too much for BEPU as you want it to be, it could be some additional modules like BEPUAir and BEPUEngine which can be "easily" plugged into BEPU.

The idea here is to make kind of "arcade" flying game like again Kerbal Space Program or also GTA3/GTA SA/Saint Row the 3rd easy to fly planes, choppers, etc

Thanks.

Norbo
Site Admin
Posts: 4558
Joined: Tue Jul 04, 2006 4:45 am

Re: air and engines

Post by Norbo » Wed Jun 10, 2015 8:38 pm

High level aerodynamic models and engines are often tailored for specific games, and also tend to be pretty simple (outside of hardcore simulators). I doubt anything I could produce here would provide much general purpose value.

If you wanted to make it yourself, it all comes down to applying impulses in the end. For example:
1) For wings, take the wind direction, wing movement direction, and some metadata about the wing describing the lift surface and toss it into an approximation of the lift equation.
2) For turboprops or rotors, you could directly use the rotational speed to compute apply a thrust (tuned by other metadata).
3) For balloons, take the metadata about density and compute the buoyancy force given the atmosphere using the simplest form of the buoyancy equation.
4) For drag, compute the apparent wind speed against the surface and compute an impulse according to some metadata like directional wind resistance (maybe a scalar along each of the three local axes describing how it responds to wind along that direction). Or just use the LinearDamping/AngularDamping on entities as a really high level approximation.

As for engines, it all boils down to input to constraints (or just direct impulses again). For example, you could change a RevoluteMotor's target speed or maximum force and other properties in response to the engine model.

However, if you want a really arcadey feel, you may be better off doing whatever feels right and not worrying too much about the physical inspiration. For example, you could make a very easy to fly plane that just does something like 'counter all velocity not aligned with the forward direction, and try to achieve a certain velocity along the forward direction'.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest