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

Pages: [1] 2
1
Support / Re: Object3D.setTextureMatrix() issue?
« on: April 14, 2014, 03:37:58 am »
 ;D My fault ... forgot to set "true" in new Texture().

2
Support / Object3D.setTextureMatrix() issue?
« on: April 12, 2014, 10:28:02 am »
Hi,

I put multiple textures into one texture, and using setTextureMatrix() to play frame animations. The animations works fine, but seems the semi-transparency pixels on original texture becomes fully opaque when it rendered to screen. Can anyone help? Thanks.

3
Support / Re: How to make UV animation effect?
« on: April 06, 2014, 07:33:36 am »
Yes, Texture Matrix does the job, thanks!  ;D

4
Support / Re: How to make UV animation effect?
« on: April 04, 2014, 02:12:52 pm »
Thanks Egon, it's very detail  :)

public void build(boolean staticUV), I should use build(false), right?

Also, let me catch your idea ... so the way is like,

1) plane.build(false) at the creation of the plane.

2) then in each frame update ...
   2.1) translate texture matrix and plane.setTextureMatrix(matrix)
   2.2) plane.touch()

Am I right?

5
Support / Re: How to make UV animation effect?
« on: April 04, 2014, 12:56:08 pm »
I found TextureInfo can change the vertex UV of each triangle, but still no idea how to make a 'water flow' animation using UV animation. Someone says I need to use shaders. Is that the only way? To use shader I have to use OpenGL2.0?

6
Support / How to make UV animation effect?
« on: April 04, 2014, 10:54:06 am »
Hi,

I have a plane, and how can I make UV animations? I didn't find a way to change the UV attribute of a vertex. Pls help~

Thanks

7
Support / Post processing on the rendered scene
« on: March 21, 2014, 01:02:10 pm »
Hi,

Can I add some image effects, like blur, after the scene getting rendered? I see ITextureEffect interface, is that help?

8
Support / Re: How to make a screen snap
« on: March 19, 2014, 04:50:59 am »
Hi Egon,

Here is my snap shot code.

   public void createScreenSnap() {
      final int width = /* Screen Width */
      final int height = /* Screen Height */
      if (texScreenSnap == null) {
         texScreenSnap = new Texture(width, height);
      }
      FrameBuffer fb = new FrameBuffer(width, height); /* Exception Here !!!! */
      fb.setRenderTarget(texScreenSnap);
      fb.clear(RGBColor.BLACK);
      if (world != null){         
         world.renderScene(fb);
         world.draw(fb);
      }
      fb.dispose();
   }

I get follow exception at [new FrameBuffer(width, height)].

03-19 09:07:39.325: E/AndroidRuntime(28372): java.lang.RuntimeException: [ 1395191259321 ] - ERROR: java.lang.RuntimeException: [ 1395191259319 ] - ERROR: java.lang.RuntimeException: [ 1395191259318 ] - ERROR: java.lang.RuntimeException: [ 1395191259316 ] - ERROR: Failed to load and compile vertex shaders!

03-19 09:07:39.325: E/AndroidRuntime(28372):    at com.threed.jpct.FrameBuffer.<init>(FrameBuffer.java:94)

Am I making something wrong?

Thanks,

9
Support / Re: How to make a screen snap
« on: March 18, 2014, 02:05:24 am »
Thanks Irony and Egon, I'm going to use snapshot as some 'cool' effect in game  :), not for saving actually. What I want is like rendering screen content to a texture and displaying it in a photo frame. So am I doing the right way?

10
Support / How to make a screen snap
« on: March 17, 2014, 02:02:29 pm »
Hi,

I'm trying to create a snapshot of current frame. The way I'm thinking is like,

1) Create a FrameBuffer, and setRenderTarget() to a self-created Texture.
2) Call World.renderScene(fb) and World.draw(fb), and the current frame will render to the above Texture.
3) Then I can use the texture and display is as a snapshot or save it.

Is that OK?

Thanks.

11
Support / Re: How to draw a rotated UI image?
« on: March 17, 2014, 01:55:53 pm »
Thanks, I'll give a try.

Btw, what's the implementation difference between Overlay and blit()? Do both create a plane facing to camera? Also, If I have the same number of Overlays and blit calls which one is more heavy?

12
Support / How to draw a rotated UI image?
« on: March 17, 2014, 03:30:40 am »
Hi,

In my game all UI images are drawn using FrameBuffer.blit() method. Can I add rotation to these images? From the api docs i don't find blit() has such feature... Or, any idea how to draw a rotated UI images?

Many thanks!

13
Support / Re: Fog effect
« on: March 14, 2014, 01:00:49 pm »
It works, many thanks!

14
Support / Fog effect
« on: March 14, 2014, 02:52:13 am »
Hi,

Does JPCT support Fog effect? Like in U3D, I can specify the the distance and the color of the fog? If not, any clue on how to implement fog effect?

Many thanks!

15
Support / Re: Draw calls and frame rate
« on: March 14, 2014, 02:47:27 am »
Thanks Egon, so each Object3D consumes one draw call? If I have 10 planes and they share the same texture will they 'batched' as one draw call, or still 10 draw calls?

Pages: [1] 2