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.


Messages - Davi

Pages: 1 [2] 3
16
Support / Re: [Tips] Android, augmented reality 3D with JPCT + Camera.
« on: October 31, 2011, 02:53:49 am »
what's different between  3d model transforming and world camera transforming? ???

17
Support / Re: how to set the FrameBuffer to alpha
« on: October 31, 2011, 02:32:32 am »
yeh,That either the camera is visible in the background but then there's no texture or if there's a texture, then there's no camera background.
there is a screen shot in attachments.
I don't know where the problem is ?please help me?

[attachment deleted by admin]

18
Support / Re: [Tips] Android, augmented reality 3D with JPCT + Camera.
« on: October 30, 2011, 04:37:57 pm »
How to make the 3D model transform correctly  with AR marker?
I can get the changing  transform matrix,I want to make this transform matrix work with my jpct-ae model.
how to do?do with camera position matrix  or model itself transform matrix?

19
Support / How set my projection matrix to to jpct-ae
« on: October 30, 2011, 10:39:34 am »
I have got a projection 4*4 matrix,wanna to  set to jpct-ae,but don't know how to set it ?can you help me ?

20
Support / Re: how to set the FrameBuffer to alpha
« on: October 30, 2011, 03:27:35 am »
Code: [Select]
public void onSurfaceCreated(GL10 gl, EGLConfig config) {

      world = new World();
      world.setAmbientLight(150, 150, 150);   
      TextureManager.getInstance().addTexture("tris3", new Texture(BitmapFactory.decodeResource(this.getResources(), R.drawable.tris3)));
      snork = Loader.loadMD2(LoadAssets.loadf("tris3.md2"), scale);
      snork.setTexture("tris3");
      snork.strip();
      snork.build();
      world.addObject(snork);
}
public void onSurfaceChanged(GL10 gl, int width, int height) {
      if (fb != null) {
         fb = null;
      }

      this.width=width;
      this.height=height;
      fb = new FrameBuffer(gl,width, height);
}
onDrawFrame(GL10 gl) {
      doAnim();
      world.renderScene(fb);
      world.draw(fb);
      fb.display();
}
above is my key code to show texture,the md2 model loading is ok and the camera vedio as the background but the texture can't show on the model,I don't know what wrong is?if I  change the OnDrawFrame(GL10 gl) function to below:
Code: [Select]
OnDrawFrame(GL10 gl) {
      fb=new FrameBuffer(gl, this.getWidth(),this.getHeight());
      doAnim();
      world.renderScene(fb);
      world.draw(fb);
      fb.display();
}
run above code,it can see the texure on the model but it can't show the camera as the background,the background is just black!!
Please help me ?

21
Support / Re: how to set my opengl es 3D projection to jpct-es
« on: October 30, 2011, 03:11:44 am »
anybody here,can help me? :-\

22
Support / how to set the FrameBuffer to alpha
« on: October 29, 2011, 07:37:32 pm »
I want to use camera as the background in my AR project,but I don't know how to set the FrameBuffer(fb) to be transparent in my onDrawFrame() function. my code as below:
Code: [Select]
        onDrawFrame(GL10 gl){
                 fb=new FrameBuffer(gl, this.getWidth(),this.getHeight);
                 RGBColor transp = new RGBColor(?,?,?,?);
fb.clear(transparent);
world.renderScene(fb);
world.draw(fb);
fb.display();
        }
it always show black or other color background,can you tell me how to set it to be transparent?

23
Support / Re: Load md2 model Error: Too many sub-sequences defined
« on: October 29, 2011, 05:33:34 pm »
Thank you very much,it works fine ;D

24
Support / how to set my opengl es 3D projection to jpct-es
« on: October 29, 2011, 05:25:45 pm »
         I have opengl es code as blew:     
             
Code: [Select]
                gl.glMatrixMode(GL10.GL_PROJECTION);
gl.glPushMatrix();
gl.glLoadMatrixf(ProjectionBuff);
gl.glMatrixMode(GL10.GL_MODELVIEW);
gl.glPushMatrix();
gl.glLoadMatrixf(Transform);
             
      I want to know how to set jpct-es like this?

25
Support / Re: Load md2 model Error: Too many sub-sequences defined
« on: October 29, 2011, 08:05:14 am »
thank you,I have saw that ,then how to set configuration: Config.maxAnimationSubSequences
 in my program?

26
Support / Load md2 model Error: Too many sub-sequences defined
« on: October 28, 2011, 07:08:26 pm »
when Load md2 model ,the log show:

Loading Texture...
     ... ...
Processing:deathc...
[1319821045737] - ERROR: Too many sub-sequences defined. Modify configuration to allow a higher number.

I want to know how to modify configuration to allow a higher number??? ???please help

27
Support / Re: why my texture can't show on md2 model?
« on: October 28, 2011, 06:36:19 pm »
yeh,it works,Thanks very much. ;)
but the model is still white, the texture can't show on the model, my key code is on the first floor,can you help to find where the wrong is?

28
Support / Re: why my texture can't show on md2 model?
« on: October 28, 2011, 06:03:28 pm »
but my texture has a proper size, 256*256, why the log  show error message that my width is 171?? :( ,it's so strange,

29
Support / Re: why my texture can't show on md2 model?
« on: October 28, 2011, 05:43:33 pm »
oh,I am sorry,my engine is older one, I have download the jpct-ae1.23, and change it as a new one. and then,when I run it,my project has been crashed!!!it is very strange. the older engine doesn't crash,why the new one can crash!
the error log as blew:

ERROR: Unsupported Texture width:171
ERROR:java.lang.RuntimeException
at  com.thread.jpct.Logger.log
at  com.thread.jpct.Texture.loadTexture
at  com.thread.jpct.Texture.<init>

30
Support / Re: why my texture can't show on md2 model?
« on: October 28, 2011, 11:25:46 am »
jPCT-AE  Loading Texture...
[ 131979264098] - WARNING: Unsupported Texture width (384)... resizing to 256
Loading file from InputStream
....
Skin width:256
Skin height:256
Frame size:1612
Number of skins:5
Number of Vertices:393
Number of Texture coordinates:561
Number of triangles:764
Number of GL_COMMANDS:3833
Number of Frames:198
Reading Texture coordinates
Done!


Pages: 1 [2] 3