3D model support

I do not understand why in cocos2d add support for 3D formats (if you want to add the format I have a 3ds).
I think Cocos-2d best for 2d framework, and want it to remain it further.
I would like to see cocos3d supports not only 3d formats but other features such as (bone animation, mesh animation ,terrain, light, material,physics,math and other…)

Misha Philypchuk wrote:

I do not understand why in cocos2d add support for 3D formats (if you want to add the format I have a 3ds).
I think Cocos-2d best for 2d framework, and want it to remain it further.

So true, Misha

I would very much like to see this implemented as long as it stays simple. The sample code looks great! Although some people don’t “understand” why it would be helpful, it is clear to me. Thanks Minggo!

@Misha / Hermann
I think the point to clarify is that we’re looking at adding 3d Model support to the framework. The goal isn’t to make it a 3D engine. Simply allow 3D objects to exist in our “2D” worlds. I think the idea is brilliant and will open a lot of cool opportunities, as long as we stick to K.I.S.S. principals.

That would be awesome. I am 100% in for 3d model support and character animation.
It would be simpler then to make app that required basic 3d models and animations.

I thins there is a real big trouble, cocos3d have no physics engine integrated …

Along with many of the other posters, this thread makes me nervous. I can see the potential for cocos2d-x to change beyond all recognition once 3d stuff is added, and not necessarily for the better. I would prefer that the engine sticks to what it does best: excellent 2d. There are still loads and loads of improvements that could be made to the existing engine before any drastic enhancements (such as 3d support) are made.

I don’t mean to sound like a downer; this is just my opinion. The work you guys do is fantastic and I have nothing but respect for the engine as it stands today.

Ben

@Ben

I believe Minggo/Cocos2d-x team is targeting to support 3D models in 2D platform with the bare minmum things. It could be helpful for the developers like I and others who are not very well versed with OpenGL & 3D platform but like to support a 3D character animation in their game. At some point in 2D (or better say 2.5D) it is cumbersome to manage a 3D looking sprite animation which indents to move in all direction. Let me give a example:

  • Clash of Clans (3D looking characters moving on 2D tile maps)
  • Talking Tom applications
  • A simple car race application having 3D car and developer would like nice car troll effect upon accident. (A variation of Mutant Roadkill - don’t remember from which game GLU copied the gameplay)
  • A simple application that tells about protein structure or any chemical bond structure.

The list could go endless and only limits depend upon game designer’s imagination.

IMHO, It’s quite unfair to learn whole 3D programming when only a 3D model and its animation support is required over the 2D platform.

Just my two cents…
Paras Mendiratta

Paras Mendiratta wrote:

@Ben
>
I believe Minggo/Cocos2d-x team is targeting to support 3D models in 2D platform with the bare minmum things. It could be helpful for the developers like I and others who are not very well versed with OpenGL & 3D platform but like to support a 3D character animation in their game. At some point in 2D (or better say 2.5D) it is cumbersome to manage a 3D looking sprite animation which indents to move in all direction. Let me give a example:
>

  • Clash of Clans (3D looking characters moving on 2D tile maps)
  • Talking Tom applications
  • A simple car race application having 3D car and developer would like nice car troll effect upon accident. (A variation of Mutant Roadkill - don’t remember from which game GLU copied the gameplay)
  • A simple application that tells about protein structure or any chemical bond structure.
    >
    The list could go endless and only limits depend upon game designer’s imagination.
    >
    IMHO, It’s quite unfair to learn whole 3D programming when only a 3D model and its animation support is required over the 2D platform.
    >
    Just my two cents…
    Paras Mendiratta

…but these are really implementations that should be achieved using a “proper” 3d engine. Doing characters stuff is really, really complicated. For example, to implement animated characters you’ll need all sorts of mad things to be built into the framework:

  • very fast mesh rendering (obv.)
  • skeletal support and bone rigging
  • blended keyframed and procedural/physics animation (that work together well)
  • some kind of layering system to make it all work with the 2d stuff (and UI stuff)
  • support for who knows how many different file formats
  • support for all sorts of shaders (skin/hair/cloth)
  • …and I’m sure a load of other stuff too…

If you want a good example of the complexity required to do this kind of thing properly then I suggest you look up Unity or Unreal or any of the professional grade 3d engines. Personally I can’t see how cocos2d-x can integrate 3d stuff and make it high-quality and useful without being to the detriment of 2d. I’m happy to be proved wrong of course, but at this stage I’m skeptical.

Ben

Paras Mendiratta wrote:

  • A simple car race application having 3D car and developer would like nice car troll effect upon accident. (A variation of Mutant Roadkill - don’t remember from which game GLU copied the gameplay)

GLU cloned it from Zombie Highway, and it’s full 3D and not based on a simple 3D add-on.
The simple car games which are based on Cocos2d-x used pre-rendered 3D models as 2D bitmaps.

As long the Cocos2d-x 3D part is an extension (with less features like a 3d engine) go for it!

`Ben
Unity is paid and cost is fairly denting developer’s pocket for simple 3D model support on 2D platform.

Regarding development & support of 3D model in Cocos2D-x, yes, it is not easy path but there are many open source engines are there to opt in. Unfortunately, AFAIK, none of them supports cross-platform.
So IMO, it can be good start. Many devs already know Cocos2D platform and just for simply supporting a 3D character, dev has to moved on 3D game engine. There is huge learning curve involve in this for a developer. So why every time, every developer has to reinvent the wheel?

`Herman:
You are right about the game that both of them been developed in 3D but if you look at Zombie Highway - it can be easily developed on 2D platform with 3D model support.

