Jump to content


3D models with C++ OpenGL


36 replies to this topic

#21 JarkkoL

    Senior Member

  • Members
  • PipPipPipPip
  • 474 posts

Posted 04 November 2009 - 08:22 PM

FBX is another good alternative and AFAIK supports skinning, animations, etc. (it's used by Autodesk as interchange format between Maya, 3DS Max, etc.) because it's widely supported. It's proprietary format from Autodesk though and you have to my knowledge use FBX SDK for loading. You could always save some trouble and use Spin-X Engine which has Collada loader implemented and just write OpenGL renderer for it, hehe ;)

#22 Xenomorph05

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 04 November 2009 - 11:11 PM

I am not skilled enough to write a renderer for OpenGL.

Right now I am currently looking at the Collada DOM viewer and seeing if I can take from it what I need to load and draw a model.

I know fbx can be used with XNA..

I was hoping there would be a loader for dae like there is for obj or md2.

#23 JarkkoL

    Senior Member

  • Members
  • PipPipPipPip
  • 474 posts

Posted 04 November 2009 - 11:23 PM

There is FCollada library at least and FBX SDK can also load Collada files. I have no experience in using either, so I don't know how usable those libraries are.

#24 Xenomorph05

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 05 November 2009 - 12:50 AM

I have been trying to use the Collada DOM but the includes are completely wonky. In my searching for FCollada I found this post.

http://dmaggot.wordp...lada-nightmare/

It seems Collada is a "nightmare" to get working. :(

I really wanted to use it. I even downloaded the Demo from codeProject but I ran into issues trying to even compile it.

I have spent days trying to get OBJ to work, and it does but I can't animate with it. Now I try a newer format and it seems to be ridiculous.

I will try to see about fbx on opengl but if anyone has other tips for Collada I will keep trying it.

#25 JarkkoL

    Senior Member

  • Members
  • PipPipPipPip
  • 474 posts

Posted 05 November 2009 - 01:23 AM

Well, you could try to use my mesh class for loading, because I know that project compiles at least under MSVC 2008 ;) What you would do is basically:

#include "core_engine/mesh.h"

#include "core/w32_fsys.h"

using namespace pfc;


int main(int argc_, const char *argv_[])

{

  w32_file_system fs(true);

  owner_ptr<mesh> m=load_mesh("test.dae");

  return 0;

}

The mesh class contains all the data in platform agnostic format. However, I haven't done large amount of testing with it and the animation loading isn't done yet.

#26 Xenomorph05

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 05 November 2009 - 01:37 AM

Can I just Google for those header files or would you send them to me so I can try and test it?

#27 JarkkoL

    Senior Member

  • Members
  • PipPipPipPip
  • 474 posts

Posted 05 November 2009 - 01:45 AM

You can get it from Spin-X Engine SourceForge SVN. If you don't want setup SVN, just download the GNU tarball of the project. Read docs/quick_start.txt for instructions how to get started.

#28 Xenomorph05

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 05 November 2009 - 01:56 AM

I looked at quick_start and it says it needs the direct x sdk?

#29 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1586 posts

Posted 05 November 2009 - 04:46 AM

Cal3d is a good choice. You can get a Blender plugin here:
http://www-users.cs....al3d/index.html

It's open source and doesn't have any windows files in the source code. Pretty good documentation, I think. You just drop the py file in the plugin directory of Blender and it will show up in the menu.
Currently using Blender and Unity.

#30 Xenomorph05

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 05 November 2009 - 05:17 AM

I will check more about cal3D tomorrow and I am going to try some more with Collada. Thanks for the tips. I appreciate them all and more are welcome! :)

#31 JarkkoL

    Senior Member

  • Members
  • PipPipPipPip
  • 474 posts

Posted 05 November 2009 - 11:50 AM

Yes, it needs DirectX SDK if you compile the entire solution with the renderer (graphics library). You just need core and core_engine libraries though for loading meshes, which has no DirectX dependencies.

#32 Xenomorph05

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 05 November 2009 - 01:37 PM

I think I am going to try a different method to use Collada files. I will try the DOM again and there is a tutorial on the files that I need to read.

#33 JarkkoL

    Senior Member

  • Members
  • PipPipPipPip
  • 474 posts

Posted 05 November 2009 - 01:51 PM

Good luck! (: Let us know how it turns out.

#34 Xenomorph05

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 05 November 2009 - 01:58 PM

Thanks! I hope I can put in enough hours to get this working. I did find someone on the Collada forums who has started to work on this already so I am hoping we can work on this together.

#35 Kenneth Gorking

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 05 November 2009 - 02:43 PM

You should check out Assimp before trying to write your own parser (especially since you're on a time table). It also supports alot of formats.
"Stupid bug! You go squish now!!" - Homer Simpson

#36 Xenomorph05

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 05 November 2009 - 06:16 PM

Thanks! i am checking out ASSIMP and the Boost libraries. I hope that this can make my Collada using like a dream.

#37 JarkkoL

    Senior Member

  • Members
  • PipPipPipPip
  • 474 posts

Posted 09 November 2009 - 09:10 PM

Aah, just got the Collada animation to work in SXE (: Any luck with Assimp?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users