ios - Can not load 3d model using ISGL3D -
i trying add 3d human body model app using isgl3d. tried somehow textures not added on meshes. here code , 3d model files. can please me?
here 3d model , textures https://www.dropbox.com/s/7xcr3ytovifwblk/3d%20objects.zip
and here code
_cameracontroller = [[isgl3ddemocameracontroller alloc] initwithcamera:self.camera andview:self]; _cameracontroller.orbit = 300; _cameracontroller.theta = 30; _cameracontroller.phi = 30; _cameracontroller.doubletapenabled = no; // enable shadow rendering [isgl3ddirector sharedinstance].shadowrenderingmethod = isgl3dshadowplanar; [isgl3ddirector sharedinstance].shadowalpha = 1; isgl3dpodimporter * podimporter = [isgl3dpodimporter podimporterwithfile:@"male_model.pod"]; [podimporter buildsceneobjects]; isgl3dshadowcastinglight * light = [isgl3dshadowcastinglight lightwithhexcolor:@"ffffff" diffusecolor:@"ffffff" specularcolor:@"ffffff" attenuation:0.00]; light.position = iv3(300, 600, 300); [self.scene addchild:light]; isgl3dtexturematerial *texturematerial2 = [[[isgl3dtexturematerial alloc] initwithtexturefile:@"25-ormondafter.jpg" shininess:0.0 precision:isgl3dtextureprecisionhigh repeatx:yes repeaty:yes] autorelease]; mesh = [podimporter meshatindex:0]; node = (isgl3dmeshnode*)[self.scene createnode]; node = [node createnodewithmesh: mesh andmaterial:texturematerial2]; node.position = iv3(0, -130, 0);; node.rotationy = 180; node.doublesided = yes; [self.scene addchild:node]; isgl3dtexturematerial *texturematerial3 = [[[isgl3dtexturematerial alloc] initwithtexturefile:@"am_head_1k.bmp" shininess:0.0 precision:isgl3dtextureprecisionhigh repeatx:yes repeaty:yes] autorelease]; mesh = [podimporter meshatindex:1]; node = (isgl3dmeshnode*)[self.scene createnode]; node = [node createnodewithmesh: mesh andmaterial:texturematerial3]; node.position = iv3(0, -130, 0);; node.rotationy = 180; node.doublesided = yes; [self.scene addchild:node]; isgl3dtexturematerial *texturematerial4 = [[[isgl3dtexturematerial alloc] initwithtexturefile:@"spin_prod_695288001.jpg" shininess:0.0 precision:isgl3dtextureprecisionhigh repeatx:yes repeaty:yes] autorelease]; mesh = [podimporter meshatindex:2]; node = (isgl3dmeshnode*)[self.scene createnode]; node = [node createnodewithmesh: mesh andmaterial:texturematerial4]; node.position = iv3(0, -130, 0);; node.rotationy = 180; node.doublesided = yes; [self.scene addchild:node]; isgl3dtexturematerial *texturematerial5 = [[[isgl3dtexturematerial alloc] initwithtexturefile:@"joe-fresh-studded-boots3.jpg" shininess:0.0 precision:isgl3dtextureprecisionhigh repeatx:yes repeaty:yes] autorelease]; mesh = [podimporter meshatindex:3]; node = (isgl3dmeshnode*)[self.scene createnode]; node = [node createnodewithmesh: mesh andmaterial:texturematerial5]; node.position = iv3(0, -130, 0);; node.rotationy = 180; node.doublesided = yes; [self.scene addchild:node]; isgl3dtexturematerial *texturematerial6 = [[[isgl3dtexturematerial alloc] initwithtexturefile:@"hand-texture.jpg" shininess:0.0 precision:isgl3dtextureprecisionhigh repeatx:yes repeaty:yes] autorelease]; mesh = [podimporter meshatindex:4]; node = (isgl3dmeshnode*)[self.scene createnode]; node = [node createnodewithmesh: mesh andmaterial:texturematerial6]; node.position = iv3(0, -130, 0);; node.rotationy = 180; node.doublesided = yes; [self.scene addchild:node]; isgl3dtexturematerial *texturematerial7 = [[[isgl3dtexturematerial alloc] initwithtexturefile:@"hand-texture.jpg" shininess:0.0 precision:isgl3dtextureprecisionhigh repeatx:yes repeaty:yes] autorelease]; mesh = [podimporter meshatindex:5]; node = (isgl3dmeshnode*)[self.scene createnode]; node = [node createnodewithmesh: mesh andmaterial:texturematerial7]; node.position = iv3(0, -130, 0);; node.rotationy = 180; node.doublesided = yes; [self.scene addchild:node]; [self schedule:@selector(tick:)];
please me. stuck.
best regards
i checked model pvrshaman , seems normal setting flip while export 3d application.
go read this , explore setting. 3d setting issue.
Comments
Post a Comment