About texture mapping

Started by denzel, April 26, 2012, 02:37:40 AM

Previous topic - Next topic

denzel

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 textureManager.addTexture("E:\\chahutexture\\chahu3.jpg", new Texture(res.openRawResource(R.raw.chahu3)));

in 3dMax

in mobile

[attachment deleted by admin]

denzel

and the image use for texture


[attachment deleted by admin]

denzel

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]

vickt

The texture dimensions should be a power of 2.

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

denzel

Quote from: vickt 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.

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

EgonOlsen

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.

denzel

Quote from: EgonOlsen 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.

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.

EgonOlsen

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?