I believe Cocos2D-x team already has some open source in place for supporting the 3D character but yes a big transformation is required to port in C++ and support on all platform. I believe, Minggo can reveal more about the findings.

In case, if they don’t have any open source yet, they can look forward on min3D on Android (http://code.google.com/p/min3d/) . It is open source and MIT licence.

Minggo Zhang wrote:

> - Ability to use “motion files” that contain animation information so that one motion file can be used to animate a number of models. For example, a generic “walking” animation can be stored in a motion file and apply that motion file into different models on the screen.
How to generate “motion files”? Did you mean that some model format support it?
It depends on the platform. I think we could create a separate format that is exclusive for cocos2d-x.

Yeap, we could add 3d model support as an extension like GUI, then it will not break the simplify of cocos2d-x.

@Paras Mendiratta
Thank you for your suggestion. I have heard this engine but not dig into it very much.
And i also found this project: http://assimp.sourceforge.net/, but it depends on Boost.

Minggo Zhang wrote:

Yeap, we could add 3d model support as an extension like GUI, then it will not break the simplify of cocos2d-x.
>
@Paras Mendiratta
Thank you for your suggestion. I have heard this engine but not dig into it very much.
And i also found this project: http://assimp.sourceforge.net/, but it depends on Boost.

Minggo, I really like this idea of very basic 3d support. While I personally love working with 2d games, i occasionally have the need for just a single 3D character on the screen. Case in point is imagine a very basic card based game that just has an avatar of the user in a corner of the screen. while the cards themselves can just be 2D, if something positive happens I would love to play a “happy” animation or something on the character.

I don’t need multiple cameras, I don’t need terrain or collision, i just need a simple model to load where i can animate and texture. …maybe rotate if the user wants to play with them.

@Monocle Society
I think we just want to support the needs like you.

Minggo Zhang wrote:

* supporting formats
* OBJ
>
* 3DS
** MD2?

Support for blender would be great.

Minggo Zhang wrote:
// animation 9CCAnimate3D *animate = CCAnimation3D(duration, start frame, end frame); 10sp->runAction(animate);

Feeding the animation the time that have passed since the last frame would be great to have slow motion effects, maybe looking at how Ogre3d manage its AnimationState could be a great inspiration. Something like that: http://www.ogre3d.org/docs/api/html/classOgre_1_1AnimationState.html#ae69ff5a068d086be7ecc048a71ed8efc

Minggo Zhang wrote:

@Monocle Society
I think we just want to support the needs like you.

Minggo, have you guys taken a look at what apple is doing in terms of basic scenekit support on OS X?

I would love to help provide any input or testing if you need it. I’ve been in the iPhone industry since day one of the app store launch, and have made over 25 applications, 9 featured, with over 200 million downloads.

I do hope it supports FBX so that I do not have to export again.

Ben Ward wrote:

Paras Mendiratta wrote:
> @Ben
>
> I believe Minggo/Cocos2d-x team is targeting to support 3D models in 2D platform with the bare minmum things. It could be helpful for the developers like I and others who are not very well versed with OpenGL & 3D platform but like to support a 3D character animation in their game. At some point in 2D (or better say 2.5D) it is cumbersome to manage a 3D looking sprite animation which indents to move in all direction. Let me give a example:
>
> - Clash of Clans (3D looking characters moving on 2D tile maps)
> - Talking Tom applications
> - A simple car race application having 3D car and developer would like nice car troll effect upon accident. (A variation of Mutant Roadkill - don’t remember from which game GLU copied the gameplay)
> - A simple application that tells about protein structure or any chemical bond structure.
>
> The list could go endless and only limits depend upon game designer’s imagination.
>
> IMHO, It’s quite unfair to learn whole 3D programming when only a 3D model and its animation support is required over the 2D platform.
>
> Just my two cents…
> Paras Mendiratta
>
…but these are really implementations that should be achieved using a “proper” 3d engine. Doing characters stuff is really, really complicated. For example, to implement animated characters you’ll need all sorts of mad things to be built into the framework:
>
* very fast mesh rendering (obv.)
* skeletal support and bone rigging
* blended keyframed and procedural/physics animation (that work together well)
* some kind of layering system to make it all work with the 2d stuff (and UI stuff)
* support for who knows how many different file formats
* support for all sorts of shaders (skin/hair/cloth)
* …and I’m sure a load of other stuff too…
>
If you want a good example of the complexity required to do this kind of thing properly then I suggest you look up Unity or Unreal or any of the professional grade 3d engines. Personally I can’t see how cocos2d-x can integrate 3d stuff and make it high-quality and useful without being to the detriment of 2d. I’m happy to be proved wrong of course, but at this stage I’m skeptical.
>
Ben

No, these technologies were used quite common in PS games (2D background + 3D characters). The most famous one is definitely Final Fantasy 7/8/9.

In many senses, it’s not necessary to render a whole 3D world. PS2 games were mostly pure 3D games, such as Final Fantasy 10, due to the improved hardware power, but 2.5d still has its position.