Texture Mapping in 3D Object (.pod) not happening correctly using isgl3D
I have used a 3D iphone (.pod) model, its showing correctly in PVRShammon.
But when I imported that 3D model into isgl3D, its not showing correctly with the textured image, the image is covering only some of the areas of the object with some lines and triangles.
_cameraController = [[Isgl3dDemoCameraController alloc] initWithCamera:self.camera andView:self];
_cameraController.orbit = 10;
_cameraController.theta = 20;
_cameraController.phi = 0;
_cameraController.doubleTapEnabled = NO;
Isgl3dPODImporter * podImporter = [Isgl3dPODImporter podImporterWithFile:@"iPhone5Spod.pod"];
[podImporter printPODInfo];
[podImporter buildSceneObjects];
Isgl3dTextureMaterial *material2 = [[[Isgl3dTextureMaterial alloc]
initWithTextureFile:@"DiffuseBody2.jpg"
shininess:0.0
precision:Isgl3dTexturePrecisionHigh
repeatX:YES
repeatY:YES] autorelease];
mesh2 = [podImporter meshAtIndex:4];
node2 = [self.scene createNodeWithMesh: mesh2 andMaterial:material2];
mesh2.normalizationEnabled = YES;
node2.position = iv3(0, 0, 0);
node2.rotationY = 180;
[podImporter addMeshesToScene:self.scene];
Isgl3dLight * light = [Isgl3dLight lightWithHexColor:@"FFFFFF" diffuseColor:@"FFFFFF" specularColor:@"FFFFFF" attenuation:0.000];
light.lightType = DirectionalLight;
[light setDirection:-1 y:-1 z:0];
[self setSceneAmbient:[Isgl3dColorUtil rgbString:[podImporter ambientColor]]];
[self schedule:@selector(tick:)];
For More Information Please have a look at the image. Output image in isgl3D view
Solution 1:
This is just my two cents. Is your texture follow the isgl3D requirement?
from isgl3D Tutorial 3 - Texture mapping http://isgl3d.com/tutorials/4/tutorial_3_texture_mapping
For standard image files, the image size must be factor of two compliant: eg 64x128, 256x32, etc. For pvr textures, the image file must also be square: eg 64x64, 256x256, etc.
Hope this help.