www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: denzel on April 26, 2012, 02:37:40 am

Title: About texture mapping
Post by: denzel 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]
Title: Re: About texture mapping
Post by: denzel on April 26, 2012, 02:39:49 am
and the image use for texture


[attachment deleted by admin]
Title: Re: About texture mapping
Post by: denzel 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]
Title: Re: About texture mapping
Post by: 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.
Title: Re: About texture mapping
Post by: denzel 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
Title: Re: About texture mapping
Post by: 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.
Title: Re: About texture mapping
Post by: denzel 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.
Title: Re: About texture mapping
Post by: EgonOlsen 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?