3D model format for OpenGL ES Android - android

when I was working with XNA model format was obvious .X or .FBX, they had bones so I was able to do animation and collision detection, they probably had everything I needed. But now I started to work with Android and OpenGL ES and I can't seem to find anything about preferred model formats, I keep seeing .OBJ but they don't support bones, I also read something about collada and md5 formats but heard there are some problems with loading them? Also suggestions with min3d but I don't like the idea using third party stuff.
Could someone please explain a bit the situation with models and OpenGL ES, why there are no preferred obvious choices(at least from my point of view), and what format or solution should I go with?
Also this is my first question, please write suggestions if I didn't explain myself right or made any other question errors.

OpenGL ES is much much more low level than XNA, it does not provide anything related to 3d models 'management', and thus, has no preferred model/file format or bone management.
Basically, if you don't like the idea of using 'third party stuff', then you'll have to pick whatever 3d model format you see fit, and do it all on your own.
OpenGL ES is basically a specification, nothing more, the 'SDK' provided by Khronos contains only 1 library. Generally, development resources are provided by the various hardware vendors, in the form of code samples.

Related

JOGL vs OpenGL ES API on Android. Pros&Cons

We are trying to migrate our project from PC version to Android. PC version uses JOGL.
Can anyone explain main advantages of using JOGL in Android application instead of OpenGL ES API?
For example, on PC pros of JOGL are:
In theory you can use it on any platform.
It's more or less integrated with AWT, Swing and SWT.
Also it's some kind of wrapper, so in theory there are some abstractions that make it easier to use OpenGL.
But I can't see advantages of using it in Android, here are the cons from my point of view:
It's another dependency, APK size will be larger.
Some issues that affect both JOGL and OpenGL ES will require more
time to pinpoint and fix.
It's not a silver bullet that would not require some time for
refactoring, since in Android we should use right patterns for
Activities, Services, etc.
JOGL has less tutorials and smaller community that OpenGL ES API
has.
So what's the point of using it in Android project?
You can use JOGL only on the platforms that we support. I confirm that JOGL has a good interoperability with AWT, Swing and SWT (not yet with OpenJFX/JavaFX but we'll improve that when Oracle does the necessary things). Yes there are some nice abstractions but you forget tons of things:
JOGL has its own AWT-free image management. It has a better support of JPEG than ImageIO and it is faster
You can preserve the OpenGL context even when your application is paused and put in background (when you press "home"), it's build-in
You can test your OpenGL-ES code on your computer even though it doesn't replace the tests on a real device
You can use exactly the same OpenGL code on desktop and embedded environments, especially if you already use GL2ES2
you can rely on us if something goes wrong, there are already a few commercial games on Google Play
I admit that there is a lack of documentation about JOGL under Android. I'm sorry, I have spent several months in writing a tutorial about JogAmp's Ardor3D Continuation and I prefer leaving the task of doing the same for JOGL Android usage to someone more experienced with it.
Edit.: Sorry for the late reply but I had a problem with my OpenID. Please rather post questions about JOGL on our official forum.

android graphic stack ' s library

I have spent some time to google information about graphic stack of android. But everywhere I saw pictures like it and text was described it.
http://withimagination.imgtec.com/wp-content/uploads/2013/06/AndroigGFX2.png
But , unfortunately , nothing wrote about names of library which contained this components of graphics stack. Can you help me in it? Particulary , I want to know all about openGL ES calling and library.
OpenGL and OpenGL-ES are industry standard graphics APIs. They're not specific to Android but available on most platforms. They're extensively documented at https://www.opengl.org/registry/ and http://www.khronos.org/opengles/
I'd start by reading the specifications. Also there's an excellent OpenGL tutorial at http://arcsynthesis.org/gltut

Android OpenGL libraries + software for prepare opengl graphic, practical usage

I would like to use OpenGL graphic on Android games and read some basic tutorial articles. I think it is very difficult, lenghty and long-time taking to prepare OpenGL code by hand. What is the practical way to prepare OpenGL code in real. Are there any editors to generate OpenGL objects code or any software it can help in generating of OpenGL code ? How do the companies prepare OpenGL projects ?
Quick response: Do some research with google for "android 3d engines" and pick the one that meets your needs.
From an opensource perspective, use any open graphics library out there (#andengine #libgdx #shadingzen...) as the main framework so that you don't need to write much of the complex OpenGL code. For creating 3D meshes you can use #Blender which supports many export formats and you can even write your own in python. There are some tons of examples on how to use Wavefront (.obj) objects in OpenGL (e.g. https://github.com/TraxNet/ShadingZen/blob/master/library/src/main/java/org/traxnet/shadingzen/core/shapes/OBJMesh.java).
There is not a OpenGL-code-generating-tool as you may think. OpenGL is an API which allows you to manage GPU driver states which is not enough to display objects, you also need to either write your own 3d engine (even if its very simple) or use any of the already made ones out there.
And again, do some research and find the workflow and the engine that meets your needs.
OpenGL is freakingly difficult to learn, for a newbie to Graphics programming. If you are comfortable with Java, then I would recommend you look into LibGDX. The way Libgdx or in fact any other gaming engine works is, they hide the difficulty of OpenGl programming by writing wrappers around OpenGL programs. So if you are comfortable with higher level language such as Java then working in Libgdx is much easier. Then you are good to go about your game.
The reason I have recommended Libgdx is clearly simple,
A) From outside i find they have a very active forum and lot of test code, demos.
B) Also the particle editors from Libgdx is something exceptional from a free Open Source point of view.
C) The ability to verify the output in the desktop is something exceptional, it saves hell lot of time.
It looks like AND engine or cocos2d the other free open source engines are no more as active as earlier. Probably they are having good time in Zynga ville :)

