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

#1
Support / texture mismatch
August 28, 2013, 08:30:27 AM
hi, I write a jpct program, where has many object3D. some times a random bug happened.
one object3D's texture becomes another object3D's texture.
when the program run, it may replace and unload texture , do you have any idea ?
#2
Support / render movie to 3D object
May 16, 2013, 01:20:54 PM
hi, is this possible ? render movie to a 3D object .
#3
Support / jPCT and real 3D
September 16, 2012, 07:02:25 AM
Dear Egon,
     some android based smart TV sets support output two different
3d images  (one for left eye and one for right eye ) to support real 3D.
I wonder how to do this with jPCT-AE ?
does jPCT support two cameras  in a World ?
so with these two cameras (one for left eye, one for right eye), I can
render scene for different eyes ?
can I instantiate two FrameBuffers in a same GLSurfaceView (each one occupies half of the surface view)?
and render the World (with different camera) to each of them ?
#4
Support / jPCT PC and jPCT AE
September 13, 2012, 07:50:52 AM
hi, I usually develop my app first on PC with jPCT PC version,
when I think it is bug free, I port it to jPCT android with only
a little effort. this is good.
but I found on jPCT PC version Light is com.threed.jpct.util.Light
and jPCT android version Light is com.threed.jpct.Light.
when porting , I have to change the import statement.
I dont know why the Light sits on different package ?
#5
Support / modeling with jPCT
May 18, 2012, 09:41:40 AM
hi, my colleague have give me a model which he rendered in After Effect.
and now I load the obj into jPCT and want to re-render it, but the
result is not the same. the attachment is the two rendered picture.

I got object position, and light position, and camera position from my colleague,
but I dont know how to set camera direction and orientation (I know the method,
but I dont know how to calucate the correct arguments to feed the method)

any hint(code snippet) to help me re-render the object ? thanks very much.


[attachment deleted by admin]
#6
Support / revert to OpenGL ES 1.1
April 05, 2012, 05:07:48 AM
I enable OpenGL ES 2.0 on my apps with
   <uses-feature android:glEsVersion="0x00020000" android:required="true" >
and setEGLContextClientVersion(2);

and when I want to revert to OpenGL ES 1.1 , I commented out them,
but jPCT seems still loading shaders and called unimplement OpenGL  ES 2.0 api.

log follows,

