Requirement
I have a 3d model created in Blender - a cube with numbers 1 to 6 on each faces. I have added a UV texture on each face to represent the number. The numbers are showing fine when I render it on Blender.
I am trying to export this model to iPhone using Cocos3D.
Specifications
- iOS 6.1 and Xcode 4.6.2
- cocos3d 0.7.0
- Blender 2.67b
What I have done
- I added the PVRGeoPOD Converter plugin to Blender as per this official doc.
- Created the 3D model in blender. Used the default blender cube and added UV texture on all 6 faces.
Generated a .pod file by selecting File->Export->PVRGeoPOD(.pod/.h/.cpp) in Blender.
Added the pod file to the Cocos3D default template project. Change the code to use my numbered cube file instead of the default "Hello world" text.
[self addContentFromPODFile: @"numbered_cube.pod"];
Added a 3 axis rotation so that I can see all 6 faces.
CC3MeshNode* helloTxt = (CC3MeshNode*)[self getNodeNamed: @"Cube"]; CCActionInterval* partialRot = [CC3RotateBy actionWithDuration: 1.0 rotateBy: cc3v(40.0, 30.0, 30.0)]; [helloTxt runAction: [CCRepeatForever actionWithAction: partialRot]];
The Problem
Well, the cube is showing, and it is rotating. But there is no texture on the cube. In the log, I can see this
Building CC3PODResource from file numbered_cube.pod containing 3 nodes (1 mesh nodes), 1 meshes, 1 cameras, 1 lights, 1 materials, 0 textures, 0 frames, ambient light
Further research
I did some search and come across this SO thread. It tells about Collada (.dae) file, kind of intermediate file between .blend and .pod. When I tried to convert, I only got the .pod file. I then used File->Export->Collada(.dae) to create a .dae file manullay. Then I tried to convert this .dae file to .pod using PVRGeoPODGUI standalone tool. The file is successfully opening, but the export button is always disabled.
So simply, my problem is how can I show the textures in the 3D model I created in Blender in iPhone using Cocos3D. Any idea?