I’ve used the fbx-conv tool from git and followed the example here http://www.cocos2d-x.org/docs/cocos2d-x/en/3d/sprite3d.html but I just can’t display the model.
I’m getting the message cocos2d: warning: Attribute not found: a_normal, which might have something to do with it. Anyone have any experience with this?
Here’s the code:
auto pie = Sprite3D::create("pie.c3b");
pie->setScale(10.0f);
pie->setPosition(Vec2(100, 100));
addChild(pie, 1);
I downloaded the tool from: https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/tree/v3/fbx-conv/win
Then followed the FBX export guide here: http://digitalrune.github.io/DigitalRune-Documentation/html/6f749972-9cb2-4274-b283-c327ba45e379.htm (also tried using Fbx 6.1 ASCII when exporting).
Yeah, I read it. Didn’t think I’d need a camera since there already is one. But now I did try to create a perspective cam, and then an orthographic one, but I still couldn’t see it. Source file is a blender file.
I ran both fbx-conv.exe -a -v <myfile> and fbx-conv.exe -a -v -f <myfile> did not get any errors during conversion.
3)add a new sprite3d node and add your converted model to it. Make sure its visible from the camera
4)compile and tell us the result.
If you can see your model, it means that originally, you placed it wrong and it was not in camera field of view
However in my opinion, cocos support for 3d is rudimentary and you are better off with unity3d, Godot or Unreal. Cocos2d-x excels at 2d and smaller apk size