简体   繁体   中英

3D Simulations in Java

I have never done any 3D programming and will be working on a 3D aircraft crash simulation. I am going to do it in Java, though I know C++ is probably more popular for this sort of thing, but I have no experience with it and a limited time frame.

Could anyone recommend any engines or wrappers? I know there is Java3D, but isn't it getting a bit old now? I have also seen JMonkey Engine, although that is for games I am sure it would be fine for simulation software?

Thanks!

You're going to have to firm up your fidelity requirements before you're going to get a truly useful answer to this. Some observations:

Java 3D - It doesn't appear to have had much active development since 2008 (though it looks like it's been ported to use JOGL). If it does what you need, go ahead and use it, but don't expect it to get any new features anytime soon (unless you want to write them yourself). Since it's mainly a scene graph manager, it may be of use for display, but it doesn't have any physics simulation capabilities.

JOGL - This is the OpenGL bindings for Java. Its most recent stable version is also about 4 years old, but there are indications it's undergoing some development to take advantage of newer OpenGL features.

jBullet - This is a physics engine for gaming purposes. It's essentially a Java port of the C++ Bullet Physics engine.

jMonkey - This is a gaming engine, which combines both a rendering engine (Java 3D) and a physics engine (jBullet) into a single package.

Back to my main point. If your requirements can be satisfied with a game engine, then you're okay to go with something like jMonkey or if you want to strip it down, just use JOGL and jBullet.

The downside is that most physics engines used for gaming don't deal with aerodynamics so much as collision detection and constrained movement. There appear to be a few flight simulator extensions for jBullet, but I can't make any recommendations about their quality... I suspect they too are for gaming purposes.

If you want to start dealing with structural failure simulation for the purpose of engineering analysis and the like, you might be able to get these tools to do the rendering and at least a small part the physics associated with it. But a physics engine tuned for gaming is not well suited to this kind of analysis. For that you will need a professional engineering package, or a professional engineer with a background in aeronautics, mechanical engineering, modeling and simulation... and who knows how to program in Java.

As for

what happens to other aircrafts in the airspace, actions taken by aircraft controllers and the debris field.

Most of this is not going to be included in any physics engine, even one suitable for engineering analysis. There's some aeronautics and mechanical engineering involved, but that only constrains what's possible. What you're talking about deals with human behavior under stressful situations. That's a focus of much research, but you're unlikely to find anything available either as open source or commercial software to satisfy that part of your project.

Bottom line, get a better understanding of your requirements. If you don't have that understanding up front, you're going to be solving the wrong problem.

Other alternatives are:

lwjgl ( website ) A gaming library including GL binding and support for controls and sound .

ode4j ( website ) A 3D game physics library. This is a Java port of the ODE C/C++ physics library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM