Author Topic: Texture rendering bug - SGS2 DEV  (Read 3455 times)

Offline jonalibert

  • byte
  • *
  • Posts: 13
    • View Profile
Texture rendering bug - SGS2 DEV
« on: May 25, 2012, 11:44:02 pm »
Hi,

I have some trouble with texture rendering (floor), with this code, I obtain :

Texture texture2 = new Texture(BitmapHelper.rescale(BitmapHelper.convert(getResources().getDrawable(R.drawable.vertpic)), 64, 64));
TextureManager.getInstance().addTexture("vertpic", texture2);
            
floor = Loader.load3DS(is, 500)[0];
floor.scale(10);
            
floor.setCulling(Object3D.CULLING_DISABLED);
floor.rotateX((float)Math.PI);
floor.setTexture("vertpic");
world.addObject(floor);



Where do you think it come from ?

TY for any answer

Jo

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture rendering bug - SGS2 DEV
« Reply #1 on: May 26, 2012, 12:07:25 am »
Look like gpu inaccuracies. Mobile chips are using pretty low accuracy to get speed and save power. There's nothing you can do about this. You might want to try a larger texture, but i doubt that it will help, because coordinates are normalized anyway.

Offline jonalibert

  • byte
  • *
  • Posts: 13
    • View Profile
Re: Texture rendering bug - SGS2 DEV
« Reply #2 on: May 26, 2012, 10:02:37 am »
http://www.youtube.com/watch?v=_vesmHaDCow

TY for this answer but I did not expect this, Verily there is no solution to obtain a correct rendering? On this video the graphics engine seems to provide a rendering more than correct.

Jo

Offline jonalibert

  • byte
  • *
  • Posts: 13
    • View Profile
Re: Texture rendering bug - SGS2 DEV
« Reply #3 on: May 26, 2012, 02:47:06 pm »
I use a Samsung Galaxy S2 (I9100)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Texture rendering bug - SGS2 DEV
« Reply #4 on: May 26, 2012, 04:53:02 pm »
If you stretch a texture across a large object and are only showing a small part of it, you might run into accuracy issues. You can try to increase the polygon count...that might help, but i don't expect much from it. Another thing to try is to not stretch the texture that much and repeat it instead on the floor.
The video you are refering to doesn't stretch the texture but repeats it a few 100 times in each direction. It doesn't look perfect though but video compression evens out the artifacts. And it has been recorded on a Nexus S. The Nexus S has a PowerVR gpu, which has a higher internal accuracy than the Mali chipset of the S2. On the S2, the ground in this scene looks much more blocky.

Offline jonalibert

  • byte
  • *
  • Posts: 13
    • View Profile
Re: Texture rendering bug - SGS2 DEV
« Reply #5 on: May 27, 2012, 01:53:10 pm »
Ok, thank you very much