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

Topics - Simdanfeg

#1
Support / Unsupported Texture width
April 03, 2013, 12:21:15 PM
 :o  Previously run no problem re-run today appear Unsupported the Texture width error,Change the previous code ,use the InputStream instead of Drawable way to load the texture ,Still does not work

04-03 09:36:27.872: I/jPCT-AE(692): Loading Texture...
04-03 09:36:27.872: I/jPCT-AE(692): [ 1364981787878 ] - ERROR: Unsupported Texture width: 320
04-03 09:36:27.892: I/jPCT-AE(692): [ 1364981787898 ] - ERROR: java.lang.RuntimeException: [ 1364981787878 ] - ERROR: Unsupported Texture width: 320
04-03 09:36:27.892: I/jPCT-AE(692): at com.threed.jpct.Logger.log(Logger.java:189)
04-03 09:36:27.892: I/jPCT-AE(692): at com.threed.jpct.Texture.loadTexture(Texture.java:798)
04-03 09:36:27.892: I/jPCT-AE(692): at com.threed.jpct.Texture.loadTexture(Texture.java:771)
04-03 09:36:27.892: I/jPCT-AE(692): at com.threed.jpct.Texture.<init>(Texture.java:178)
04-03 09:36:27.892: I/jPCT-AE(692): at sim.feel.MyRenderer.loadTexture(MyRenderer.java:84)
04-03 09:36:27.892: I/jPCT-AE(692): at sim.feel.MyRenderer.onSurfaceCreated(MyRenderer.java:124)
04-03 09:36:27.892: I/jPCT-AE(692): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1317)
04-03 09:36:27.892: I/jPCT-AE(692): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
04-03 09:36:27.952: W/dalvikvm(692): threadid=7: thread exiting with uncaught exception (group=0x4001d800)
04-03 09:36:27.984: E/AndroidRuntime(692): FATAL EXCEPTION: GLThread 8
04-03 09:36:27.984: E/AndroidRuntime(692): java.lang.RuntimeException: [ 1364981787898 ] - ERROR: java.lang.RuntimeException: [ 1364981787878 ] - ERROR: Unsupported Texture width: 320
04-03 09:36:27.984: E/AndroidRuntime(692): at com.threed.jpct.Logger.log(Logger.java:189)
04-03 09:36:27.984: E/AndroidRuntime(692): at com.threed.jpct.Texture.loadTexture(Texture.java:798)
04-03 09:36:27.984: E/AndroidRuntime(692): at com.threed.jpct.Texture.loadTexture(Texture.java:771)
04-03 09:36:27.984: E/AndroidRuntime(692): at com.threed.jpct.Texture.<init>(Texture.java:178)
04-03 09:36:27.984: E/AndroidRuntime(692): at sim.feel.MyRenderer.loadTexture(MyRenderer.java:84)
04-03 09:36:27.984: E/AndroidRuntime(692): at sim.feel.MyRenderer.onSurfaceCreated(MyRenderer.java:124)


#2
Support / texture
May 07, 2012, 03:31:57 AM
Hi,Could I use the engine to one of surface texture?
#3
Support / some question about md2
January 04, 2012, 10:20:47 AM
 ;D,I was asked this in jpct-ae md2 engine used in a variety of actions to achieve it, if I want to achieve the figure still, moving, death, how to do it ????
#4
Support / some question about "Collision detection"
December 14, 2011, 11:08:43 AM
Hi,  EgonOlsen
      A few months ago,You give me an example of a collision detection,I have read and understand
it,This example "Collision detection" is now learning,I can not understand this example of the move method,Want your help,thank you very much!
#5
Support / Md2 format conversion problems to the ser
July 04, 2011, 09:09:05 AM
 ::)     i'll try change the md2 format(228,764  bytes) to ser,but its size become too large(1,063,604  bytes) , e.g. i want to conversion snork.md2 to snork.ser,there is my code .


TextureManager.getInstance().addTexture("disco",
new Texture("res/disco.jpg"));
Object3D alien = Loader.loadMD2("res/snork.md2", 0.8f);
alien.setTexture("disco");
alien.compile(true);
alien.build();
alien.getAnimationSequence().remove(3);
alien.getAnimationSequence().remove(4);
alien.getAnimationSequence().remove(6);
alien.getAnimationSequence().remove(7);
new DeSerializer().serialize(alien, new FileOutputStream("snork.ser"),
true);



i wonder why it become too large after conversion format ;D
#6
Support / AdvancedExample OutOfMemoryError
May 24, 2011, 03:46:08 AM
 ::),when i test the example AdvancedExample,i occur the OutOfMemoryError,i try to check it ,and found if load the format md2(after create plane ,rock,not create sky) ,this situation will be encountered.i also setting some parameters. e.g  call forceGeometryIndices() before build() and call strip().  also called the method Texture.defaultTo4bpp(true).
btw : I reduced the size of the picture
there is my error message

