jPCT-AE - a 3d engine for Android > Support

Not able load md2 file with size 358 KB

(1/2) > >>

JKumar:
Hi,

          I tried to load a md2 file with size 358 kb but its going out of memory.

Is there any max limit for the jPCT engine for rendering md2 files??

Can anyone provide any reference for loading and rendering a md2 file as i followed the same process of using Loader.loadMD2 but its going out of memory?

Please help

raft:
you can try loading your model with desktop jPCT and serialize it.

--- Code: ---new DeSerializer.serialize(..)
--- End code ---

than load it in AE via

--- Code: ---Loader.loadSerializedObject(..)
--- End code ---

JKumar:
HI,

        I serialized the model and it came around 1.9MB . The engine is not showing any memory exception but i am not able to see any rendering and its just a black screen

Following are my rendering logs:


09-15 03:53:21.985: INFO/jPCT-AE(2261): Adding Lightsource: 0
09-15 03:53:22.005: INFO/jPCT-AE(2261): OpenGL vendor:     Android
09-15 03:53:22.005: INFO/jPCT-AE(2261): OpenGL renderer:   Android PixelFlinger 1.0
09-15 03:53:22.005: INFO/jPCT-AE(2261): OpenGL version:    OpenGL ES-CM 1.0
09-15 03:53:22.005: INFO/jPCT-AE(2261): OpenGL renderer initialized (using 2 texture stages)
09-15 03:53:22.885: DEBUG/dalvikvm(2261): GC freed 17789 objects / 776040 bytes in 110ms
09-15 03:53:23.095: INFO/jPCT-AE(2261): Remapping 1618 vertex indices!
09-15 03:53:23.095: INFO/jPCT-AE(2261): Creating vertex cache (38832 bytes)!
09-15 03:53:23.105: INFO/jPCT-AE(2261): Vertex indices will be mapped!
09-15 03:53:23.105: INFO/jPCT-AE(2261): Subobject of object 0/rock compiled to indexed fixed point data using 7218 vertices in 849ms!
09-15 03:53:23.105: INFO/jPCT-AE(2261): Object 0/rock compiled to 1 subobjects in 1094ms!

raft:
it can be because of ligthing and/or camera position and direction.
start with turning on ambient lighting to max value

--- Code: ---World.setAmbientLight(255, 255, 255)
--- End code ---
and try to place camera at a proper distance where it can see the whole scene. this depends on scaling of your model.

JKumar:
THANX....Its working fine now.

Navigation

[0] Message Index

[#] Next page

Go to full version