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 - thiamant

Pages: [1] 2
1
Support / Re: Scaling objects dynamically
« on: October 08, 2010, 10:56:01 pm »
OK. I'm trying to use setScale and apparently it's scaling correctly. The problem is that I don't appreciate any distance increase from the center of the model. Imagine a theatre and the camera pointing to a door from the center of the theatre. When scaling the whole object the door should be seen far away but it's not. I've tried increasing the FOV but with higher values the optical effect is just too bad.

Any ideas about why this is happening and possible solutions? Maybe I'm just getting the concept wrong (scaling effect and such).

2
Support / Re: Scaling objects dynamically
« on: October 07, 2010, 09:34:36 pm »
Code: [Select]
object.disableLazyTransformations();
object.scale(1.5f);
object.enableLazyTransformations();

I do this in the onDraw method if certains conditions are met. This is done before this code:

Code: [Select]
fb.clear(skycolor);
world.renderScene(fb);
world.draw(fb);

3
Support / Scaling objects dynamically
« on: October 07, 2010, 07:48:15 pm »
I'm trying to scale a model dynamically when the model is already running and visible. Do I have to rebuild the object or something like that? After calling .scale() method the object disappears and I can only see the framebuffer empty (with the background colour).

4
Support / Adding preferences
« on: September 30, 2010, 10:29:27 pm »
Hello,

I'm trying to add some preferences running an activity that is extending PreferenceActivity. The problem is that when starting the activity changing some preferences and then coming back most of the polygons are not showing anymore (the onStop method is being called and I guess some memory is being freed and hence the model not showing properly). I can't load the model again just for changing some preferences since it takes too long so I'm just loading it the first time that onSurfaceCreated method is called.

Is there any way to force android not to release any memory ? I've been trying to setPersistent(true) but it's not working.

Thanks

5
Support / Re: Loading screen
« on: September 30, 2010, 07:40:19 pm »
Ok. Fixed. Showing dialogs instead of ImageViews and working properly. This is also working ok with jpct as the dialog keeps showing even when OpenGL is loading.

6
Support / Loading screen
« on: September 30, 2010, 06:03:59 pm »
I'm trying to display a loading picture. I want it to be displayed between the time of the application start and until the first frame of the model has been displayed. I can't seem to get this work with an ImageView at the start because once the renderer is created the screen goes black again.

Any ideas? Thanks.

7
Support / Re: Object serialization octrees
« on: September 24, 2010, 11:25:25 am »
Is this finally going to be done? I've been trying to do this manually with Java reflection but I don't know the structures used in the Object3D class when the method object.setOcTree(oc) is called...

8
Support / Re: Loading big models (memory issues)
« on: September 20, 2010, 12:50:28 pm »
There's no jPCT lines that show any error at all. Anyway, we've reduced the model and it's working ok now.

9
Support / Re: Object serialization octrees
« on: September 15, 2010, 09:44:15 pm »
It would be interesting for collision detection optimization over serialized objects.

10
Support / Re: Loading big models (memory issues)
« on: September 15, 2010, 08:26:11 pm »
Edited the post with additional information

11
Support / Re: Loading big models (memory issues)
« on: September 14, 2010, 03:37:34 pm »
This is the exception that is causing the crash:

09-14 19:31:48.118: ERROR/mm-camera(57): +++ DELETING LEAKED MEMORY AT 0x2a980 (2 REMAINING)
09-14 19:31:48.118: ERROR/mm-camera(57):      6 0xa942ba44
09-14 19:31:48.118: ERROR/mm-camera(57):      5 0xa940bfc2
09-14 19:31:48.118: ERROR/mm-camera(57):      4 0xa940d768
09-14 19:31:48.118: ERROR/mm-camera(57):      3 0xa940d27e
09-14 19:31:48.118: ERROR/mm-camera(57):      2 0xafe10074
09-14 19:31:48.118: ERROR/mm-camera(57):      1 0xafe0fb48
09-14 19:31:48.118: ERROR/mm-camera(57): +++ DELETING LEAKED MEMORY AT 0x2a580 (1 REMAINING)
09-14 19:31:48.118: ERROR/mm-camera(57):      6 0xa942ba44
09-14 19:31:48.118: ERROR/mm-camera(57):      5 0xa940bfc2
09-14 19:31:48.118: ERROR/mm-camera(57):      4 0xa940d768
09-14 19:31:48.118: ERROR/mm-camera(57):      3 0xa940d27e
09-14 19:31:48.118: ERROR/mm-camera(57):      2 0xafe10074
09-14 19:31:48.118: ERROR/mm-camera(57):      1 0xafe0fb48
09-14 19:38:20.528: ERROR/AndroidRuntime(10181): ERROR: thread attach failed
09-14 19:38:21.968: ERROR/AndroidRuntime(10196): ERROR: thread attach failed
09-14 19:38:22.958: ERROR/PackageInstallationReceiver(8167): Remove /data/local/tmp/com.jpct.apk Fail!
09-14 19:38:36.628: ERROR/dalvikvm-heap(10208): 288000-byte external allocation too large for this process.
09-14 19:38:36.638: ERROR/dalvikvm(10208): Out of memory: Heap Size=12487KB, Allocated=9857KB, Bitmap Size=3894KB
09-14 19:38:36.668: ERROR/AndroidRuntime(10208): Uncaught handler: thread GLThread 7 exiting due to uncaught exception
09-14 19:38:36.718: ERROR/AndroidRuntime(10208): java.lang.OutOfMemoryError
09-14 19:38:36.718: ERROR/AndroidRuntime(10208):     at org.apache.harmony.luni.platform.OSMemory.malloc(Native Method)
09-14 19:38:36.718: ERROR/AndroidRuntime(10208):     at org.apache.harmony.luni.platform.PlatformAddressFactory.alloc(PlatformAddressFactory.java:145)
09-14 19:38:36.718: ERROR/AndroidRuntime(10208):     at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:67)
09-14 19:38:36.718: ERROR/AndroidRuntime(10208):     at java.nio.ReadWriteDirectByteBuffer.<init>(ReadWriteDirectByteBuffer.java:51)
09-14 19:38:36.718: ERROR/AndroidRuntime(10208):     at java.nio.BufferFactory.newDirectByteBuffer(BufferFactory.java:95)
09-14 19:38:36.718: ERROR/AndroidRuntime(10208):     at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:71)
09-14 19:38:36.718: ERROR/AndroidRuntime(10208):     at com.threed.jpct.CompiledInstance.fill(CompiledInstance.java:662)
09-14 19:38:36.718: ERROR/AndroidRuntime(10208):     at com.threed.jpct.Object3DCompiler.compile(Object3DCompiler.java:134)
09-14 19:38:36.718: ERROR/AndroidRuntime(10208):     at com.threed.jpct.World.compile(World.java:2021)
09-14 19:38:36.718: ERROR/AndroidRuntime(10208):     at com.threed.jpct.World.renderScene(World.java:1057)
09-14 19:38:36.718: ERROR/AndroidRuntime(10208):     at com.jpct.Main$MyRenderer.onDrawFrame(Main.java:410)
09-14 19:38:36.718: ERROR/AndroidRuntime(10208):     at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1136)
09-14 19:38:36.718: ERROR/AndroidRuntime(10208):     at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:977)
09-14 19:38:42.038: ERROR/ActivityManager(83): fail to set top app changed!

This happens when calling world.renderScene(fb) for the first time.

12
Support / Re: Loading big models (memory issues)
« on: September 13, 2010, 05:19:39 pm »
I've found out that this is a problem with the android version. Using the same hardware specifications in the emulator and running both 1.6 and 2.1 versions the program crashes only on 2.1 due to OutOfMemoryException, which seems kind of weird. Any ideas?

13
Support / Object serialization octrees
« on: September 13, 2010, 03:35:11 pm »
Does object serialization (DeSerializer class) include octrees asigned to it?

Is it loading automatically when loadSerializedObject is called?

14
Support / Re: Loading big models (memory issues)
« on: September 11, 2010, 12:28:07 pm »
I've already tried to load the model without textures and it still crashes on htc desire.

I will try to perform a debug on this one and see what happens.

15
Support / Re: Loading big models (memory issues)
« on: September 10, 2010, 02:27:06 pm »
I'm sorry but im under NDA and can't show these models. But in the emulator it crashes due to an OutOfMemoryException. I have to launch the emulator with 256 MB RAM and max heap size of around 128 MB to make it work, and I think that htc desire has lower heap size allowed.

Pages: [1] 2