05-24 01:26:29.331: ERROR/AndroidRuntime(997): java.lang.OutOfMemoryError
05-24 01:26:29.331: ERROR/AndroidRuntime(997):     at org.apache.harmony.luni.platform.OSMemory.malloc(Native Method)
05-24 01:26:29.331: ERROR/AndroidRuntime(997):     at org.apache.harmony.luni.platform.PlatformAddressFactory.alloc(PlatformAddressFactory.java:129)
05-24 01:26:29.331: ERROR/AndroidRuntime(997):     at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:65)
05-24 01:26:29.331: ERROR/AndroidRuntime(997):     at java.nio.ReadWriteDirectByteBuffer.<init>(ReadWriteDirectByteBuffer.java:48)
05-24 01:26:29.331: ERROR/AndroidRuntime(997):     at java.nio.BufferFactory.newDirectByteBuffer(BufferFactory.java:93)
05-24 01:26:29.331: ERROR/AndroidRuntime(997):     at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:65)
05-24 01:26:29.331: ERROR/AndroidRuntime(997):     at com.threed.jpct.GLRenderer.getTextureStages(GLRenderer.java:1535)
05-24 01:26:29.331: ERROR/AndroidRuntime(997):     at com.threed.jpct.GLRenderer.init(GLRenderer.java:469)
05-24 01:26:29.331: ERROR/AndroidRuntime(997):     at com.threed.jpct.FrameBuffer.<init>(FrameBuffer.java:82)
05-24 01:26:29.331: ERROR/AndroidRuntime(997):     at sim.feel.MyRenderer.onSurfaceChanged(MyRenderer.java:107)
05-24 01:26:29.331: ERROR/AndroidRuntime(997):     at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1356)
05-24 01:26:29.331: ERROR/AndroidRuntime(997):     at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)

#7
Support / a question about collision detection
May 18, 2011, 11:09:14 AM
 ;D
I would like to ask the realization principle of collision detection,  I saw examples of that on the collision detection, but still very unclear, such as the following code, cube is how to detect a collision with those objects, and collision detection is how to achieve, ???


// Move method
public void move() {
if (up) {
SimpleVector t = cube.getZAxis();
t.scalarMul(SPEED);
moveRes.add(t);
}
if (down) {
SimpleVector t = cube.getZAxis();
t.scalarMul(-SPEED);
moveRes.add(t);
}
if (left) {
cube.rotateY((float) Math.toRadians(-1));
}
if (right) {
cube.rotateY((float) Math.toRadians(1));
}
// Avoid high speed
if (moveRes.length() > SPEED) {
moveRes.makeEqualLength(new SimpleVector(0, 0, MAXSPEED));
}
cube.translate(0, -0.02f, 0);

// collisionEllipsoid
cube.checkForCollisionEllipsoid(moveRes, ellipsoid, 8);
cube.translate(moveRes);

SimpleVector t = new SimpleVector(0, 1, 0);
t = cube.checkForCollisionEllipsoid(t, ellipsoid, 1);
cube.translate(t);

// damping
if (moveRes.length() > DAMPING) {
moveRes.makeEqualLength(new SimpleVector(0, 0, DAMPING));
} else {
moveRes = new SimpleVector(0, 0, 0);
}
}
#8
Support / A question about keyFrame animation
April 13, 2011, 05:17:34 AM
Thank you for your help, now I have a new question to ask your advice. I had five balls of different sizes with 3dMax, when I use the frame of animation only shows the first frame, I do not know why, I also searched the forum-related information, but still failed to resolve, the following I Show me the code to stick in here, I hope you can help me.


thing = loadModel("s0.3DS", scale);
Animation anim = new Animation(5);

anim.createSubSequence("default");
anim.addKeyFrame(thing.getMesh());

anim.createSubSequence("change");
anim.addKeyFrame(loadModel("s2.3DS", scale).getMesh());
anim.addKeyFrame(loadModel("s3.3DS", scale).getMesh());
anim.addKeyFrame(loadModel("s4.3DS", scale).getMesh());
anim.addKeyFrame(loadModel("s1.3DS", scale).getMesh());
thing.setAnimationSequence(anim);

thing.build();
world.addObject(thing);




private Object3D loadModel(String fileName, float scale) {
Loader.setVertexOptimization(false);
Object3D[] model = Loader.load3DS(LoadFile.loadf(fileName), scale);
Object3D o3d = new Object3D(0);
Object3D temp = null;

for (int i = 0; i < model.length; i++) {
temp = model[i];
temp.setCenter(SimpleVector.ORIGIN);
temp.rotateX((float) (Math.PI / 2));
temp.rotateMesh();
temp.setRotationMatrix(new Matrix());
o3d = Object3D.mergeObjects(o3d, temp);
o3d.build();
}
return o3d;
}



public void doAnim() {
{
ind += 0.02f;
if (ind > 1f) {
ind -= 1f;
}
}
thing.animate(ind, an);
}
#9
      I have loaded the 3ds file and texture image , but there have some question which i can't resolve.
I think it is the same as this picturehttp://hi.csdn.net/space-3965048-do-album-picid-786468.html,
but it is like thishttp://hi.csdn.net/space-3965048-do-album-picid-786468-goto-down.html .

can you give me some suggestion ,If necessary, I will attach the source code
#10
Hello everybody, I ask where you can download more examples JPCT-AE, I would like to learn a good bit more JPCT-AE knowledge.
???