2

I am developing an 3d app using Cocos3d on iOS. I created a blender file for a house and exported it as .dae and convert to .pod using colladatopod tool. When i render image in blender, it shows output well, but after i converted and added as .pod file in cocos3d project and running in simulator, the output has black shaded. Could someone advise why is this issue occur? i did set shouldCullBackFaces to NO in code. I followed the procedure as it is for pod conversion. I don't know where is the issue now.

Here are the reference screenshot link: Blender output: http://s11.postimage.org/94d9d2h8z/Blender_House_Model.png Simulator output: http://s3.postimage.org/jztkix0s3/Output_In_Simulator.png

Blender output: http://s14.postimage.org/huixtamk1/Blender_Output.png Simulator output: http://s14.postimage.org/u3k1kcu5t/Simulator_Output.png

And another question is, my pod output always shows smaller image in simulator eventhough its a bigger pod model, how should i set it to the actual size in code?

Thank you

Getsy
  • 4,887
  • 16
  • 78
  • 139
  • Looks like the brick texture is missing, did you add it to the project? Size is simply determined by distance to camera, closer to camera == bigger object. ;) – CodeSmile Feb 22 '13 at 13:59
  • This is one model created in blender, it has texture for roof, windows and door. And it has colored with some background on the wall. But, nothing is coming when i run it simulator. What should i do now? – Getsy Feb 22 '13 at 14:09
  • I have kept another screenshot reference in the question above. Its strange to me that why it is not working when it comes to simulator. – Getsy Feb 22 '13 at 14:21
  • Hi, Suggestion please? – Getsy Feb 22 '13 at 17:27
  • I am using Blender 2.65. is this the problem? – Getsy Feb 23 '13 at 15:14
  • Hi learncocos2d, As you said, looks like not adding texture is the problem. Here is my code below, please advise me how to add texture image used in the model? CC3PODResourceNode* podRezNode = [CC3PODResourceNode nodeWithName: @"RobotPODRez"]; podRezNode.resource = [IntroducingPODResource resourceFromFile: @"home.pod"]; podRezNode.location = cc3v(100.0, -90.0, 500.0); // If you want to stop the robot arm from being animated, uncomment the following line. podRezNode.shouldCullBackFaces = NO; podRezNode.isTouchEnabled = YES; [self addChild: podRezNode]; – Getsy Feb 23 '13 at 19:56

2 Answers2

3

I guess there is something wrong with your pod file. How are you exporting pod file? Do something like exporting to collada and then use a collada to POD converter to get the required .pod files. I had some issues with blender before. They require python files to be added for additional functionalities. May be you are missing some. Try going through some tutorials. I had been working in cocos for a few days so can't tell you in detail the reason. Hope this helps :)

You can also check whether the POD file is broken or not. Follow these

  • brenwill.com/2011/cocos3d-importing-converting-collada-to-pod

  • cocos2d-iphone.org/forum/topic/28872 (Also go through tutorials of
    Bill Hollings)