04-05 11:17:53.607: D/dalvikvm(3100): GC_EXPLICIT freed 4 objects / 128 bytes in 48ms
04-05 11:17:53.787: I/jPCT-AE(3100): texture: board4.jpg loaded.
04-05 11:17:54.779: D/libEGL(3100): loaded /system/lib/egl/libGLES_android.so
04-05 11:17:54.795: D/libEGL(3100): loaded /system/lib/egl/libEGL_POWERVR_SGX530_121.so
04-05 11:17:54.802: D/libEGL(3100): loaded /system/lib/egl/libGLESv1_CM_POWERVR_SGX530_121.so
04-05 11:17:54.818: D/libEGL(3100): loaded /system/lib/egl/libGLESv2_POWERVR_SGX530_121.so
04-05 11:17:55.576: D/dalvikvm(3100): GC_EXTERNAL_ALLOC freed 136 objects / 6960 bytes in 58ms
04-05 11:17:55.607: I/dalvikvm(3100): Could not find method android.opengl.GLES20.glVertexAttribPointer, referenced from method com.threed.jpct.GL20.glColorPointer
04-05 11:17:55.607: W/dalvikvm(3100): VFY: unable to resolve static method 132: Landroid/opengl/GLES20;.glVertexAttribPointer (IIIZII)V
04-05 11:17:55.607: D/dalvikvm(3100): VFY: replacing opcode 0x77 at 0x0010
04-05 11:17:55.607: I/dalvikvm(3100): Could not find method android.opengl.GLES20.glDrawElements, referenced from method com.threed.jpct.GL20.glDrawElements
04-05 11:17:55.607: W/dalvikvm(3100): VFY: unable to resolve static method 66: Landroid/opengl/GLES20;.glDrawElements (IIII)V
04-05 11:17:55.607: D/dalvikvm(3100): VFY: replacing opcode 0x71 at 0x0000
04-05 11:17:55.607: D/dalvikvm(3100): VFY: dead code 0x0003-0003 in Lcom/threed/jpct/GL20;.glDrawElements (IIII)V
04-05 11:17:55.615: I/dalvikvm(3100): Could not find method android.opengl.GLES20.glVertexAttribPointer, referenced from method com.threed.jpct.GL20.glNormalPointer
04-05 11:17:55.615: W/dalvikvm(3100): VFY: unable to resolve static method 132: Landroid/opengl/GLES20;.glVertexAttribPointer (IIIZII)V
04-05 11:17:55.615: D/dalvikvm(3100): VFY: replacing opcode 0x77 at 0x0010
04-05 11:17:55.615: I/dalvikvm(3100): Could not find method android.opengl.GLES20.glVertexAttribPointer, referenced from method com.threed.jpct.GL20.glTexCoordPointer
04-05 11:17:55.615: W/dalvikvm(3100): VFY: unable to resolve static method 132: Landroid/opengl/GLES20;.glVertexAttribPointer (IIIZII)V
04-05 11:17:55.615: D/dalvikvm(3100): VFY: replacing opcode 0x77 at 0x0018
04-05 11:17:55.615: I/dalvikvm(3100): Could not find method android.opengl.GLES20.glVertexAttribPointer, referenced from method com.threed.jpct.GL20.glVertexPointer
04-05 11:17:55.615: W/dalvikvm(3100): VFY: unable to resolve static method 132: Landroid/opengl/GLES20;.glVertexAttribPointer (IIIZII)V
04-05 11:17:55.623: D/dalvikvm(3100): VFY: replacing opcode 0x77 at 0x0010
04-05 11:17:55.623: I/dalvikvm(3100): Could not find method android.opengl.GLES20.glVertexAttribPointer, referenced from method com.threed.jpct.GL20.setTangents
04-05 11:17:55.623: W/dalvikvm(3100): VFY: unable to resolve static method 132: Landroid/opengl/GLES20;.glVertexAttribPointer (IIIZII)V
04-05 11:17:55.623: D/dalvikvm(3100): VFY: replacing opcode 0x77 at 0x001f
04-05 11:17:55.693: I/jPCT-AE(3100): Initializing GL20 render pipeline...
04-05 11:17:55.693: I/jPCT-AE(3100): Support for VBO when running OpenGL ES 2.0 is faulty in Android 2.2...VBO will be disabled!
04-05 11:17:55.693: I/jPCT-AE(3100): Accessing shaders via JAR!
04-05 11:17:55.693: I/jPCT-AE(3100): Loading default shaders !
04-05 11:17:55.693: I/jPCT-AE(3100): 0 shaders in replacement map!
04-05 11:17:55.693: I/jPCT-AE(3100): Default fragment shader is: /defaultFragmentShader.src
04-05 11:17:56.412: I/jPCT-AE(3100): Loading file from InputStream
04-05 11:17:56.412: I/jPCT-AE(3100): Text file from InputStream loaded...2008 bytes
04-05 11:17:56.420: I/jPCT-AE(3100): Default vertex shader is: /defaultVertexShader.src
04-05 11:17:56.420: I/jPCT-AE(3100): Loading file from InputStream
04-05 11:17:56.427: I/jPCT-AE(3100): Text file from InputStream loaded...3897 bytes
04-05 11:17:56.427: I/jPCT-AE(3100): Compiling shader program!
04-05 11:17:56.435: E/libEGL(3100): called unimplemented OpenGL ES API
04-05 11:17:56.435: E/libEGL(3100): called unimplemented OpenGL ES API
04-05 11:17:56.435: E/libEGL(3100): called unimplemented OpenGL ES API
04-05 11:17:56.435: E/libEGL(3100): called unimplemented OpenGL ES API
04-05 11:17:56.435: E/libEGL(3100): called unimplemented OpenGL ES API
04-05 11:17:56.435: I/jPCT-AE(3100): Could not compile shader 35633:
04-05 11:17:56.435: E/libEGL(3100): called unimplemented OpenGL ES API
04-05 11:17:56.435: I/jPCT-AE(3100): [ 1333595876439 ] - ERROR: Failed to load and compile vertex shaders!
04-05 11:17:56.435: I/jPCT-AE(3100): [ 1333595876439 ] - WARNING: Unable to load shader!
04-05 11:17:56.482: I/jPCT-AE(3100): [ 1333595876484 ] - ERROR: java.lang.RuntimeException: [ 1333595876439 ] - ERROR: Failed to load and compile vertex shaders!
04-05 11:17:56.482: I/jPCT-AE(3100): at com.threed.jpct.Logger.log(Logger.java:189)
04-05 11:17:56.482: I/jPCT-AE(3100): at com.threed.jpct.GLSLShader.loadProgram(GLSLShader.java:655)
04-05 11:17:56.482: I/jPCT-AE(3100): at com.threed.jpct.GLSLShader.<init>(GLSLShader.java:254)
04-05 11:17:56.482: I/jPCT-AE(3100): at com.threed.jpct.GL20.<init>(GL20.java:118)
04-05 11:17:56.482: I/jPCT-AE(3100): at java.lang.Class.newInstanceImpl(Native Method)
04-05 11:17:56.482: I/jPCT-AE(3100): at java.lang.Class.newInstance(Class.java:1429)
04-05 11:17:56.482: I/jPCT-AE(3100): at com.threed.jpct.GLRenderer.init(GLRenderer.java:368)



