Cocos3D Importing: Generating POD Files

Why are you here??
 
Visit the wiki article that covers this topic on the new, shinier, and vastly improved Cocos3D website, instead!!


Cocos3D is able to directly import files formatted in the PowerVR POD file format from Imagination Technologies, the supplier of the GPU used in iOS devices. The POD format is a dense binary format, suitable for the fast loading and minimal memory requirements of a mobile device.

This article describes how to generate a POD file, either by exporting directly from one of several popular 3D editors, or by converting a COLLADA file previously exported from a 3D editor. COLLADA is an industry-standard exchange format for specifying 3D model data, and most 3D editors support exporting into the COLLADA file format.

Acquiring the PVRGeoPOD Converter

The PowerVR SDK from Imagination Technologies includes several useful tools for working with POD assets. You can download the SDK here. You will need to register and log-in to the PowerVR site (it’s a free registration), before clicking on this SDK link. You can choose the types of tools and components that you want to download. Once the download is complete, unzip the contents.

The PVRGeoPOD tool is used to generate POD files. In the unzipped download, it can be found in the PVRGeoPOD directory. There are three ways to use this converter:

  • As a plug-in (or add-in) to several popular 3D graphic editors. Currently the following editors are supported, and each can be found in the PVRGeoPOD subdirectory bearing its name:
    • Blender
    • 3DS Max
    • Maya
  • As a standalone GUI tool (PVRGeoPODGUI) that converts COLLADA files to POD files. This tool can be found in the PVRGeoPOD/Standalone/GUI directory.
  • As a standalone command-line tool (PVRGeoPODCL) that converts COLLADA files to POD files. This tool can be found in the PVRGeoPOD/Standalone/CL directory.

If you have the option, using one of the 3D editor plug-ins is the preferred choice, because it eliminates the COLLADA middle-man. Instructions for using the PVRGeoPOD tool, and for installing it as a plug-in to one of the above 3D editors can be found in the PVRGeoPOD.User Manual.pdf document in the PVRGeoPOD/Documentation directory.

For a step-by-step guide to downloading the PVRGeoPOD converter, and installing it into Blender, view Harry Dart-O’Flynn’s Starting Cocos3d – 5 – Blender & PVRGeoPOD Exporter video tutorial.

Generating the COLLADA File for Standalone PVRGeoPODGUI & PVRGeoPODCL

When using either the PVRGeoPODGUI standalone GUI tool, or the PVRGeoPODCL standalone command-line tool, the first step is to generate a COLLADA file from your 3D editor. Most 3D editors are capable of exporting COLLADA files for use by the PVRGeoPOD tool.

There are several evolutionary versions of the COLLADA file format. Creating POD files from COLLADA version 1.4 files has been well tested, but you may experiment with other COLLADA versions as well, if your editor supports exporting to those versions.

Running the PVRGeoPOD Converter

There are a number of configuration options to help you generate what you need. When running the PVRGeoPOD tool as a 3D editor plug-in, or as the PVRGeoPODGUI standalone GUI application, these are presented to you in a configuration GUI. The plug-in or GUI application is the best way to get started, then once you’re familiar with the structure and configuration options, you can switch to the command line utility if you prefer that mode of operation (I still use the GUI because it is well laid out and gives dynamic feedback).

If you are running the PVRGeoPOD tool as a 3D editor plugin, select the models in your 3D editor that you want to export to a POD file, and run the PVRGeoPOD exporter plug-in (typically it will be a File/Export menu choice).

If you are running the standalone PVRGeoPODGUI tool, once the tool is open, use the Open… menu to locate the COLLADA (*.dae) file that you want to convert.

The PVRGeoPOD tool has one main configuration window with several tabs as follows:

The Geometry tab of the PVRGeoPOD converter, showing the settings used to create POD files for loading into Cocos3D.

The Materials tab of the PVRGeoPOD converter, showing the settings used to create POD files for loading into Cocos3D.

The Transformations tab of the PVRGeoPOD converter, showing the settings used to create POD files for loading into Cocos3D.

These screenshots illustrate suitable settings for importing into Cocos3D.

The PVRGeoPOD.User Manual.pdf document in the PVRGeoPOD/Documentation directory explains each of these configuration options, and you can hover your mouse pointer over any of the fields for more information.

