Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MrAdam

Pages: 1 2 3 [4]
46
Support / Re: Viable engine?
« on: May 10, 2012, 04:28:22 pm »
You need to enable OpenGL ES 2.0 in your app through AndroidManifest.xml.

Code: [Select]
<uses-feature android:glEsVersion="0x00020000"></uses-feature>
<uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"></uses-sdk>
Still getting
Code: [Select]
05-10 16:26:49.234: E/AndroidRuntime(1331): FATAL EXCEPTION: GLThread 156
05-10 16:26:49.234: E/AndroidRuntime(1331): java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
05-10 16:26:49.234: E/AndroidRuntime(1331): at com.threed.jpct.CompiledInstance.fill(CompiledInstance.java:1155)
05-10 16:26:49.234: E/AndroidRuntime(1331): at com.threed.jpct.Object3DCompiler.compile(Object3DCompiler.java:145)
05-10 16:26:49.234: E/AndroidRuntime(1331): at com.threed.jpct.World.compile(World.java:1914)
05-10 16:26:49.234: E/AndroidRuntime(1331): at com.threed.jpct.World.renderScene(World.java:1038)
05-10 16:26:49.234: E/AndroidRuntime(1331): at nodes.android.MainActivity$GLRenderer.onDrawFrame(MainActivity.java:246)
05-10 16:26:49.234: E/AndroidRuntime(1331): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)
05-10 16:26:49.234: E/AndroidRuntime(1331): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)

47
Support / Re: Viable engine?
« on: May 10, 2012, 04:06:54 pm »
Anti-aliasing is possible to use in OGL2 only. I'm using this.

Code: [Select]
switch (GameConfig.oglVersion) {
case 1:
mGLView.setEGLConfigChooser(new GLSurfaceView.EGLConfigChooser() {
@Override
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
int[] attributes = new int[] { EGL10.EGL_DEPTH_SIZE, 24, EGL10.EGL_NONE };
EGLConfig[] configs = new EGLConfig[1];
int[] result = new int[1];
egl.eglChooseConfig(display, attributes, configs, 1, result);
return configs[0];
}
});
break;
case 2:
mGLView.setEGLContextClientVersion(2);
if (GameConfig.antiAliasing)
mGLView.setEGLConfigChooser(new AAConfigChooser(mGLView));
break;
}

edit: But with to large count of edges, it'll be probably very slow.
I already tried that. Even though I got GLES2.0 enabled I get this:
Code: [Select]
05-10 16:01:19.255: E/libEGL(24536): called unimplemented OpenGL ES API
05-10 16:01:19.263: E/libEGL(24536): called unimplemented OpenGL ES API
05-10 16:01:19.263: E/libEGL(24536): called unimplemented OpenGL ES API
05-10 16:01:19.263: E/libEGL(24536): called unimplemented OpenGL ES API
05-10 16:01:19.263: E/libEGL(24536): called unimplemented OpenGL ES API
05-10 16:01:19.263: E/libEGL(24536): called unimplemented OpenGL ES API
05-10 16:01:20.419: E/libEGL(24536): called unimplemented OpenGL ES API
05-10 16:01:20.419: E/libEGL(24536): called unimplemented OpenGL ES API
05-10 16:01:20.419: E/libEGL(24536): called unimplemented OpenGL ES API
05-10 16:01:20.544: E/AndroidRuntime(24536): FATAL EXCEPTION: GLThread 873
05-10 16:01:20.544: E/AndroidRuntime(24536): java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
05-10 16:01:20.544: E/AndroidRuntime(24536): at com.threed.jpct.CompiledInstance.fill(CompiledInstance.java:1155)
05-10 16:01:20.544: E/AndroidRuntime(24536): at com.threed.jpct.Object3DCompiler.compile(Object3DCompiler.java:145)
05-10 16:01:20.544: E/AndroidRuntime(24536): at com.threed.jpct.World.compile(World.java:1914)
05-10 16:01:20.544: E/AndroidRuntime(24536): at com.threed.jpct.World.renderScene(World.java:1038)
05-10 16:01:20.544: E/AndroidRuntime(24536): at nodes.android.MainActivity$GLRenderer.onDrawFrame(MainActivity.java:202)
05-10 16:01:20.544: E/AndroidRuntime(24536): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)
05-10 16:01:20.544: E/AndroidRuntime(24536): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)

48
Support / Re: Viable engine?
« on: May 10, 2012, 02:12:58 pm »
Got it working with swapping the textures, thanks.

Another question: Is it possible to make the windows semi-transparent, to make it looked like toned windows?

And another question: I've noticed that the model looks a hell of a lot smoother on a Galaxy S II and a Galaxy Nexus, than it does on a Desire, Desire S or Wildfire S. Is there any way to make the edges less "crispy" on low dpi devices? Anti-aliasing maybe?

Regards, MrAdam.

49
Support / Re: Viable engine?
« on: May 08, 2012, 10:52:31 am »
Thanks a lot. It works perfectly when keeping the model split up :-)
It even runs on old phones like the HTC Wildfire now.

Anyways, I got one more question. As the loader takes the materials from the 3DS file, is it possible to fetch the material in the code and change the ambient color?

Regards, MrAdam.

P.S. Sorry for the late response, I was in a bike accident last thursday ^^

50
Support / Re: Viable engine?
« on: May 03, 2012, 11:20:51 am »
Thanks. I got the loading to work with the beta, file format version matches desktop version.

Although, Ive run into a new problem with memory limits. The original 3DS file is 1.7 mb. and the serialized model is 6.4 mb.
Our old test phones die with out of memory when loading the serialized model, almost right away. (They have 24 mb heap).
But on newer phones with 32 mb heap it loads all the way, right until around the first render, then it spits out this:
Code: [Select]
05-03 11:10:09.798: E/dalvikvm-heap(21685): 287964-byte external allocation too large for this process.
What confuses me is that in your AN3DBenchXL "terrain" bench even the 24 mb heap phones is able to load the scene, but they won't load my 80k vertices model.

Ive uploaded the 3DS model to dropbox so you can see what we are dealing with:
http://dl.dropbox.com/u/63940770/basic_final80k.3DS

EDIT: It seems to me like some part of the engine might not be buffered

51
Support / Viable engine?
« on: May 02, 2012, 05:04:46 pm »
Hey there. I'm an Android developer working at a social media company in Denmark.
We recently started a project for a big customer, which requires us to show a high-poly model to the users.
So far we've tried using JMonkeyEngine, but it's performance is not nearly good enough.

We have a very detailed 3D model of a car, consisting of over 100k vertices.
Its using shaders for coloring and for the windows.

Our main problem is the memory limitations of Android devices, with most of them running out of memory trying to load the model.
I had a go at your engine, and noticed improved loading times compared to JME, but some old (and new) devices would still run out of memory during the loading.

One of your demo apps in the play store (terrain benchmark) had a vertex count of over 100k, and loaded in no time at all.
I presume its using your DeSerializer, which I've tried using, but saving the serialized object using the desktop library is using a newer version of the format, which makes it impossible to load it with the Android library.

So, my question is. Do you think your engine will be usable in regards to loading/showing a high-poly model with shaders?

Best regards, Adam Honoré

Pages: 1 2 3 [4]