texture mapping id not happening coprrectly

9 views
Skip to first unread message

Infaz

unread,
Nov 11, 2013, 12:57:49 AM11/11/13
to isg...@googlegroups.com
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,its showing the image as lines.please help me to do this correctly,
thanks in advance...
-------------------------------------------------------------------------------------------------------------------------------------------------

_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 attached output image.....

Thanks in advance...

iOS Simulator Screen shot Nov 11, 2013 11.26.56 AM.png
Reply all
Reply to author
Forward
0 new messages