You can play with some of these settings, but to avoid frustration, keep in mind the following points regarding how Cocos3D interacts with these configuration settings:

  • Pay particular attention to the Invert transparency checkbox on the Materials tab. If your model is not visible in Cocos3D when you load your POD file, the first thing you should check is the setting used in the Invert transparency checkbox in the PVRGeoPOD tool.
  • If your textures appear upside down on the model, you can set the Flip V Co-ordinate flag to flip the texture coordinates in the model during the export or conversion.
  • The PVR GPU is optimized for floating point operations on vertex coordinates. So, on the Geometry tab, make sure the data types for Position, Normal and texture Export mapping channels are set to float. If you are using OpenGL ES 2.0 on iOS, or OpenGL on OSX, you can experiment with normalized fixed-point values for some of these attributes, but it’s best to start with floating-point values.
  • To save memory, if your model contains per-vertex color information, you should set the data type of the Color component to RGBA.
  • If you have constructed your model to use vertex skinning to perform soft-body mesh deformations using bone rigging, turn the Export skinning data option on. The Matrix palette size setting indicates the number of matrices available for mesh deformation, and is limited by the GPU in the device. When running OpenGL ES 1.1, on the PowerVR MBX GPU found on earlier iPod Touch and iPhone models, the matrix palette size is 9, and on the PowerVR SGX GPU found on all later devices, the size of the matrix palette is 11. When running OpenGL ES 2.0 or OpenGL, there is no fixed limit on the matrix palette size, and you can set this value significantly higher. The practical limit will be determined by the number of matrices you can efficiently pass to your shaders, but matrix palettes of size 20 or above are possible under a shader-based programmable pipeline.
  • Cocos3D currently expects that each POD file only contains one vertex skinned model, so if you are using vertex skinning as described in the previous point, you should ensure that each such model is stored in its own POD file.
  • Cocos3D can work with either interleaved, or non-interleaved data. Both Apple and Imagination Technologies recommend interleaving for performance, but you can choose not to, if appropriate for your model. Use the Interleave vertex data flag to make this choice. The Align vertex data (to 32 bit) flag does what is says, and will improve performance somewhat, at the cost of increased file size and memory requirements.
  • For the Primitive Type option, Cocos3D can make use of triangle lists or triangle strips, either indexed or not. Imagination Technologies recommends that Indexed triangle list is the fastest choice, and that sorting by PVRTGeometrySort is the most efficient way of presenting the geometry to the GPU.
  • If the file includes animation information, you can choose to include it by turning on the Export animations flag, and Cocos3D will make use of it to animate your models.
  • To engage animation, you need to set up the appropriate CC3Animate action. See the CC3DemoMashUp example application in the Cocos3D distribution for an example of how to do this.
  • Be sure to leave the Export transformations as matrices option unselected. Cocos3D does not support transformations and animation using exported matrix data.
  • Leave the Add position unpack matrix option unselected.

Once you have all your settings configured hit the Export… button, and choose the location and name of the output POD file (*.pod). The main window will display a log of the conversion results. Hit the Okay button to get back the configurations settings.

Finally, drag the resulting POD file to the Resources group in your Xcode project window, and select the option to copy the file to your project directory from the resulting dialog box.

Coordinate Systems

Different 3D editors will use different coordinate systems (left-handed or right-handed), and may orient your model space so that any of the X,Y or Z axes represents the world ‘up’ direction.

Please also note that the PVRGeoPOD tool rotates data so that the Z-axis is ‘up’. Since the OpenGL ES default is to have the Y-axis as ‘up’, and the camera looking down the negative Z-axis, it is usually more convenient to use the OpenGL orientation in Cocos3D (although there’s nothing stopping you from rotating everything by 90 degrees within Cocos3D).

With this in mind, in your 3D editor, orient your model world so that ‘up’ is along the Z-axis. The PVRGeoPOD tool will then rotate the axes so that ‘up’ is along the Y-axis when the model is imported into Cocos3D. However, depending on your 3D editor, you may need to play with this to get the right combination of 3D editor, COLLADA, PVRGeoPOD, Cocos3D, and OpenGL ES orientations.

