2

I use blender to create 3d model and convert as .pod file using PVRGeoPODGUI and use it in my cocos3d application.

For example, i created 3d planes, cubes etc. and saved as "A.blend" file and exported as "A.dae" and converted finally as "A.pod" file. When i use this "A.pod" file in code, it works fine.

CC3PODResourceNode* podRezNode = [CC3PODResourceNode nodeWithName: @"A"];
podRezNode.resource = [IntroducingPODResource resourceFromFile: @"A.pod"];

podRezNode.shouldCullBackFaces = NO;
podRezNode.location = cc3v(0.0, -10.0, 0.0);
podRezNode.rotation = cc3v(0.0, 0.0, 0.0);
podRezNode.isTouchEnabled = YES;
[self addChild: podRezNode];

Then i try to recreate same kind of blend file and test it, so i used same "A.blend" file with the same location, scale, diminution etc. and saved now as "B.blend" file. Again exported as "B.dae" and converted finally as "B.pod" file. When i tried to use this in my code now, it is not viewing any model in simulator output, its blank.

CC3PODResourceNode* podRezNode = [CC3PODResourceNode nodeWithName: @"B"];
podRezNode.resource = [IntroducingPODResource resourceFromFile: @"B.pod"];

podRezNode.shouldCullBackFaces = NO;
podRezNode.location = cc3v(0.0, -10.0, 0.0);
podRezNode.rotation = cc3v(0.0, 0.0, 0.0);
podRezNode.isTouchEnabled = YES;
[self addChild: podRezNode];

This is really strange to me, since the same version of blend (A.blend) and converted pod (A.pod) works fine, BUT resaved version (B.blend and B.pod) doesn't work at all.

Could someone please point me what may wrong here?

Getsy
  • 4,887
  • 16
  • 78
  • 139
  • are you sure that `-resourceFromFile` returns non-nil object? Maybe you did not added `B.pod` into project's target, so it just can not find this file in resource bundle – medvedNick Apr 08 '13 at 11:51
  • -resourceFromFile gives nil, but actual .pod is been kept in the bundle properly. – Getsy Apr 09 '13 at 04:53
  • make sure that `Target Membership` option is checked in right column when you select you file in Project Navigator. Another option - delete and add file to project and check `Add to targets` in confirmation dialog – medvedNick Apr 09 '13 at 06:16

0 Answers0