Does displaying of Android 2D Graphics use EGL library?

I would like to ask if Android always uses the EGL library for rendering 2D Graphics? Or it is using other libraries? I have noticed in the DisplayHardware.cpp and FramebufferNativeWindow.cpp that egl functions are always called when posting buffer etc.
Check out this vid Learn about Android Graphics !
At 6:30 the graphics architecture is exdplained. I recommend watching the whole thing tough. Lots of useful information.

What does VTK 5.6.1 implement OpenGL Version?

I want to know OpenGL Version that VTK 5.6.1 implement because I want to create android application that use vtk.I will use VTK visualize DICOM image and present them on screen.
I know Android OS implement OpenGL ES but I don't know VTK 5.6.1 OpenGL version.if VTK OpenGL's version is 4.1 that support OpenGL ES,it mean I can use vtk 5.6.1 to create android application,right.
Thanking you for assistance in advance.
This is highly related to your other question about using VTK on Android. As I said in response to that question, VTK does not currently support Android (or other embedded systems). The base OpenGL version used by much of VTK is 1.1, but quite a few of the classes test for various OpenGL extensions and use them optionally. Porting VTK to OpenGL ES (1.x or 2.0) is non-trivial, but some initial work has begun. See this post for a little more background.
I have been doing some work on the iOS and Android platforms, largely concerned with using OpenGL ES 2.0 from C++ on both platforms (NDK on Android). The results were promising, but it will take time to port a significant portion of VTK. OpenGL ES 2.0 and Open GL 2.1 are quite similar in their API, but they are not identical.
I'm not entirely sure what your purpose/context is regarding using VTK on android, but if you are talking about reading in VTK files and rendering the objects on android, I can give you an explanation (and perhaps some code) on how to do that. I'm currently programming an app that takes in a legacy-VTK ASCII file and renders the image using opengl. Like Marcus said, its non-trivial, and a little bit rough, but I used basic indexOf and tokenizer/split methods to search through the vtk file for the vertices, indices, normals, and text. coords and put them into buffers. I see this is an old thread, so I'm not going to explain any further/give out code unless someone wants it.

Categories

Resources