#7
Support / rotate around edge
March 26, 2012, 10:44:53 AM
I have a  thin board-like  object, when I
call  obj.rotateX(), the board will rotate around its upper edge,
now I want to make it rotate around its lower edge, what should
I do with jpct ? thanks.
#8
Support / can jpct-ae run on mips cpu ?
March 08, 2012, 04:05:14 AM
my app use jpct-ae and can running on a ARM-based machine,
but can not install on a MIPS-based machine, I think jpct-ae is
pure java, but why it can not installed on a mips-based machine ?
we have another 3D app written in OpenGL ES, and can run in both
ARM-based machine and MIPS-based machine.
#9
Support / object edge blinking
February 07, 2012, 11:22:56 AM
I use two triangle to form a square, and use a serial of png picture  to do frame animation.
when animating, some animation make the object edge blinks. I dont know what's the cause .


float[] coord_menu  = {
    0.0f, 0.0f, 0.0f,
    0.0f,10.0f, 0.0f,
    10.0f,10.0f, 0.0f,
    10.0f, 0.0f, 0.0f,
    };
    float[] uvs = {
    0.0f, 0.0f,
    0.0f,1.0f,
    1.0f,1.0f,
    1.0f,0.0f,
    };
    int[] indices = {
    0,1,2,
    2,3,0,   
    };
   
    Object3D menu = new Object3D(coord_menu,uvs,indices,TextureManager.TEXTURE_NOTFOUND);



       I use menu.setTexture() to set a series of texture to make the menu animating, when disable
transparent, the menu's edge blinks, with transparent enable,  the blinking exist also.
#10
Support / Object and Texture lost after Activity resume
February 04, 2012, 08:55:06 AM
hi, I have two  jPCT-AE activity, activity A starts activity B, after back from B to A, some objects
and textures of activity A lost, not show on the screen, what's the problem here ? thanks.

=========== renderer resume code =================

public void onSurfaceChanged(GL10 gl, int width, int height) {
// TODO Auto-generated method stub
if (fb == null) {
Logger.log("==== Launcher launch: " +width+"X" +height);
fb = new FrameBuffer(gl, width, height);
mLauncher.tearDown();
mLauncher.setup();
mLauncher.setFrameBuffer(fb);
mLauncher.setFrameBlitter(new AndroidFrameBlitter(fb));

}else{
fb.dispose();
fb = new FrameBuffer(gl, width, height);

mLauncher.setFrameBuffer(fb);
mLauncher.setFrameBlitter(new AndroidFrameBlitter(fb));
}
}


ps:  activity B starts a normal android ui activity C , and when back from C to B, the objects and texture is ok.
the renderer code is similar.
#11
Support / apply textureEffect
January 04, 2012, 09:49:51 AM
what's the exact format of  param  src  in ITextueEffect. apply(int[] dest,  int src[]) ?
I have a  128x128 texture and in apply() , I found src.length is 16513., but 128x128=16384
they are not the same.
#12
Support / memory management in android 3d game
December 23, 2011, 02:17:50 AM
I found dalvik vm's heap memeory is very limited, my app just use some textures and load 2 models,
and the dalvik vm throws OutOfMemoryError exception.
I am doubtl how other people implement 3d game in android, how do you manage the memory ?
#13
Support / texture is faded after Object3D.setTransparent
December 23, 2011, 01:45:46 AM
please see the attachement. I want to let the icon's black background
be transparent,  and do a setTransparent(0) on the icon. the result
is the icon seems faded than before, how can I keep it as before ?
thanks.