122 comments to Cocos3D Importing: Generating POD Files

  • For some reason, I cant gut the Collada2POD GUI to open, it just opens a blank terminal window…

    • Hi Techy…

      Did you download the Collada2POD utility by itself, or as part of the full SDK?

      I mentioned in the article that I had had problems starting Collada2PODGUI when the utility is downloaded by itself, but I’ll admit that it wasn’t a very emphatic disclaimer. I’ve reworded this article now to indicate that on the Mac, you need to download the full SDK.

      I’ve also filed a report with Imagination Technologies to see if they can fix the stand-alone Collada2POD download package so that it will run on the Mac.

      …Bill

    • Hi Techy…

      About five minutes after making the article changes I mention in my first response to you, I received a response from Imagination Technologies!

      The problem with the stand-alone Collada2POD download is that, because it is packaged as a zip archive, the file executable permissions are missing.

      To fix that, open a Terminal session, navigate to the Collada2POD/MacOS directory, and issue the command:

      chmod 755 Collada2POD Collada2PODGUI

      The Collada2PODGUI application should now run fine when you double-click on it.

      I’ve updated the article above again to reflect this new info.

      …Bill

  • Thanks Bill, we have started our experiments!!!

  • Bill, everything works but for the animation! I see that animation is not fully tested.. how did you get the Hello-World animation work?

    • Hi Sree…

      Yes…as I mention above, the full Blender->Collada->POD->cocos3d trip for frame-animation has not been tested.

      The ‘hello, world’ sample does not use frame-animation. It uses cocos2d CCActionIntervals to animate.

      In the CC3DemoMashUp example, the robot arm and light are animated from frame-animation contained in the POD file. The remaining nodes, including the beach-ball, rotating teapots and globe, are all animated with CCActionIntervals.

      …Bill

  • Anonymous

    COLLADA Version 1.4.1 OK too? It’s used in Blender 2.56b and it seems to work so far. Plus on MacOSX (mine v10.6.6), Image Preview can open format 1.4.1 dae files, but not 1.4.0 versions (as Exported from 2.49b).

    • We haven’t tested Collada 1.4.1 specifically…but the Collada2POD tool doesn’t identify which versions it supports…so it may very well handle it. Only way to tell it to try a few files.

      When you say it seems to work…do you mean that you have run a 1.4.1 file through Collada2POD already?

      BTW…we haven’t had any trouble displaying 1.4.0 DAE files exported from Blender 2.49, in Preview 5.0.3 under OSX 10.6.6. Could it be your specific file?

      …Bill

      • Anonymous

        I just retried to export the default cube scene (factory settings) from 2.49.2b, and the file won’t load in ImagePreview.app… Maybe it’s because the binary was built for MacOSX 10.5? I assumed 10.6.Y could run apps built for 10.5.X…..It’s ok, I’ll comment if I run into trouble with 2.56b.

  • Anonymous

    Well the COLLADA exporter seems broken in the 2.56 beta; no options dialog, and I can’t export a simple textured plane (though it renders correctly in blender with F12). Darn! Oh well, I can play with cocos3d’s runtime generated models. =)

  • Daniel

    Hi Bill,

    Thank you for Cocos3d.

    Sadly, I can’t get Textures from Blender to the App.

    I did try assigning the texture to the material, but sadly nothing shows up in the app and all that I see is the white untextured model.
    Are there any additional parameters that I have to set to enable the usage of textures?

    • Hi Daniel…

      Sorry you’re having trouble.

      There aren’t really any other settings. It should be fairly straightforward.

      Are you using a texture file format that cocos2d understands? And have you copied your texture file into your app Resources folder with the POD

      You can check your Xcode log output for an ERROR entry indicating that the file could not be loaded.

      …Bill

  • Etienne

    Hi Bill,

    I’m having some issues converting Collada to POD. I’m exporting models from Google Sketchup to Collada 1.4. If the models are reasonably simple, e.g. A cube etc. Then it gets converted properly to POD. However if it is complex, maybe containg two meshes, only one will be displayed, or in some cases only a portion of the mesh is rendered.

    I’m not sure where in the process it goes wrong, if it is the way I’m exporting it to collada or the way I convert it to a POD file. Or if Sketchup is exporting it in a different manner to other 3D software packages.

    Thanks,
    Etienne

  • Etienne

    Hi Bill,

    Regarding my issue with SketchUp and converting it to POD. For more complex polygons I triangulated them manually. Seems this information is lost when exporting out of SketchUp even when the triangulate flag is selected.

    When two or more objects are created in a scene and exported, only the last gets displayed and/or maybe imported. I will be exporting them separately and adding them as separate nodes to the scene.

    Cheers,
    Etienne

    • Hi Etienne…

      Sorry you’re having trouble with SketchUp. We have not tried using SketchUp, so I can’t comment on how it exports to COLLADA 1.4.

      I see that you’ve posted to the cocos3d forum as well, and I see that you seem to have made some good progress there. Thanks for posting your solution there.

      …Bill

  • Josh

    There appears to be a plug in available to export directly from blender to POD:
    http://www.imgtec.com/powervr/insider/powervr-pvrgeopod.asp
    At the bottom:
    “Update: Blender plug-in – Added missing functionality. Several fixes including proper support for empty objects.”

    • Thanks, Josh.

      I mention that tool briefly in the Acquiring… section above. However, as far as I know, that tool is only available for Windows and Linux, and is unfortunately not supported on the Mac platform.

      However…it remains an option for those who do their designing on Windows or Linux. And I look forward to hearing if anyone has success running it on Mac.

      …Bill

  • Jeroen Keppens

    Hi,

    I exported an object from Blender to COLLADA and then converted it to POD. It’s loaded without problems.

    Now, how can I name parts (like the Hello nodename in your template)? Is this a name given to the mesh in the 3D program?

    Can you export/convert/import whole scenes, including camera, lights, etc…

    Tnx for the info,

    Jeroen

    • Hi Jeroen…

      Yes…the name of the node in cocos3d is the name you give it in your 3D editor.

      And yes…you can export whole scenes, including camera and lighting. In the CC3DemoMashUp example app in the cocos3d distribution, the camera and light are both loaded from the same POD file as the robot arm.

      Be sure to make use of the cocos3d forum. You can get many questions answered there.

      …Bill

  • Tom

    Hi,

    I create some animation and control for Balls.pod model, but when I imported my .pod model, it doesn.t move. Could you explain me why? Maybe I didn’t select some option in blender, but from my point of view I did everything exactly like in tutorial above.

    Tom

    • Hi Tom…

      Are you referring to the Balls.pod file from the CC3DemoMashUp, or did you create your own separate file with the same name?

      Assuming that you created your own file…

      We have not attempted to export animation from Blender, so I’m not able to advise you directly on the details, other than to suggest you make sure the Sample Animation flag is selected in the Blender export, and the Export animation flag is set in the Collada2POD tool.

      You can open your Balls.dae file in a text editor to see if the animation data made it into that file.

      You can also use the PVR Shaman tool in the PowerVR SDK to open the POD file and see if it animates.

      In cocos3d, you can see if the animation is imported by logging the imports. If you open the CC3NodePODExtensions.mm file, in the initAtIndex:fromPODResource: method, you’ll see a line starting with LogTrace(@"Creating.... Change the LogTrace to LogDebug and run your application. This will print out the POD structure, including the animation flags.

      Also…check out this thread in the cocos3d forum.

      …Bill

  • Loz

    Hi,

    First off, many thanks for Cocos3d – it’s a great step and all the hard work thats gone into it is much appreciated.

    I’m using Cheetah3D (yes, I’m a novice with it!) and have followed your article for exporting to .dae and then to .pod and into Cocos3D which generally works great. However…. 🙂

    I created an object in Cheetah3D using Booleans, some subtracts some unions.

    Now, in Cocos3D, the unions appear fine, but the subtractions don’t – what you see the original shape plus the objects that have been subtracted, ie they are effectively shown as unions.

    I’m guessing I’ve missed a step? Any suggestions would be gratefully received.

    Best Regards

    • Hi Loz…

      Can you clarify what you mean by unions, Booleans & subtracts? Are you referring to source and destination color blending combinations?

      You can open the COLLADA .dae file in Preview to see if it appears correctly there.

      Also…you should post this to the cocos3d forum. Someone there may have dealt with your issue already.

      …Bill

      • Loz

        Hi Bill,

        Didn’t see your reply before posting.

        A Boolean in Cheetah3D is where you can add or subtract objects to/from each other to form a “compound” or “nett” object.

        Thanks for the suggestion about viewing the .dae in XCode, I tried this and sure enough the problem existed there before reaching Cocos3D, which led me to changes in Cheetah3D before exporting.

        Best Regards
        Loz

    • Loz

      Hi,
      As is always the way, the moment you ask a question you find the answer 😀

      The answer, well the way I made it work, was to make the Booleans “editable” (Objects>Make Editable) and then do the export to .dae. This “looses” the Boolean and its parts in Cheetah3D but if you “undo” after export you can continue as you were without loosing anything.

      So, perhaps not optimal but it’s a way.

      Thanks again
      Cheers
      Loz

  • Hi,

    First off, thanks so much for sharing cocos3D with us, I think its fantastic.

    I’m working on a project that involves some SketchUp models that export to COLLADA as lines rather than triangles. COLLADA2POD doesn’t support appear to lines though, but after poking around the PVRPOD cocos3D code, it looks as though the .pod file format itself can support it.

    Any thoughts on the easiest way to support a COLLADA file with “lines” rather than “tiangles”? I’m thinking of writing my own COLLADA exporter using the ASSIMP OSS lib, wondering if I should also try to use the PowerVR POD lib to write a POD file, or write my own file format.

    • Hi deeje…

      You might try asking this question in the cocos3d forum. We’ve only used Collada2POD for meshes.

      Writing your own file format, or a loader for another existing format is certainly an option. The loading framework in cocos3d is designed to be modular. You can used the cocos3d PVR code as a template for that exercise.

      …Bill

  • Vincenzo

    Hi Bill,
    I’ve followed all the passes of the procedure throught Blender->Collada->Pod->Cocos3d
    but all I get is a black-screen on the simulator.
    Models have their own lamps and camera.

    P.S: It’s normal that hello-world.pod is 154KB and mine are only 3KB?
    Thank you..

    • Hi Vincenzo…

      Make sure the Invert transparency setting is turned on in the Collada2POD tool. As explained above, it is not by default, even when loaded from the supplied settings file.

      The POD file size depends on content. The hello, world POD is very large…about 5,000 triangles.

      You can use the PVRShaman tool that came in the same PowerVR SDK, along with the Collada2POD tool, to view your POD file to verify its contents.

      …Bill

  • Vincenzo

    Hi Bill,
    It seems that the camera is not imported in the correct way…
    or probably is a problem of size of the scene..
    I made an attempt scaling up the plane, and now it shows a part of it…
    but not the object which is pointed by the camera…

    That’s a result! 🙂

    Thank you..

  • Hello 🙂

    I wanted to ask you if there are any problems exporting the scene with Blender 2.5?.. as there aren’t the options there were in Blender 2.49..

    Thanks 🙂

  • From what I’ve tested. Exported Colladas from Blender 2.5, converted to POD and opened in PVRShaman, doens’t show the textures. Don’t know if there’s more to it. To fix it would be to manually add the texture from PVRShaman.

  • flycomte

    1:the lastest Blender 2.5 only can export .dae file in menu.
    2:the exported .dae by Blender 2.5, convert to .pod by Collada2POD v2.08.
    3:load by cocos3d project

    Can’t run right, have some error message in console.

    so, I change Blender to 2.49verion, export .dae, like the tutorial done.
    But I have no Collada2POD v2.06, can’t find where to download it. so i use
    Collada2POD v2.08 to convert .dae to .pod. and loaded by cocos3d project.

    there is no error message again. But i have UV material on my cube mesh, which can’t be looked in the simulator, only see a cube without the material i made in Blender4.9.

    So, who can give me the POWERVR2.06 sdk for iOS, or solve the issue? Thanks.

  • flycomte

    Blender4.29, Collada2POD 2.08

    work ok.

    Textures not show, when I open .dae with text editor, I finded the

    wand.bmp

    wand.bmp I not put it into my xcode project, i putted another .bmp file into my project, haha…,
    so my point is u do better to check the configures in the .dae file.
    and I hope cocos3d can load .pod from .dae exported by the lasteat Blender5.27 version. cause Blender5.27 make a good user operation feeling.

    thank u Bill for your 贡献. 🙂

  • Hi flycomte…

    Try posting your questions to the cocos3d forum. Someone there may have dealt with your issues already.

    …Bill

  • fetchinist

    Hello 🙂

    I tried to load my converted pod model file from blender and it is work good.
    but i got a error message like below every time when add code world’s ‘addContentFromPODResourceFile’.
    So what is problem? blender export settings( I can’t see any setting menu ) or collada to pod or something?

    sorry about my bad english.
    thank you.

    2011-08-10 16:00:46.631 mywork[295:707] [***ERROR***] GL_INVALID_VALUE: Numeric argument is out of range

    • Hi fetchinist…

      Are you using cocos3d 0.6.0-sp?

      This is usually caused by the shininess property of one of your materials being out of range. It was fixed in the 0.6.0-sp release.

      You can also reduce this error by lowering the value of the class-side shininessExpansionFactor property of the CC3PODMaterial class.

      …Bill

  • Raphael

    Hi. I tried to replace Ball.pod in the example to another pod that I generated following your steps.
    The blender file that I used was that (http://e2-productions.com/repository/modules/PDdownloads/singlefile.php?cid=1&lid=12), this woman.

    I don’t know what I’m missing, but the woman is loading without texture, although on blender I see the texture. Do I have to import any other file on xcode to apply the texture? Could be any exporting option?

    Thank you!

    • Hi Raphael…

      Have you included the texture file in the Resources group of your project, along with the POD file?

      You’ll see an error logged if the file is missing.

      Also…please submit your questions to the cocos3d forum. There are many others there who may have already dealt with the issues that you encounter.

      …Bill

  • Jasper blues

    Really fun and informative tutorial – thanks.

    If folks don’t have convenient access to a windows machine, I can confirm that collada2pod installs and runs fine using wine. http://wiki.winehq.org/MacOSX

    A good way to install wine is with Mac ports : http://www.macports.org/

    Sudo port install wine

  • iosdev

    This question is more related to blender-collada exporter: as you know blender comes with an integrated collada exporter, but when I export, the textures are gone, all the meshes are without textures. I tried to see if Cocos3d can solve the problem, but still no textures. Any idea ?

    • @iosdev

      What do you mean by your textures are “gone”?

      The POD file does not contain textures, only references to the texture files. So you need to make sure the texture files are in your Resources folder along with your POD file when you run it in cocos3d.

      What happens when you open the DAE file in Preview, or the POD file in PVR Shaman?

      …Bill

  • iosdev

    The problem is not on the POD file, but the .dae file from Blender: it doesn’ load the texture when it exports to collada even if the texture is there. When I open it in preview there is just a mesh without a texture, so as a consequence the texture isn’ t load either in the POD file.

  • iosdev

    Don’ t worry, I solved the problem, it was a Blender one. But I appreciate your help Bill.

  • Hi,
    I have installed Blender 2.59 and can make my models just fine.
    However, I can’t seem to get Blender to export my textures into my .dae files.
    Do you know of anything special I need to use/configure in Blender to make it export textures along with my meshes?
    Like I said, I’m using Blender 2.59 and the default COLLADA exporter built into Blender.

    Thanks,

  • manish

    Hi Bill,
    can you please provide me guidance regarding to POD file.which software is used for create POD file for animation and from where i can download that software for create POD.

    • Hi Manish…

      This article describes what you want to know. After reading it, what additional information do you require?

      To summarize: From any 3D editor, you export to COLLADA file format, and then run the Collada2POD file converter. The link to download that is in the article.

      …Bill

  • manish

    Hi Bill,
    i want to implement fluid effect on image something like viscous lava blobs that can be seen in lava lamps.Please suggest how can i do it with cocos3d.
    Till now i was trying to do it with POD files but i am still not sure if my approach is right or not?also am not sure about POD file contains any video of animation nodes or simple image?how can i view POD file?

  • Rob

    Hi Bill,

    I tried to export from blender to pod (via Collada2Pod) a simple cube, and it works. But I changing the node’s location (doing it directly or by creating actions) seems to have no effect. The cube stays at (0,0,0). Could you tell me why?

    Thanks,
    Rob

  • when you say that skinning is not supported, do you mean that bones animations with skin deformations are not supported? Is the the only way to animate objects is by moving around the base null of an object and baking the keyframes?

  • Marcus

    Hello Bill. I am developing an iphone app, and we are having some pretty serious issues. Our project has hit a snag, our developer is having a problem getting our Collada file to produce the animation from our Autodesk Maya animation. Are there specific settings we need for saving the collada file out of maya? or is there a specific proven method of pulling the animation from the collada file to use in his IOS program. I hope you have some sort of answer for this; it is beyond frustrating, and we have been stuck at this point for several weeks.

    Thanks,

    Marcus

    • Hi Marcus…

      I’m afraid we don’t have any experience with Maya. I believe that there is a direct Maya plugin as part of the PowerVR SDK that exports directly to POD, in addition to the native COLLADA exporter from Maya, but again, we don’t have experience with it.

      Have you searched, or tried posting to, the cocos3d forum? There have been a number of postings there regarding exporting from Maya already, and a number of users who have some experience and may be able to assist you.

      …Bill

  • Marcus

    Bill,

    Do you think it would be possible to speak with you outside of this forum? Can you email me and leave a phone number, so that I can set a conference with our animation guy and development team? We will post the results of what we get onto this forum, but it would just be way easier this way? I would greatly appreciate this.

    Thanks,

    Marcus

  • Maz

    Hello Bill,

    I am messing around with the node naming from a 3D model i have.

    Following was generated when i used the Collada2POD:

    GenA
    (#24414) S
    (#2441_007
    (#2441_008
    (#2441_009
    (#24452) S
    (#2445_016
    (#2445_028
    (#24502) S
    (#2450_019
    (#2450_023
    (#24568) S
    (#24643) S
    (#2464_022
    (#2464_026
    (#24652) S
    (#2465_012
    (#2465_013
    (#2465_014
    (#2465_015
    (#24663) S
    (#2466_020
    (#2466_024
    (#24716) S
    (#24784) S

    Complete.
    GenB
    Complete.
    GenC
    Complete.
    GenD
    Complete.
    Save
    Complete.

    I assume all of these are my nodes, unfortunately none of them work in my project when i assign them.

    myTest = (CC3MeshNode *)[myWorld getNodeNamed:@”(#2466_020″];

    • Hi Maz…

      The node names are whatever you named your models in your 3D editor.

      You can see the names listed in the output log of the Collada2POD converter, when you do the conversion to POD.

      By default, you can also see them listed in the cocos3d logs of your application, when you run your application in debug mode during development.

      If you have created your project from the cocos3d Application template, the following line should already appear at the end of the initializeWorld method in your custom CC3World class to log the structure of your nodes (including their names):

      LogDebug(@"The structure of this world is: %@", [self structureDescription]);
      

      If it does not, you can add it there.

      …Bill

  • Maz

    Thanks for the logdebug line, i can see that as you mentioned the names are identical, so im not doing anything wrong. Unfortunately still with no success. I have tested with a different POD file which was in the example of Cocos3d, that worked fine. Is there something wrong with my conversion perhaps?

  • Loz

    Hi Bill,

    Thanks for Cocos3D.

    I’m in the throws of writing a new game and needed a realistic water surface that things are going to drop into, so in a few hours threw together a generic class to do the job.

    A screen capture from the iPad emulator can be found at http://www.stigmergygames.com/qt/index.html , on the real device it runs very fast, the sample video shows the water being deformed as if you’ve dropped something into it…

    Thanks again for all your hard work in producing Cocos3D.

    Best Regards
    Loz

  • Michael

    Hey,

    I’m using Blender to export to a .dae. In Blender I am trying to have multiple objects animate. In Blender the animation works great but after i use the Collada2Pod converter, the objects that i am animating all have seemed to merged together. It looks as if any objects i give an armature to in Blender are merging together in the pod file.

    Is it possible to have multiple animations?
    Do you think I am creating animations wrong in Blender?

    Any help is greatly appreciated.

    • Hi Michael…

      If these animated characters are skinned (bone rigged), be aware that right now, cocos3d only supports one animated skinned character per POD file.

      We’re working on fixing that for an upcoming release.

      If you would like to help with that effort, it would be very useful to have your complex POD file, and associated textures, for us to use while testing.

      If you’re agreeable, you can ZIP up your POD and textures, and send them to support@brenwill.com.

      …Bill

  • Felix

    Hi Bill,

    I am using 3ds max to create the 3d object, and after I changed the file to .pod file,
    and replace “hello-world.pod” of the cocos3d template, nothing is shown. Can you
    explain me why?

    • Hi Felix…

      Please post your questions in the cocos3d forum, where others can both provide answers for you, and benefit from answers.

      First, as mentioned above, make sure the Invert Transparency flag is set correctly.

      If that is not the reason, then it could be that your camera is not pointing at the location of your model.

      Also…you can use PVRShaman app that comes with the PowerVR SDK to ensure that the POD file is valid.

      …Bill

  • michael

    dear bill, can you do me a favor,thanks. i am learning the example project included in cocos3d demo. i want to know how to build the man.pod i mean which tool you used to build the man module blender? or something else? and about the man’s animation is a bone animation or it is just a frame animation.

    • Hi Michael…

      The man.pod comes from the samples in the PowerVR SDK, so I can’t give you any idea about how that was put together.

      However, there are a number of users in the cocos3d forum who are creating animated skinned models. You should look, and ask for advice, there.

      …Bill

  • manish

    Hi Bill,
    I want to import 3d max into cocos3d game but in collada2pod converter it is not supported so I am not able to convert it into pod file.So can you please give me idea about how can i import that file.

    • Hi Manish…

      In future, please post questions to the cocos3d forum. They will get answered faster there, by a larger group of users, and others can benefit from seeing the answers.

      You need to export from 3dMax to COLLADA format first.

      I believe there is also a direct POD exporter plugin for 3dsMax. Search the cocos3d forum for postings on that by other users.

      …Bill

  • manish

    Hi Bill,
    Is there any demo sample for roadmap in cocos3d?

  • Trying to figure this out and so far looking at various forms of debug output (e.g. LOGGING_REZLOAD) hasn’t shed any light. I’ve imported a POD from Blend and everything looks fine/great. I have a node hierarchy in place with various parent nodes having mesh node children setup as leaves.

    When I then set properties on each leaf child node’s material I have found that most of these nodes have a CC3MeshNode type but a few are have a CC3Node type and so I can not access a material property on the later. I can not see any reason for why most of meshes are imported OK and can be later referenced as a CC3MeshNode but that a few can not (as they are only a CC3Node).

    Anyone have any ideas? I’m looking through the lower level C++ but not having any luck so far.

    Thanks in advance for any tips/help.

  • Shiva

    I am wondering if there are tools to covert from POD –> COLLADA?

  • Rajkumar

    Hi Bill,

    Great work. I’m using bullet physics for physics. I was able to see the 3d image from pod file. I was trying to add a torus model and added successfully but would like to know how to get the shape information from the pod file.

    Thanks

    • Hi Rajkumar…

      If by shape information you mean accessing the vertex content data, there is a family of methods for doing that on the CC3MeshNode class. Have a look at the vertex...At: and setVertex...:at: family of methods.

      In order to manipulate vertex data, you also need to retain the vertex data in memory, so also have a look at the retainVertex... and updateVertex...GLBuffer families of methods.

      …Bill

  • Aaqib

    Hi bill, could you send me the ‘Colloda2POD’ file because it’s not available anymore on the website? (Doesnt show up on the website so can’t download it)?

    Thanks
    Aaqib

    • Hi Aaqib…

      Thanks for pointing out the broken link due to the restructuring of ImgTec’s website.

      The PowerVR SDK 2.10 is still available on their site. I’ve corrected the link in the page above.

      …Bill

  • emrares

    I cannont find the Collada2POD utility to only thing that i can find on that website is PowerVR SDK 3.0

  • emrares

    Found it now it’s called PVRGeoPOD

  • Getsy

    Hi,
    I am trying to modify sample Cocos3d iOS project called CC3DemoMashUp to work with my solution. But, i couldn’t even to modify the first screen itself where they have kept ‘kRobotPODFile’ – “IntroducingPOD_float.pod” 3d model image. I want to have my own Home 3d model image in place of “IntroducingPOD_float.pod”. If i place any 3d model my own Home image, it doesn’t show my model image as first image and doesn’t show similar to the existing IntroducingPOD_float.pod. I am struggling for almost more than 4 days, could some one guide me how i can replace my own Home 3d model image with the existing “IntroducingPOD_float.pod” 3d model in sample CC3DemoMashUp project? I am thinking my .pod file is not showing as unix executable file instead of it shows document kind of file. But, i tried converting using this link http://brenwill.com/2011/cocos3d-importing-converting-collada-to-pod/ still why doesn’t it converted as actual unix executable .pod file, i don’t know. Please help urgent help is needed.

    • Hi Getsy…

      Please post future questions to the cocos3d forum, where they can be answered by the community.

      The file extension does not matter.

      Start with a new project using the cocos3d Application template. It is much simpler than the CC3DemoMashUp.

      In the initializeScene method, replace the loading of the hello text POD with your own POD model.

      It’s important that the model is located where the camera can see it. In the onOpen method of your custom CC3Scene class, you can uncomment some code that will move the camera to where it can see the entire scene.

      You can also use the shouldDrawAllDescriptors and shouldDrawAllWireframeBoxes properties to highlight where the models are. There are examples of using these in the initializeScene method of the project template.

      Is your model textured? Is the texture file alongside the POD file? Make sure the opacity property of the model is not zero.

      You can verify your model with the PVRShaman program that came with the PowerVR SDK. If it is visible in that program then it should be visible in cocos3d.

      …Bill

  • Getsy

    Hi Bill,

    Thanks for your suggestions. I started modified CC3DemoMashUp, because i kind of trying a sample app almost similar to CC3DemoMashUp.
    My Requirement: I want to show a top level House image and click on a button will go towards the door (camera move animation) and go inside one of the rooms of the house. Then click on button there, will move to another room of the same house. It will rotate and move to all the rooms available in the Home like this. Something exactly similar to flash animated demo available in this link -> http://www.amfam.com/learning-center/my-home/interactive-home.asp
    I created a sample cocos3d Application template as well and added my home.pod file instead of hello text POD, but my home pod shows in black & white color when i run the app in simulator, not the colored image (actual dae image is in color). May be i missed something when converting Collada to pod ? And, I posted my queries twice in cocos3d forum and reminded as well, but no reply yet and i can’t wait for so long time as i need to do some development on this. And, could you also please give me your advise how i can achieve further on moving rooms by room in a Home based on my requirement mentioned above and here http://www.amfam.com/learning-center/my-home/interactive-home.asp ?

    Please help!

    Thank you!

  • Jeff

    Hi Bill,

    I am using blender, and per the instructions my model world has ‘up’ along the Z-axis. I export it to a collada file, and use the tool to convert it to a pod file. All the settings for the tools are set per the instructions above.

    Everything loads into Cocos3d just fine. The problem is that while my scene has its Y axis as up and down, all the pod files i import have their Z axis as up and down. I know the instructions above say “depending on your 3D editor, you may need to play with this to get the right combination of 3D editor, COLLADA, PVRGeoPOD, cocos3d, and OpenGL ES orientations”. I just have no idea what else I can do.

    Any thoughts?

    Thanks!

    • Jeff

      I performed the following steps that I found in another forum.

      1. Select object in Blender and rotate on X-axis by -90 degrees (don’t panic! we’ll fix it for Blender and Unity)
      2. From “Object” menu select “Apply > Rotation”
      3. According to Blender the object is no longer rotated. Rotate object by 90 degrees and presto!

      This solved the problem, but I would love to understand why this is necessary.

      Thanks again!

  • Karan

    Hi Bill,

    i am new in cocos3d. I have created a sample project in cocos3d. But i cant seee the 3d object that i had created using blender and powervr sdk.

    The tutorial uses blender 2.4.9 , but i am using 2.66 version. There i cant see the options that u ve mentioned such as Triangles. So what all the options that i have to select in blender 2.66a ?

    Thanks

  • Suresh

    Hi Bill,

    i am using blender 2.66a to create 3dobject. I cann’t find those options that you have mentioned(like Triangle,only export selection), when export to collada file. Where i can find these options ? Or is there any difference in options for higher version of blender?

    Thanks

    • Hi Karan & Suresh…

      Yes…the instructions above for Blender are fairly old. I’ll update them when I get a chance. I don’t have any suggestions for Blender 2.66 at this time, as I haven’t used it myself.

      You might also consider using the PVRGeoPOD plug-in that is included in the PowerVR SDK. It allows you to generate POD files directly from Blender, without having to use the COLLADA stage.

      …Bill

  • Alangat

    Hi Bill,

    I ve created a 3d object using Blender and exported in to collada form. And converted to pod file using PVRGeoPod.
    I added the pod file to cocos3d project resources. Then altered the hello-world project by replacing pod name and node name.

    I didn’t make any other change. When i run the project i can see the 3d object, but it is not rotating . I followed the exact steps in the tutorial.When i use other built-in pods i can see it rotates. Is there any other step that i should do ?

    • Hi Alangat…

      Please post technical questions to the cocos3d forum, so others can benefit from the discussion.

      My guess is that you have not retrieved the node you want, probably due to a naming difference. You can verify the node names in the structural description that is automatically logged. You can also add a LogDebug statement to log the node that you have retrieved.

      …Bill

  • Alangat

    Thanks Bill. I checked it and i am getting NULL.

  • Alangat

    LogDebug statement did the job

    I had problem in node name. So i gave custom node name

    [lang]
    [self addContentFromPODResourceFile: @”BlueBall.pod” withName:@”obj”];
    CC3MeshNode* ball = (CC3MeshNode*)[self getNodeNamed: @”obj”];
    [/lang]

    Now it does work.
    Thanks Bill

  • Rhody

    Hi Bill!

    I wonder whether Cocos3D can retrieve custom data from my POD file, namely SPODNode.pUserData

    Regards.

    • Hi Rhody…

      It doesn’t currently, but there is no reason why not, other than it just hasn’t been implemented yet. There is already a userData property on CC3Node, but it’s just not being populated by the resource loader.

      I’ll add it to the next 2.0 release.

      …Bill

  • harsh

    can you please tell that after POD files how implement them in objective C for my app

    • Hi Harsh…

      The Xcode cocos3d Application template project will get you started. In the customized CC3Scene class within that project, replace loading the default hello, world POD file with your own POD file.

      To really understand the capabilities of cocos3d, play with the CC3DemoMashUpApp, and study the code implementation in the CC3DemoMashUpScene class.

      …Bill

  • Emran

    Hi ! mac shows my exported pvr file as document . while i see it’s a unix executable file in an example.
    xcode can not know my pvr as i reach to0 this command :
    PVRTErrorOutputDebug(“PVRTTextureLoadPartialFromPointer failed: not a valid pvr.\n”);
    what is the problem ?

    • Emran

      I just drag the pvr file to my project source files. is it a correct way ?

      • Hi Emran…

        This article talks about generating POD files containing 3D models. The PVR file format is for textures. Are you sure you want a PVR file?

        If so, be aware that the PVR texture format is not usable if you try to run an app that you develop using cocos3d under OSX. Mac computers do not have the decompression hardware in the GPU to support PVR formats.

        Both PVR and POD are unknown extensions under OSX, so double-clicking on them will not generally get you anywhere by default.

        POD files and texture files are treated as Resources under Xcode. Simply drag your POD, PVR, JPG and PNG files to the Resources group into your Project Navigator in Xcode.

        …Bill

  • amin

    Hi, bill, can u privode a tool for pod file convert to collada file? I loss my 3d max file. thank u very much!~

  • John Milton

    Hi Bill,

    Thank you for this great post.

    I see some problem with exporting files with textures from blender to the pod files. I use dragon files from Cocos3d distribution. I created simple Xcode test project and loaded the Dragon.pod file from the distribution – all textures were shown correctly. Then I loaded the Dragon.blend into Blender and exported it into dragon.pod – the textures were not shown, I saw only a white dragon. I notices that new exported file is significantly smaller. I tried both ways:
    1. Exporting from Blender through PVRGeoPod add-on. Dragon.blend was exported from blender.
    Blender 2.69, PVRGeoPod 2.1.5.1.
    2. Exporting from Blender to Collada file and the convert it to the pod file using PVRGeoPod.

    I inspected materials in the dragon.pod file using PVRShaman 2.2 and found that materials were exported and I see them in the new pod file.

    Could you describe the list of steps how did you export the Dragon project from Blender to pod file.

    It would be very useful if you can provide very simple blender project with texture, which we can load and understand all data in the file in case if some tool will corrupt them.

    Thank you in advance,
    John Milton.

  • John Milton

    I would like to add: IOS test and PVRShaman don’t show textures when I load new converted dragon.pod file, it looks like it’s a converter or blender project problem. Txs, John.

    • Hi John…

      PVRGeoPod does not export the textures. You need to do that separately. And the POD file does not include textures, it just includes references to the texture file names. You need to put the texture file in the same folder as the POD file so that cocos3d can find it when loading the POD file.

      Do the materials contain a reference to the texture, and do you have the texture file located alongside the POD file in your app?

      …Bill

  • Lukasz

    When I try to convert dea file to pod using PVRGeoPOD converter, it hangs at the “Final export stage”.
    I follow all settings mentioned in the post. What may be the reason / reasons?

Add Your Comment

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


Fatal error: Uncaught Error: Call to undefined function source_code_in_comments_instructions() in /homepages/29/d282705311/htdocs/wp-content/themes/atahualpa353/comments.php:166 Stack trace: #0 /homepages/29/d282705311/htdocs/wp-includes/comment-template.php(1472): require() #1 /homepages/29/d282705311/htdocs/wp-content/themes/atahualpa353/functions/bfa_post_parts.php(237): comments_template() #2 /homepages/29/d282705311/htdocs/wp-content/themes/atahualpa353/functions.php(533) : eval()'d code(5): bfa_get_comments() #3 /homepages/29/d282705311/htdocs/wp-content/themes/atahualpa353/functions.php(533): eval() #4 /homepages/29/d282705311/htdocs/wp-content/themes/atahualpa353/index.php(29): bfa_center_content('<?php /* Displa...') #5 /homepages/29/d282705311/htdocs/wp-includes/template-loader.php(74): include('/homepages/29/d...') #6 /homepages/29/d282705311/htdocs/wp-blog-header.php(19): require_once('/homepages/29/d...') #7 /homepages/29/d282705311/htdocs/index.php(17): require('/homepages/29/d...') #8 {main} thrown in /homepages/29/d282705311/htdocs/wp-content/themes/atahualpa353/comments.php on line 166