Meera
  • 1,031
  • 6
  • 25
  • Hi, Thank you. Btw, I read all these before starting the project. My Blend file is here, https://www.yousendit.com/download/UVJod0VKY3lnYU52TzhUQw DAE file is at: https://www.yousendit.com/download/UVJod0VKY3lvQUpqQTlVag POD file link https://www.yousendit.com/download/UVJod0VNR3MxUUJwdmNUQw PVRGeoPOD settings Screenshots https://www.yousendit.com/download/UVJod0VNR3NrWS9OTzhUQw https://www.yousendit.com/download/UVJod0VNR3M1R1BMYnNUQw – Getsy Mar 04 '13 at 13:50
  • @Getsy: I just opened your .dae file and exported to Collada and then to POD file. When I opened in PVRShaman I could not see your 3d object in it. I guess the problem is while exporting to collada. You can send your POD to support@brenwill.com. Bill Hollings can provide solution for you. – Meera Mar 05 '13 at 05:48
  • Hi Meera, Many Thanks for the reply. Where could be the issue here? Could you check my blend file in the link i provided? Its just a home shape with 'material' added, not even any texture added in it. And, you could have converted to dae and then pod very straight forward. I doubt Blender setting problem in this case, could you check my blend file and its settigns, whether they are correct or wrong? Btw, i sent all these files to support@brenwill.com two weeks ago, but unfortunately no one has taken care and replied on it. – Getsy Mar 05 '13 at 09:12
  • Are you able to render the image? I couldn't render your .blend file and not even visible when I exported it to collada. But the .dae file which you sent, the house is visible in it. – Meera Mar 05 '13 at 10:17
  • Yes, I'm able to render .blend without any issues. It shows the output properly as you could see in .dae file. Also, i uploaded my pod file as well. – Getsy Mar 05 '13 at 19:32
  • Hi Meera, Still no success for long time. Can you please share you blend and pod file, so i can cross check the settings and analyse it. – Getsy Mar 12 '13 at 04:52
  • drawing house POD file -https://www.yousendit.com/download/UVJqeW56TStKV085TE5Vag drawing house dae file - https://www.yousendit.com/download/UVJqeW56TSszS3FVQU1UQw screenshot1 - https://www.yousendit.com/download/UVJqeW56TSsrV3g3czhUQw screenshot2 - https://www.yousendit.com/download/UVJqeW56TSt1Yk44SjhUQw – Meera Mar 12 '13 at 06:21
  • I just exported your blend file in my blender and then converted to pod. Didn't made any changes. I cant view the .dae file I just converted. Its blank, even put the samein PVRShaman and still the house is not visible. I am not getting what's going wrong in here. – Meera Mar 12 '13 at 06:26
  • Ok, i'm confused here, i just downloaded my blend file again and open in my blender and its very fine, you can check this screenshot->https://www.yousendit.com/download/UVJqeW56MGMrV3pOUjhUQw Could you please share two info. 1. What is your blender version? 2. Can you share PVRShaman setup in yousendit as i have 32 bit Mac and they don't have setup for 32bit from this link http://www.imgtec.com/powervr/insider/powervr-pvrshaman.asp? – Getsy Mar 12 '13 at 07:24
  • Do you have any chat email? So, i can get your help quickly, thank you. – Getsy Mar 12 '13 at 07:31
  • Hi Meera, This issue is still not solved for me. Can we chat please? – Getsy Mar 19 '13 at 05:04
  • click on the above chat link @Getsy – Meera Mar 19 '13 at 05:11
  • Hi Meera, I have been waiting in Chat..please join – Getsy Mar 19 '13 at 06:37
  • Please check and download my sample project from this link https://www.yousendit.com/download/UVJqNnFLU1BVbS9tcXRVag i created one new sample project for Cocos3d and its fine with hello world text. Then, I have added one house model pod file. I have used a basic house model with one color (Material) and used to export to pod and using now. Please check the attached project in zip format, which also contains .blend, .dae and .pod file i have used alongwith the project source. – Getsy Mar 19 '13 at 07:12
  • Hi Meera, Are you using "Collada2PODGUI" to convert your .dae to .pod (or) any other tool from image technologies? – Getsy Mar 25 '13 at 05:54
  • ok, thanks. Collada2POD GUI is not opening in my mac machine (stuck with the following statement in Terminal, not sure why. Mac-Mini:~ Getsy-$ /Users/Getsy-/Desktop/Getsy/ Project/Tools/Collada2POD_REL_2.10@869778/Collada2POD/MacOS_x86_32/Collada2PODGUI ; exit; – Getsy Mar 25 '13 at 06:10
  • Also, please share me your "Collada2POD GUI" tool version as well. – Getsy Mar 25 '13 at 06:20
  • Hey @Getsy, i too get the same, never mind that, can you get the GUI window along with terminal?? Actually you may find Collad2POD and Collada2PODGUI, the first is via command line. And second one provides GUI interface with options and selection to make. Check again – Meera Mar 25 '13 at 06:21
  • Hi Meera, What i have got for Collada convertor tool is, a folder called "MacOS_x86_32" where we can see 'Collada2POD' and 'Collada2PODGUI', i tried to double click 'Collada2PODGUI', it launches Terminal and not opening up the actual GUI further. – Getsy Mar 25 '13 at 06:25
  • @Getsy: You might need http://apple-x11.en.softonic.com/mac. Its the x11 for mac, that builds the GUI. I guess this would solve the problem. – Meera Mar 25 '13 at 06:31
  • Unfortunately, existing x11 in my mac doesn't launch. I tried to open from Applications->Utilities->x11, it tries to launch but it doesn't launch it. So as you said, it causes the launch of Collada2Pod GUI as well. – Getsy Mar 25 '13 at 09:31
  • Do you have a sample cocos3d project and which will show a pod model in front of camera , apart from BallBounce which you shared me earlier ? If yes, can you share me the project, blend, dae and pod file on that? So i can look at the code, blend settings, pod setting in it, and follow the same in my project. – Getsy Mar 25 '13 at 11:46
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/26913/discussion-between-meera-j-pai-and-getsy) – Meera Mar 26 '13 at 06:44
  • Meera,I managed to show POD file in simulator output properly by modifying camera,light location values. one more prob. texture is showing good in blender output but not displaying in simulator output, This is my code, please suggest how i can add texture in code, CC3PODResourceNode* podRezNode = [CC3PODResourceNode nodeWithName: @"RobotPODRez"]; podRezNode.resource = [IntroducingPODResource resourceFromFile: @"DieCube.pod"]; podRezNode.shouldCullBackFaces = NO; podRezNode.location = cc3v(0.0, 0.0, 0.0); podRezNode.isTouchEnabled = YES; [self addChild: podRezNode]; – Getsy Mar 26 '13 at 10:29
  • Here is the updated project-> https://www.yousendit.com/download/UVJnblRqY1NRR2Y1SE1UQw – Getsy Mar 26 '13 at 20:12
  • I have solved it, Texture is displaying now in Cocos3d app output. Thank you so much Meera. Btw, where are you located? – Getsy Mar 27 '13 at 03:10
1

It's hard to tell what's your setup, but here's a list of things to check

  • Is the shader properly set before rendering? Try using a different one.

  • Is the shader using any lighting that is somehow misaligned? Should there be normals?

  • Is it an improperly loaded non-power-of-two texture causing the problem? Try a different texture.

  • Are you exporting texture coords properly, do you read them into the VBO?

Meera
  • 1,031
  • 6
  • 25
kineticfocus
  • 492
  • 4
  • 16
  • Please help seeing files below and identify the issue here. POD file link https://www.yousendit.com/download/UVJod0VKY3lnYU52TzhUQw DAE file is at: https://www.yousendit.com/download/UVJod0VKY3lvQUpqQTlVag POD file link https://www.yousendit.com/download/UVJod0VNR3MxUUJwdmNUQw PVRGeoPOD settings Screenshots https://www.yousendit.com/download/UVJod0VNR3NrWS9OTzhUQw https://www.yousendit.com/download/UVJod0VNR3M1R1BMYnNUQw – Getsy Mar 04 '13 at 14:01