[attachment deleted by admin]
#14
Support / lost texture when do animating
December 21, 2011, 01:56:37 PM
I do a setTexture on my model , and setup keyframe animation for it,
but after animate, the model become black, seems lost its texture ,
how can I keep the texture ? should re setTexture after each frame ?
thanks.
#15
Support / showing 3DS model without texture
December 21, 2011, 01:48:22 AM
My colleague have made  a model for me. He only apply some material to the model, and not texture.
the model looks realistic  in Cinema 4D. and he export the model to .3ds file, and I load this file to jPCT,
the model looks black in jPCT,   how can I make it looks realistic as it in Cinema 4D ? thanks.
#16
Support / any hint on anti-alias ?
December 20, 2011, 10:03:53 AM
hi,  my app will run on a custom hardware, and it only support opengl es 1.0,
so how should  I implement anti-alias on my app with jPCT-AE ? thanks.
#17
Support / project 3D to 2D
December 12, 2011, 09:08:57 AM
I have a dummy Object, which has a child Object called Object A, vertex a is one of A's vertex,
I want to project vertex a to screen, it seems that I can not just use Interact2D.project2D3D
and take a as its argument to get the proper 2D coordinate, so what should I do ? thanks.
#18
said I want to rotate a rectangle around a axis which is parallel to XAxis, how can I do this in jPCT,
can someone show me some code ? I am new to opengl and jPCT programming. thanks.
#19
Support / question with keyframe animation
November 25, 2011, 09:55:33 AM
hi,
     I am experimenting Animation with the following code:

   private class MyVertexController extends GenericVertexController{
    /**
*
*/
private static final long serialVersionUID = 1L;
private float mOff = 0.0f;
    public MyVertexController(float off){
    mOff = off;
    }
@Override
public void apply() {
// TODO Auto-generated method stub
SimpleVector[] src = this.getSourceMesh();
SimpleVector[] dst = this.getDestinationMesh();
Logger.log("src length: "+src.length+" dst length: "+dst.length);
for(int i=0; i<src.length && i<dst.length; i++){
dst[i].x = src[i].x + mOff;
}

}
   
    }
    private void setupAnimate(Object3D obj){
   
    obj.build();
    Mesh mesh = obj.getMesh();
   
    Object3D obj1 = obj.cloneObject();
    Object3D obj2 = obj.cloneObject();
    //world.addObject(obj1);
    //world.addObject(obj2);
   
    Mesh mesh1 = mesh.cloneMesh(true);
    obj1.setMesh(mesh1);
    //obj1.rotateX(1.4f);
    //obj1.rotateMesh();
   
    obj1.build();
    if(mesh1.setVertexController(new MyVertexController(0.0f), true))
    Logger.log("vertex controller set for mesh1");
    mesh1.applyVertexController();

    Mesh mesh2 = mesh.cloneMesh(true);
    obj2.setMesh(mesh2);
    obj2.build();
    if(mesh2.setVertexController(new MyVertexController(10.0f), true))
    Logger.log("vertex controller set for mesh2");
    mesh2.applyVertexController();
   
    Animation ani = new Animation(2);
   
    ani.createSubSequence("main");
   
    ani.addKeyFrame(mesh1);
    ani.addKeyFrame(mesh2);
    ani.setInterpolationMethod(Animation.LINEAR);
    obj.setAnimationSequence(ani);
   
    obj.setMesh(mesh1.cloneMesh(true));
    obj.build();
   
    }


the setupAnimate()  would setup animation for my object. in the  rendering loop, I call  obj.animation(index) to do animation, but the object stay still always.  do I doing something wrong in the setup code ? thanks.
#20
hi,
     I am working a opengl demo using jpct-AE, and I am new to opengl and jpct-ae.
can somebody show me some code about how to do texture mapping in jpct-ae ?
just simply setTexture of a Object3D seems can not get a good looking. help please.
thanks.