Recent Posts

Pages: 1 ... 4 5 [6] 7 8 ... 10
51
Support / Re: Large obj file issue > 5mb
« Last post by mayuran.r on September 08, 2017, 12:45:42 pm »
Hi
I have done everything as you said.
But when I run, I got this error

"Can't deserialize object: [] - ERROR: Unsupported version: 6"

What could be the reason

Thanks


I found in the other Thread that I need to update the Version of JPCT-AE ,
JPCT Version 1.31 and JPCT-AE version was 1.26
So I updated the Version 1.31, it works.

Thanks
52
Support / Re: Large obj file issue > 5mb
« Last post by mayuran.r on September 08, 2017, 09:52:16 am »
Hi
I have done everything as you said.
But when I run, I got this error

"Can't deserialize object: [] - ERROR: Unsupported version: 6"

What could be the reason

Thanks
53
Support / Re: Large obj file issue > 5mb
« Last post by EgonOlsen on September 07, 2017, 04:31:52 pm »
Serialized objects are actually larger at times, but they compress very will. You can zip them and then load them via ZipInputStream.

An no, you don't need Eclipse for that but some IDE that can execute desktop Java. Android Studio might not be the best choice for this task.

What you basically do is to load your object with desktop Java/jPCT, call build() on it and then do

Code: [Select]
new DeSerializer().serialize(obj, new FileOutputStream("storage/android/some_name.ser"), true);

You can then zip the result and load it in Android similar to this

Code: [Select]
zis = new ZipInputStream(<AssetManagerInstanz>.open("some_name.ser.zip"));
try {
zis.getNextEntry();
} catch (IOException e) {
throw new RuntimeException(e);
}

Object3D obj=Loader.loadSerializedObject(zis);
54
Support / Re: Large obj file issue > 5mb
« Last post by mayuran.r on September 07, 2017, 04:17:37 pm »
Hi,

Thanks for your guidance. Sorry for the late reply.
Btw I am new to JPCT, I Managed to render the 3D models over the camera view. I have started trying out both the solution.

Thanks EgonOlsen, There are few doubts
1. Do we must need Eclipse to serialize the 3D models?
2. If we serialize the models, size of the model will be reduced?  [My Obj is comparably large (~73mb).]
3. If I have the code explanation to serialize model , it will be easy to follow and understand.

Thanks Promyclon, I am interested in this solution too.
1. I have compressed my 3D model, it came around 15mb.
2. But when I load the model , nothing is displayed. obj values are not retrieved it seems.
I could identify that by applying a texture for that model(Null value exception encountered)
If I get some code sample, I can try it out.

Also I have added  android:largeheap = true, in that scenario,
.obj values are read, but model is not rendered. I see a message in the stack as 'Suspending all threads took: 36.969ms'

I have tried out with .3ds model also(.obj converted as .3ds : ~20mb), in that case also ,
model is not rendered , but in the monitor I can see the values are read . Will it take too much of time? but in that case also I can see 'Suspending all threads took' message (but not often)

I am using Pixel for this purpose.
Hope you will guide me to a good solution

Thank you in Advance.
55
Bones / Re: Scale Problem?
« Last post by AGP on September 05, 2017, 06:41:13 am »
Before animateSkin:
Quote
*****Object-space bounds: *****
-0.328329
0.343511
-0.159473
0.230658
0.00242225
2.12075
***** ****** *****
*****World-space bounds: *****
-0.328329
0.343511
-0.159473
0.230658
0.00242225
2.12075
***** ****** *****

After animateSkin:
Quote
*****Object-space bounds: *****
9.9999998E10
-9.9999998E10
9.9999998E10
-9.9999998E10
9.9999998E10
-9.9999998E10
***** ****** *****
*****World-space bounds: *****
-9.9999998E10
9.9999998E10
-9.9999998E10
9.9999998E10
-9.9999998E10
9.9999998E10
***** ****** *****

Any clues?
56
Bones / Re: Scale Problem?
« Last post by EgonOlsen on September 04, 2017, 08:25:25 am »
How does the bounding box look in object space?
57
Bones / Re: Scale Problem?
« Last post by AGP on September 01, 2017, 10:46:16 pm »
Before animateSkin() ever gets called, I get the following bounding box: -0.328329, 0.343511, -0.159473, 0.230658, 0.00242225, 2.12075.

Afterwards, it becomes: -9.9999998E10, 9.9999998E10, -9.9999998E10, 9.9999998E10, -9.9999998E10, 9.9999998E10

The following is the method with which I print the world-space bounding box:

Code: [Select]
    public float[] getWorldSpaceBounds(Object3D obj) {
        float[] objectSpaceBounds = obj.getMesh().getBoundingBox();
       
        SimpleVector mins = new SimpleVector(objectSpaceBounds[0], objectSpaceBounds[2], objectSpaceBounds[4]);
        SimpleVector maxs = new SimpleVector(objectSpaceBounds[1], objectSpaceBounds[3], objectSpaceBounds[5]);

        SimpleVector[] p = new SimpleVector[8];
        p[0] = new SimpleVector(mins.x, mins.y, maxs.z);
        p[1] = new SimpleVector(mins.x, mins.y, mins.z);
        p[2] = new SimpleVector(maxs.x, mins.y, mins.z);
        p[3] = new SimpleVector(maxs.x, mins.y, maxs.z);
        p[4] = new SimpleVector(maxs.x, maxs.y, mins.z);
        p[5] = new SimpleVector(maxs.x, maxs.y, maxs.z);
        p[6] = new SimpleVector(mins.x, maxs.y, mins.z);
        p[7] = new SimpleVector(mins.x, maxs.y, maxs.z);

        float minX = Float.MAX_VALUE;
        float minY = Float.MAX_VALUE;
        float minZ = Float.MAX_VALUE;
        float maxX = -Float.MAX_VALUE;
        float maxY = -Float.MAX_VALUE;
        float maxZ = -Float.MAX_VALUE;

        for (int i = 0; i < 8; i++)  {
            p[i].matMul(obj.getWorldTransformation());

            if (p[i].x < minX) { minX = p[i].x; }
            if (p[i].y < minY) { minY = p[i].y; }
            if (p[i].z < minZ) { minZ = p[i].z; }
            if (p[i].x > maxX) { maxX = p[i].x; }
            if (p[i].y > maxY) { maxY = p[i].y; }
            if (p[i].z > maxZ) { maxZ = p[i].z; }
        }

        float[] worldSpaceBounds = new float[6];
        worldSpaceBounds[0] = minX;
        worldSpaceBounds[1] = maxX;
        worldSpaceBounds[2] = minY;
        worldSpaceBounds[3] = maxY;
        worldSpaceBounds[4] = minZ;
        worldSpaceBounds[5] = maxZ;

        return worldSpaceBounds;
    }
58
Bones / Re: SkeletonDebugger Auto-Scale Feature?
« Last post by raft on September 01, 2017, 04:43:03 pm »
SkeletonDebugger is nothing but a group of JPCT Pyramid primitives. try to debug it to spot where exactly error happens and with what value, might be when creating the Pyramid
59
Bones / Re: Scale Problem?
« Last post by AGP on September 01, 2017, 04:29:31 pm »
If this isn't Bones-related, I don't know what is. Especially since the vertex animations all work perfectly.
60
Bones / Re: SkeletonDebugger Auto-Scale Feature?
« Last post by AGP on September 01, 2017, 04:28:33 pm »
I meant Debugger, but obviously I would take it in Helper. ; )
Pages: 1 ... 4 5 [6] 7 8 ... 10