Main Menu
Menu

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.

Show posts Menu

Messages - nmhung1507

#1
Support / Re: Load large file to Android device
February 05, 2021, 09:32:19 AM
I checked the model in Windows and I can view it perfectly. I also checked the maxPolysVisible, the constant defined is 512 and the number of sub-object is only 241. I tried to increase it to 1024 but nothing difference.
This is the screen shoot: https://imgur.com/a/uQZcJaU
It look like the camera is too near the object. I used Camera.moveCamera(Camera.CAMERA_MOVEOUT, speed) to move camera far-away but there is no result.
Here is my desktop source to serialize the model:

Object3D[] obj = Loader.load3DS("car.3ds", 1);
for (int i = 0; i < obj.length; i++) {
    obj[i].build();
}
new DeSerializer().serializeArray(obj, new FileOutputStream("car.ser"), true);

Android source to load model:

zis = new ZipInputStream(assMan.open("models/car.ser.zip"));
zis.getNextEntry();
Object3D[] objs = Loader.loadSerializedObjectArray(zis);
Object3D o3d = Object3D.mergeAll(objs);
Log.d(TAG, "Num of sub object: " + objs.length); // THIS LOGGED 241 SUB-OBJECTS
o3d.build();
world.addObject(o3d);

Camera cam = world.getCamera();
cam.moveCamera(Camera.CAMERA_MOVEOUT, 2000);
cam.lookAt(o3d.getTransformedCenter());


I also attached desktop log of serializing the model as well as android log of loading it. You can see it if you want more information.
Thank you very much indeed!
#2
Support / Load large file to Android device
February 05, 2021, 06:23:40 AM
Hi,
I need to load and render a relatively large (~10Mb) 3DS file to android device.
The link to download file: https://free3d.com/3d-model/vw-touareg-72326.html
I've tried to serialize it, zipped it and load it to android device but it seems that the model has not been rendered correctly (missing a lot of component). With smaller file, it's OK.
My question is: is it feasible to load ~10Mb model using JPCT?
I've read your old comment (since 2011) in this forum that >3.5Mb is too large file to mobile device, but I think that with the power of hardware nowadays, 10Mb is not a real problem.
Thanks!