Texture mapping in a 3D object (.pod) does not work correctly using isgl3D

I used a 3D iphone model (.pod), displaying it correctly in PVRShammon.

But when I imported this 3D model into isgl3D, it does not display correctly with a textured image, the image covers only some 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 see the image. Output image in isgl3D view

+69
ios objective-c 3d texture-mapping isgl3d
Nov 11 '13 at 6:11
source share
1 answer

These are just my two cents. Does your texture meet isgl3D requirement?

of isgl3D Study Guide 3 - Displaying Textures http://isgl3d.com/tutorials/4/tutorial_3_texture_mapping

For standard image files, the image size must be two-digit compatible: for example, 64x128, 256x32, etc. For pvr textures, the image file should also be square: for example, 64x64, 256x256, etc.

I hope for this help.

+1
04 Oct '15 at 0:28
source share



All Articles