Author Topic: About texture mapping  (Read 1435 times)

Offline denzel

  • byte
  • *
  • Posts: 22
    • View Profile
About texture mapping
« on: April 26, 2012, 02:37:40 am »
I have an obj model witch has a texure, but when i load the texture with the all-name into textureManager and load the model,it looks not right.


load texture code
Code: [Select]
textureManager.addTexture("E:\\chahutexture\\chahu3.jpg", new Texture(res.openRawResource(R.raw.chahu3)));
in 3dMax

in mobile

[attachment deleted by admin]
« Last Edit: April 26, 2012, 04:12:08 am by denzel »

Offline denzel

  • byte
  • *
  • Posts: 22
    • View Profile
Re: About texture mapping
« Reply #1 on: April 26, 2012, 02:39:49 am »
and the image use for texture


[attachment deleted by admin]

Offline denzel

  • byte
  • *
  • Posts: 22
    • View Profile
Re: About texture mapping
« Reply #2 on: April 26, 2012, 03:05:48 am »
i try another model for a test.
why the texture looks like be cover in the right?
in 3dMax
int mobile


[attachment deleted by admin]

Offline vickt

  • byte
  • *
  • Posts: 9
    • View Profile
Re: About texture mapping
« Reply #3 on: April 26, 2012, 03:32:03 am »
The texture dimensions should be a power of 2.

Instead of using 461, either move up to 512x512 or down to 256 by 256.

Offline denzel

  • byte
  • *
  • Posts: 22
    • View Profile
Re: About texture mapping
« Reply #4 on: April 26, 2012, 04:10:41 am »
The texture dimensions should be a power of 2.

Instead of using 461, either move up to 512x512 or down to 256 by 256.

yes, i use 512x512, scale it just for attachments limit

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: About texture mapping
« Reply #5 on: April 26, 2012, 10:24:23 am »
Marke sure that environment mapping isn't enabled on you objects. About the second problem....i'm not sure. It doesn't like a 512*512 texture. Make sure that you are loading the texture from raw or assets, not from drawable.

Offline denzel

  • byte
  • *
  • Posts: 22
    • View Profile
Re: About texture mapping
« Reply #6 on: April 26, 2012, 11:37:13 am »
Marke sure that environment mapping isn't enabled on you objects. About the second problem....i'm not sure. It doesn't like a 512*512 texture. Make sure that you are loading the texture from raw or assets, not from drawable.

yes...the whole world is empty except this only model.
and the second ,it's 128x128,all my texture is load by TextureManager(String, Texture).
Or can i email you my obj/mtl/image/code to you and help me to check where am i wrong?
Really appreciate it.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: About texture mapping
« Reply #7 on: April 26, 2012, 11:46:46 am »
You can email it, but i won't be able to check it out until next week. Does the texture stay fixed if you rotate the model and the camera? Have you tried to flip the texture?